Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +30343
pull_request: https://github.com/python/cpython/pull/32282
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
nosy: +uriyyo
nosy_count: 8.0 -> 9.0
pull_requests: +29939
pull_request: https://github.com/python/cpython/pull/27553
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 4.0 -> 5.0
pull_requests: +28241
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30017
___
Python tra
Yurii Karabas <1998uri...@gmail.com> added the comment:
Łukasz this issue is my original finding.
I have found this case when I was working on another issue that was related to
`typing.Protocol`.
I agree that we can leave it as it is for now because I didn't find any
information
Change by Yurii Karabas <1998uri...@gmail.com>:
--
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.org/issue45167>
___
___
Pyth
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 1.0 -> 2.0
pull_requests: +26720
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28306
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 3.0 -> 4.0
pull_requests: +26630
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28206
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 4.0 -> 5.0
pull_requests: +26562
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28121
___
Python tra
Yurii Karabas <1998uri...@gmail.com> added the comment:
Hi Mateusz,
It's not a bug, it's expected behavior.
__getattr__ called when the default attribute access fails with an
AttributeError (either __getattribute__() raises an AttributeError because name
is not an instance
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 1.0 -> 2.0
pull_requests: +26501
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28057
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +26195
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/27710
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +26068
pull_request: https://github.com/python/cpython/pull/27543
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
I believe we can close this issue.
It has been fixed in scope of this issue - https://bugs.python.org/issue44524
--
nosy: +uriyyo
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 1.0 -> 2.0
pull_requests: +26060
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27553
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +26052
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27543
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
typing.Protocol silently overrides __init__ method of delivered class.
I think it should be forbidden to define __init__ method at Protocol delivered
class in case if cls is not Protocol.
--
components: Library (Lib)
me
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +26050
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27541
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
When we subclassing Protocol, we get a __init__ differing from default one but
the protocol in question didn't define any __init__.
More information can be found here - https://github.com/python/typing/issues/644
--
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25993
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27474
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
In scope of https://github.com/python/cpython/pull/27262 we have introduce
`_typing` module with typing related helper functions.
It will be great to speedup `typing.cast` function by implementing it in C.
I have already done
Change by Yurii Karabas <1998uri...@gmail.com>:
--
title: NewType __module__ name default value -> NewType __module__ attr default
value
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25939
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27406
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
title: NewType __module__ name -> NewType __module__ name default value
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
This issue related to https://bugs.python.org/issue44353
By default `__module__` attribute of a `NewType` is set to "typing" but in
other typing classes it set to "__main__".
--
components: Library (
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25920
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27387
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
While I was working with `typing` I have notice that there are duplication of
`_getframe` usage. While In scope of issue 44353 I introduced `typing._callee`
function which allow to return module name of a caller function.
In sc
Yurii Karabas <1998uri...@gmail.com> added the comment:
`NewType` was converted into callable class at scope of
https://bugs.python.org/issue44353
Currently `repr` of `NewType` is:
```
>>> UserId = NewType("UserId", int)
__main__.UserId
```
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25849
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/27305
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25846
pull_request: https://github.com/python/cpython/pull/27302
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25807
pull_request: https://github.com/python/cpython/pull/27262
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
Jelle thanks for pointing this out, I will implement helper function in C and
use it as a __call__ method for NewType
--
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25804
pull_request: https://github.com/python/cpython/pull/27259
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
I opened PR with refactored `typing.NewType` into callable class.
Also I have added `__module__` attr to typing.NewType so it will become
pickable.
--
___
Python tracker
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25798
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27250
___
Python tracker
<https://bugs.python.or
Yurii Karabas <1998uri...@gmail.com> added the comment:
@Ken thanks for pointing this out.
The only solution which I see is to convert NewType into callable class but it
will lead to performance degradation.
@Ken what do you think abou
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25792
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27244
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue44676>
___
___
Python-bugs-li
Change by Yurii Karabas <1998uri...@gmail.com>:
--
title: Add ability to serialise and annotate types.Union -> Add ability to
annotate types.Union
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issue44676>
___
___
Python-bugs-list
New submission from Yurii Karabas <1998uri...@gmail.com>:
It was discussed at https://bugs.python.org/issue44490
--
messages: 397814
nosy: uriyyo
priority: normal
severity: normal
status: open
title: Add ability to serialise types.Union
___
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 5.0 -> 6.0
pull_requests: +25786
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27237
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25756
pull_request: https://github.com/python/cpython/pull/26980
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25757
pull_request: https://github.com/python/cpython/pull/26980
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
title: Add ability to serialise and annotated types.Union -> Add ability to
serialise and annotate types.Union
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25754
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27214
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
It was discussed at https://bugs.python.org/issue44490
--
messages: 397720
nosy: uriyyo
priority: normal
severity: normal
status: open
title: Add ability to serialise and annotated types.Union
type: enhancement
versions:
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25753
pull_request: https://github.com/python/cpython/pull/27215
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25752
pull_request: https://github.com/python/cpython/pull/27214
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 3.0 -> 4.0
pull_requests: +25744
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26980
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 3.0 -> 4.0
pull_requests: +25745
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26980
___
Python tra
Yurii Karabas <1998uri...@gmail.com> added the comment:
Jelle I can try to implement it in C to see if it will give better performance.
--
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +25604
pull_request: https://github.com/python/cpython/pull/27048
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +25542
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26980
___
Python tracker
<https://bugs.python.or
Yurii Karabas <1998uri...@gmail.com> added the comment:
@Ken I will pick up this issue, thanks for asking.
--
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
Should `__getitem__` be implemented for `types.Union`?
I can implement it if no one is working on it.
P.S. mypy currently does not support it:
```
Value of type "types.Union" is not indexable
```
Yurii Karabas <1998uri...@gmail.com> added the comment:
What about to return callable object instead of function from a
`typing.NewType`?
It will look something like this:
```
class _NewType:
__slots__ = ('__name__', '__supertype__')
def __init__(self, name
Yurii Karabas <1998uri...@gmail.com> added the comment:
Please forget my previous msg, this bug still present at 3.11 version. PR
contains fix proposed by Kevin.
Sorry for making to much noise.
--
___
Python tracker
<https://bugs.p
Yurii Karabas <1998uri...@gmail.com> added the comment:
I checked and this bug is not present at 3.11 version. So I simply added test
to cover case mentioned by Ivan.
--
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
Hi Guido,
I decided to help with this issue as far as Kevin did not respond.
--
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 3.0 -> 4.0
pull_requests: +24708
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26067
___
Python tra
Yurii Karabas <1998uri...@gmail.com> added the comment:
Sorry about this, in a future I will use forum for such discussions.
--
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
When I work with ABC classes usually I faced a problem - I forget to implement
one of the methods or make a typo in the method name. In such case I will know
about it only when I will try to instantiate a class.
In case
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +23339
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24558
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
Basically, the idea is to add the ability to mark abstract classes as strict.
What does this mean - in case when a class inherits from a strict abstract base
class and doesn't implement all abstract methods then it will fai
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +23228
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24413
___
Python tracker
<https://bugs.python.or
Yurii Karabas <1998uri...@gmail.com> added the comment:
Hi Raymond,
I was trying to add __or__ method for collections.abc.Mapping, __ior__ method
for collections.abc.MutableMapping, link to issue -
https://bugs.python.org/issue42841.
I can extract code and move it to separate classes
Yurii Karabas <1998uri...@gmail.com> added the comment:
Hi Eric, I tried to help you with this feature and have opened a PR. I thought
that you are too busy to implement this feature, so that's why I decided to
help you (It almost two months since your last message in
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 5.0 -> 6.0
pull_requests: +22998
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24171
___
Python tra
Yurii Karabas <1998uri...@gmail.com> added the comment:
Thanks, for the replies, didn't know about that.
Interesting thing that `collections.abc.Set` base class has implementations of
`__and__`, `__or__`, `__sub__` and `__xor__` methods, it also provide
`_from_iterable` class met
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +22970
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24141
___
Python tracker
<https://bugs.python.or
Change by Yurii Karabas <1998uri...@gmail.com>:
--
components: +Library (Lib)
type: -> enhancement
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
In python3.9 `dict` `bitwise or` operator was introduced.
I think it will be great if `collections.abc.Mapping` and
`collections.abc.MutableMapping` will have a default implementation of `bitwise
or` operator.
--
me
Yurii Karabas <1998uri...@gmail.com> added the comment:
> What is better?
Sorry, I can't answer this question.
I am a regular python user and I just tried to help with your issue.
I believe we should wait for someone from core team to answer this question.
> In your exampl
Yurii Karabas <1998uri...@gmail.com> added the comment:
I think the simplest solution in your case is not to use `@overload`, as far as
I understand you want to override the signature of base method.
This code won't produce any error when used with `mypy`:
```
class Parent:
Yurii Karabas <1998uri...@gmail.com> added the comment:
`mypy` will produce an error on such code:
```
class Parent:
def foo(self, **kwargs):
"""Argument names of foo vary depending on the child class."""
class Child(Parent):
@overload
Yurii Karabas <1998uri...@gmail.com> added the comment:
The purpose of `@overload` is quite different. I believe you thought that this
is smth like `@override` in Java world but it different.
Basically, the correct usage of `@overaload` is:
```
@overload
def process(response: None) -
Yurii Karabas <1998uri...@gmail.com> added the comment:
What we should do with this issue?
There was no much discussion at python-ideas.
I have received only one -1 opinion.
--
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +22907
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24074
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
New thread doesn't copy context of the parent thread.
The minimal example to reproduce the issue:
```
from threading import Thread
from contextvars import ContextVar
foo: ContextVar[str] = ContextVar("foo")
Yurii Karabas <1998uri...@gmail.com> added the comment:
You a totally right, looks like I tried to add a feature that no one asked for:)
I have updated PR and removed `name` parameter from `property` constuctor.
Thanks for your
Yurii Karabas <1998uri...@gmail.com> added the comment:
Raymond, it's a good question.
I have added `name` to `property` constructor to support cases when a property
is added to a class after it was declared.
For instance:
```
class Foo:
pass
Foo.foo = property(name=
Yurii Karabas <1998uri...@gmail.com> added the comment:
I have implemented this feature using an idea provided by Xiang Zhang.
Basically, property has new optional attribute `name` which will be added to
msg of `AttributeError` in a case when `name`
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 8.0 -> 9.0
pull_requests: +22812
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/23967
___
Python tra
Yurii Karabas <1998uri...@gmail.com> added the comment:
After several attempts to optimize class/module annotations, I didn't find a
solution that won't break existing code and can cover all existing edge cases.
The root cause was mentioned by Inada, the problem that `__a
Yurii Karabas <1998uri...@gmail.com> added the comment:
Yurii no worries, I am happy that this issue is resolved)
--
nosy: +uriyyo
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
Hey Yurii, I have fixed this issue.
The actual problem was that `wait_for` cancels passed future but doesn't wait
until it finished.
--
___
Python tracker
<https://bugs.python.
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
nosy: +uriyyo
nosy_count: 4.0 -> 5.0
pull_requests: +22689
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23829
___
Python tra
Change by Yurii Karabas <1998uri...@gmail.com>:
--
keywords: +patch
pull_requests: +22501
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23632
___
Python tracker
<https://bugs.python.or
New submission from Yurii Karabas <1998uri...@gmail.com>:
`dis` module failed when trying to parse function that has only annotations at
the function body:
```
def foo():
a: int
```
Failed with stacktrace:
```
1 0 LOAD_CONST 0 ()
2 LOAD
Yurii Karabas <1998uri...@gmail.com> added the comment:
As all annotations are known at compilation time we can optimize annotations
creating.
For instance, we have such code:
```
a: int
b: int
```
With the current implementation, we will have such bytecode:
```
1
New submission from Yurii Karabas <1998uri...@gmail.com>:
This issue is inspired by https://bugs.python.org/issue42202
We can do smth similar for class/module level annotations.
Inada Naoki what do you think regarding that?
--
components: Interpreter Core
messages: 38226
Yurii Karabas <1998uri...@gmail.com> added the comment:
I have posted this idea to python-ideas
Link to thread
https://mail.python.org/archives/list/python-id...@python.org/thread/OIRAB3QA4AAD3JGH2S5HMGCPDLGG7T52/
--
___
Python tracker
Yurii Karabas <1998uri...@gmail.com> added the comment:
Let's wait for Nick.
I have found great examples to show how decorator_factory can simplify things.
dataclasses.dataclass
```
def dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False,
unsafe
Yurii Karabas <1998uri...@gmail.com> added the comment:
Looks like we have done everything, we can close this issue
--
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
title: Add decorator_with_params function to functools module -> Add
decorator_factory function to functools module
___
Python tracker
<https://bugs.python.or
Yurii Karabas <1998uri...@gmail.com> added the comment:
I agree, decorator factory definitely a better name
--
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +22432
pull_request: https://github.com/python/cpython/pull/23552
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +22405
pull_request: https://github.com/python/cpython/pull/23521
___
Python tracker
<https://bugs.python.org/i
Change by Yurii Karabas <1998uri...@gmail.com>:
--
pull_requests: +22402
pull_request: https://github.com/python/cpython/pull/23517
___
Python tracker
<https://bugs.python.org/i
Yurii Karabas <1998uri...@gmail.com> added the comment:
There is a little error in your code, it should look like this:
```
def test(sum):
return int(sum)
if test(10) == 10:
print("Yes")
else:
print("No")
```
Basically `if sum == 10:` will compare bui
1 - 100 of 120 matches
Mail list logo