Change by Ivan Levkivskyi :
--
keywords: +patch, patch
pull_requests: +11636, 11637
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35975>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
This is not a Python issue, this should be reported on typeshed tracker (but
likely a duplicate of the issue mentioned by Karthikeyan).
--
resolution: -> third party
stage: -> resolved
status: open -&g
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +11889
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35992>
___
_
Ivan Levkivskyi added the comment:
Yes, I think this is a bug. Created a PR with a possible simple fix.
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
This question appeared several times before, and the conclusion is that we are
not going to do this.
There are many cases in standard library that are generic in stubs (and by
nature) but are not declared as such at runtime, so we simply can't prov
Ivan Levkivskyi added the comment:
New changeset ac28147e78c45a6217d348ce90ca5281d91f676f by Ivan Levkivskyi in
branch 'master':
bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)
https://github.com/python/cpython/commit/ac28147e78c45a6217d348ce90ca52
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
I totally agree with Serhiy
--
___
Python tracker
<https://bugs.python.org/issue36042>
___
___
Python-bugs-list mailin
Changes by Ivan Levkivskyi :
--
pull_requests: +387
___
Python tracker
<http://bugs.python.org/issue29638>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
> why not add corresponding clearing methods obj._abc_cache.clear and
> obj._abc_negative_cache.clear to typing._cleanups ?
OK, this is another possible solution. I didn't think about this, because now
typing._cleanups only clear generic cach
Ivan Levkivskyi added the comment:
> Are typing.ChainMap and others actually abstract classes?
They are abstract classes in the sense that they are instances of abc.ABCMeta.
However, for some reasons inspect checks __flags__ attribute. The latter
probably reflects the fact that Deque etc.
Ivan Levkivskyi added the comment:
> What if explicitly set __abstractmethods__ = True for these types?
Unfortunately this does not help. I think this is because dash_R_cleanup only
clears caches for classes in collections.abc.__all__ and their immediate
.__subclasses__(). Making t
Ivan Levkivskyi added the comment:
> If you just want to add a workaround in dash_R_cleanup, I think it would be
> better to generate the list of all abstract classes and add three typing
> classes to it.
Yes, I just updated the PR.
I have found something else unrelated to typing,
Ivan Levkivskyi added the comment:
> Seems this has fixed issue25744.
This is interesting, if I remember correctly the relevant typing classes were
added only recently. I will take a look at how to back-port this (probably this
will require some code chan
Changes by Ivan Levkivskyi :
--
pull_requests: +394
___
Python tracker
<http://bugs.python.org/issue29638>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
pull_requests: +395
___
Python tracker
<http://bugs.python.org/issue29638>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue29727>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
It looks like there are still few things that are not covered in two open PRs.
I will add these in an additional PR in the next few days.
--
___
Python tracker
<http://bugs.python.org/issue28
Changes by Ivan Levkivskyi :
--
pull_requests: +538
___
Python tracker
<http://bugs.python.org/issue28810>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
pull_requests: +547
___
Python tracker
<http://bugs.python.org/issue28810>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Serhiy, sorry for a distraction, but it looks like here is one more situation
where inspect.isabstract is problematic, similar to what was discussed in
http://bugs.python.org/issue29638 recently.
--
nosy: +levkivskyi, serhiy.storchaka
Ivan Levkivskyi added the comment:
It looks like this is fixed on master, but the problem still appears on 3.6
--
___
Python tracker
<http://bugs.python.org/issue28
Changes by Ivan Levkivskyi :
--
versions: +Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<http://bugs.python.org/issue21253>
___
___
Python-bugs-list m
Ivan Levkivskyi added the comment:
It looks like it is safe to just remove this line from docs. This code
>>> x = 1
>>> def f():
... global x
... del x
...
>>> f()
>>> x
Works as expected, i.e. raises NameError. (The same happens for
Ivan Levkivskyi added the comment:
Something is strange: PRs 709, 723, 724 are shown as open in the "Pull
Requests" section on this page. However, all four PRs are already merged.
Are other see the same? Shouldn't status be automa
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue29593>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue17792>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
pull_requests: +667
___
Python tracker
<http://bugs.python.org/issue24796>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Thanks Brett!
I think this could be closed now.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue29922>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
You could try:
glob = globals.copy()
glob.update(a.__dict__)
glob.update(b.__dict__)
You can do this automatically following MyClass.__mro__ and then collecting
relevant __module__ attributes on bases.
However, there is little chance this will be fixed in
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue29974>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Ivan Levkivskyi :
--
assignee: -> levkivskyi
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue29727>
___
___
Python-bugs-
Ivan Levkivskyi added the comment:
> 87c07fe9d908d0a2143fcc8369255c6ff3241503 should still be backported to 3.5
> and 3.6 branches so please don't close it yet.
Thanks for making backport PRs! (and sorry for closing prematurely)
--
___
Ivan Levkivskyi added the comment:
> Sorry for making a typo in your last name
No problem!
This actually happened maaany times with me :-)
--
___
Python tracker
<http://bugs.python.org/issu
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue30196>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue30145>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ivan Levkivskyi :
--
pull_requests: +1475
___
Python tracker
<http://bugs.python.org/issue28556>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
The discussed functionality is published as a separate package:
https://pypi.python.org/pypi/typing-inspect
https://github.com/ilevkivskyi/typing_inspect
After the API is settled, some introspection functions may be added directly to
typing
Ivan Levkivskyi added the comment:
Or you can use typing.ContextManager[ret_type] if you like generics
(typing.AsyncContextManager will be also added soon).
Also this recent discussion seems relevant
https://github.com/python/peps/pull/242 and the corresponding thread on
python-dev: https
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue30463>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Thanks for reporting!
The runtime implementation of protocol classes will be thoroughly reworked as a
part of PEP 544, see also https://github.com/python/typing/pull/417 for a proof
of concept runtime implementation.
Also, there is another ongoing
Ivan Levkivskyi added the comment:
> Block = [int, Tuple[int]]
> Blocks = List[Block]
These are both invalid type aliases (I have no idea why PyCharm does not flag
them, you could report this at PyCharm issue tracker). I am not sure what
exactly you want. If you want a list of
Changes by Ivan Levkivskyi :
--
pull_requests: +2140
___
Python tracker
<http://bugs.python.org/issue28556>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
We can probably also skip `type_ignores` list if it is empty (which will be the
case in 99% situations).
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue36
Ivan Levkivskyi added the comment:
Good idea! This should be easy to fix/update, this was initially discussed in
https://github.com/python/typing/issues/339.
--
___
Python tracker
<https://bugs.python.org/issue36
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue36470>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ivan Levkivskyi :
--
nosy: +gvanrossum, levkivskyi
___
Python tracker
<https://bugs.python.org/issue36466>
___
___
Python-bugs-list mailing list
Unsub
Ivan Levkivskyi added the comment:
+1 from me.
There are two ways to enable this:
* Add -OOO that would remove all three: asserts, docstrings, annotations
* Add separate --O-asserts --O-docstrings --O-annotations (or similar)
I think I like the second option more.
@cary Please note that our
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
I am totally fine with making RegexFlag public (this may be indeed useful for
static typing purposes).
--
___
Python tracker
<https://bugs.python.org/issue31
Ivan Levkivskyi added the comment:
Hm, it looks like we can support this. I however don't think the proposed
"patch" is the right way to fix it, since this makes the implementation with
and without a mixin quite different.
Also I am not sure I will have time to work on this
Ivan Levkivskyi added the comment:
Mypy already takes first overload for ambiguous arguments. This example is
however genuinely unsafe from the static typing point of view. Please read the
docs
https://mypy.readthedocs.io/en/latest/more_types.html#type-checking-the-variants
Ivan Levkivskyi added the comment:
This is a duplicate of https://github.com/python/typing/issues/431
We can of course close the other issue and keep this one open, but the other
one has much more discussion. So I am closing this one.
--
resolution: -> duplicate
stage: -> re
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue36643>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Oh, sorry, didn't notice the backport is missing!
--
___
Python tracker
<https://bugs.python.org/issue36679>
___
___
Change by Ivan Levkivskyi :
--
pull_requests: +12904
stage: resolved -> patch review
___
Python tracker
<https://bugs.python.org/issue36679>
___
___
Python-
Ivan Levkivskyi added the comment:
Thanks for fixing this!
--
nosy: +levkivskyi
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
OK, backported the fix to 3.7.
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Ivan Levkivskyi added the comment:
New changeset d111490a1f63db2dcc3714157726dc6a5c0fa1cd by Ivan Levkivskyi in
branch '3.7':
[3.7] bpo-36679: Rename duplicate test_class_getitem function (GH-12892)
(GH-12978)
https://github.com/python/cpython/commit/d111490a1f63db2dcc3714157726dc
Change by Ivan Levkivskyi :
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue36679>
___
___
Python-bugs-list mailing list
Unsubscrib
Ivan Levkivskyi added the comment:
+1 from me (as a big fan of print-debugging).
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue36
Ivan Levkivskyi added the comment:
Btw, I am +1 on this feature (preferably with an option to check line, column,
end line, and end column). I always wanted this, but never had time to actually
implement this.
--
nosy: +levkivskyi
___
Python
Ivan Levkivskyi added the comment:
I think this is related to doc tests being executed in a namespace where the
class definition is not available. I am not sure what is the best way here, a
workaround is to explicitly pass the namespace, for example this passes:
import typing
def f(clazz
Change by Ivan Levkivskyi :
--
nosy: +gvanrossum, lukasz.langa
___
Python tracker
<https://bugs.python.org/issue36810>
___
___
Python-bugs-list mailing list
Unsub
Ivan Levkivskyi added the comment:
I like the idea of separate smaller PRs, the first one looks good.
--
___
Python tracker
<https://bugs.python.org/issue36
Ivan Levkivskyi added the comment:
New changeset d8320ecb86da8df7c13d8bf8582507f736aa2924 by Ivan Levkivskyi
(Michael J. Sullivan) in branch 'master':
bpo-36878: Allow extra text after `# type: ignore` comments (GH-13238)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
Serhiy,
I am sorry for a delay, I have recently moved to another country, this is why I
have not much time. I will try to work on this weekend. Here are some points
where you can be helpful:
* Make a short documentation PR for `__mro_entry__` and
Ivan Levkivskyi added the comment:
There are several corner cases. For example consider this code:
>>> class C:
... del __annotations__
... x: int
Currently this correctly raises NameError, with your replacement it will
instead stick {'x': int} in the module `
Ivan Levkivskyi added the comment:
There is also another corner case to consider:
class C:
exec('x: int')
assert C.__annotations__ == {'x': int}
assert __annotations__ == {}
I am not sure this one will be covered correctly.
But the main argument here is speed I thi
Ivan Levkivskyi added the comment:
> BTW, would you update the PEP status to Final?
Good point, here is the PR https://github.com/python/peps/pull/554
--
___
Python tracker
<https://bugs.python.org/issu
Ivan Levkivskyi added the comment:
New changeset d911e40e788fb679723d78b6ea11cabf46caed5a by Ivan Levkivskyi in
branch 'master':
bpo-32226: PEP 560: improve typing module (#4906)
https://github.com/python/cpython/commit/d911e40e788fb679723d78b6ea11ca
Ivan Levkivskyi added the comment:
I have not seen this for quite some time so I'm closing this as fixed.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +5117
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31333>
___
___
Py
Ivan Levkivskyi added the comment:
I think all the critical things have been implemented/fixed. There are
unfortunately no docs yet (my fault), also there are two bugs related to PEP
560, but they are not new, they also exist in Python 3.6.
I am however marking this as high priority, since
Ivan Levkivskyi added the comment:
https://github.com/python/typing/issues/512 and
https://github.com/python/typing/issues/511 are first issue (they are closely
related to each other). This is not directly related to PEP 560, but changes in
typing because of it will allow to fix them in a
Ivan Levkivskyi added the comment:
OK, I will close this issue, and open separate issues for documentation, Union,
etc.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bug
New submission from Ivan Levkivskyi :
This should include:
* Short documentation PR for `__mro_entry__` and `__base_subclass__` methods.
* The `__class_getitem__` C API calling convention (with motivation, many
classes are implemented in C but are generic in nature, like numpy.ndarray) in
PEP
Ivan Levkivskyi added the comment:
> Do you think it should be added to the What's New? page for 3.7?
I leave this up to Ćukasz.
--
___
Python tracker
<https://bugs.python.org
Ivan Levkivskyi added the comment:
This is a rather small change, so probably it would be easier to discuss it in
a PR.
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue32
Ivan Levkivskyi added the comment:
There is a third party library on PyPI called typing_inspect that provides thin
wrappers around internal APIs to get lots of useful information about generics
and other special types in typing.
If there will be more requests like this, then the most used
Ivan Levkivskyi added the comment:
I wanted to say implicitly that I like the idea, and that we should figure out
details in a PR. But of course if someone is against this, then we should wait
with a PR.
--
nosy: +gvanrossum
___
Python tracker
Ivan Levkivskyi added the comment:
> Isn't 800 lines of C code too high price for speeding up ABCs creation?
800 lines of C code is not something hard to notice, so I suppose the answer is
obvious for all people involved in the work on PR :-)
> ...this can save just several mill
Ivan Levkivskyi added the comment:
New changeset 03e3c340a0156891a036d6dbdb9e348108826255 by Ivan Levkivskyi in
branch 'master':
bpo-31333: Re-implement ABCMeta in C (#5273)
https://github.com/python/cpython/commit/03e3c340a0156891a036d6dbdb9e34
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
FWIW, this is fixed in 3.7 by PEP 560. I don't think we will be able to get rid
of `sys._getframe` workaround on 3.6, so I propose to just close this.
--
dependencies: -Provide a way to check for *real* typing.Union instances
resolution: -&g
Ivan Levkivskyi added the comment:
FWIW, this is fixed in 3.7 by PEP 560, providing a separate fix for 3.6 is not
easy, and you have a good workaround, so I propose to close this issue.
--
resolution: -> fixed
stage: -> resolved
status: open -&g
Change by Ivan Levkivskyi :
--
pull_requests: +5514
___
Python tracker
<https://bugs.python.org/issue31333>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ivan Levkivskyi :
--
pull_requests: +5515
___
Python tracker
<https://bugs.python.org/issue25988>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 38928992885d8a04b7188abdba3b04f350bde32d by Ivan Levkivskyi in
branch '3.7':
bpo-31333: Re-implement ABCMeta in C (GH-5733)
https://github.com/python/cpython/commit/38928992885d8a04b7188abdba3b04
Ivan Levkivskyi added the comment:
New changeset 0442de5ad7835814d60f46c22a22942abb101aef by Ivan Levkivskyi in
branch '3.7':
bpo-25988: Emit a warning when use or import ABCs from 'collections'. (GH-5734)
https://github.com/python/cpython/commit/0442de5ad7835814d60f
Ivan Levkivskyi added the comment:
New changeset 3fb813d2c67fe28cc98ae51e53a6890294b6e423 by Ivan Levkivskyi
(Terry Jan Reedy) in branch 'master':
bpo-31333: Fix typo in whatsnew/3.7.rst (GH-5744)
https://github.com/python/cpython/commit/3fb813d2c67fe28cc98ae51e53a689
Ivan Levkivskyi added the comment:
Here is the situation for 3.6 and before:
Generic classes are all actual class objects, so they are pickled as immutable.
However this creates a problem, parameterized generics, such as `List[int]`
_cannot_ be pickled in 3.6 and before, see
https
Ivan Levkivskyi added the comment:
I am sick now, so can't work on this. There is a small chance I will be able to
work on this issue this week. Is it possible to fix this in 3.7b3?
--
___
Python tracker
<https://bugs.python.org/is
Ivan Levkivskyi added the comment:
Thank you, Ned!
--
___
Python tracker
<https://bugs.python.org/issue32873>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Actually, the behaviour when __suclasscheck__ returns True for non-class
objects may be used by some code. Even typing module did this, I tried to
remove as much as possible of this, but I think there may be few such
situations left.
Therefore, the patch
Ivan Levkivskyi added the comment:
Serhiy, for example `issubclass(typing.MutableMapping, typing.Mapping)` returns
`True` while neither of those two are actual class objects. These relationships
are kept mostly so that `typing.*` can be used as a drop-in replacement for
`collections.abc
201 - 300 of 681 matches
Mail list logo