Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13480
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13572
___
Python tracker
<https://bugs.python.org/issu
New submission from Ivan Levkivskyi :
The actual implementation is performed by type checkers like mypy. We just need
to add `TypedDict` to the `typing` module.
--
assignee: levkivskyi
components: Library (Lib)
messages: 343506
nosy: gvanrossum, levkivskyi
priority: normal
severity
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13481
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13573
___
Python tracker
<https://bugs.python.org/issu
Ivan Levkivskyi added the comment:
New changeset f367242d10ef36db38133a39ab7627f63099cba4 by Ivan Levkivskyi in
branch 'master':
bpo-37045: PEP 591: Add final qualifiers to typing module (GH-13571)
https://github.com/python/cpython/commit/f367242d10ef36db38133a39ab7627
Ivan Levkivskyi added the comment:
New changeset b891c465bb7d38a597c5c2ad547d7b19194f4dad by Ivan Levkivskyi in
branch 'master':
bpo-37046: PEP 586: Add Literal to typing module (#13572)
https://github.com/python/cpython/commit/b891c465bb7d38a597c5c2ad547d7b
Ivan Levkivskyi added the comment:
New changeset 135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f by Ivan Levkivskyi in
branch 'master':
bpo-37049: PEP 589: Add TypedDict to typing module (GH-13573)
https://github.com/python/cpython/commit/135c6a56e55d2f4f8718b3b9f03ce3
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
On the other hand, if this causes troubles, feel free to just replace u"bar"
with "bar" in that test. It is not really important.
--
nosy: +levkivskyi
___
Python tracker
<https://bug
Ivan Levkivskyi added the comment:
Duplicate of https://bugs.python.org/issue37053
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Ivan Levkivskyi :
The implementation would be basically copying some code from `typing_extension`
and fixing some important known issues (such as renaming @runtime to
@runtime_checkable and allowing sub-protocols of builtin protocols). Also
ideally we should get rid of
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13492
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13585
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
pull_requests: +13495
pull_request: https://github.com/python/cpython/pull/13588
___
Python tracker
<https://bugs.python.org/issue37
Ivan Levkivskyi added the comment:
New changeset 74d7f76e2c953fbfdb7ce01b7319d91d471cc5ef by Ivan Levkivskyi in
branch 'master':
bpo-37058: PEP 544: Add Protocol to typing module (GH-13585)
https://github.com/python/cpython/commit/74d7f76e2c953fbfdb7ce01b7319d9
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13573
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13685
___
Python tracker
<https://bugs.python.org/issu
Ivan Levkivskyi added the comment:
New changeset 4c23aff065fb28aba789a211937a2af974842110 by Ivan Levkivskyi in
branch 'master':
bpo-29262: Add get_origin() and get_args() introspection helpers to typing
(GH-13685)
https://github.com/python/cpyt
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.6
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
Guido, I remember you were against exposing `ForwardRef` as public at some
point, but recently you approved https://github.com/python/cpython/pull/13456
that added it to `typing.__all__`. I don't have any particular opinion on this,
but if you don
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
pull_requests: +13638
pull_request: https://github.com/python/cpython/pull/13757
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
Thanks! It looks like this was fixed in typing and then forward ported to
CPython.
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bug
Ivan Levkivskyi added the comment:
So what was the conclusion about PyCode_New()? Situation is quite similar here
(except that these functions are used less often). Should we just document the
changes in What's New?
--
___
Python tracker
&
Change by Ivan Levkivskyi :
--
pull_requests: +13679
pull_request: https://github.com/python/cpython/pull/13794
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
Likely, the unexpected success can be avoided with clearing generic caches in
test___all__ (it just imports whatever it can find and likely also
test/mod_generics_cache.py), but I am also fine with just skipping it for now.
Will you have time to make a PR
Ivan Levkivskyi added the comment:
I think we can proceed with option A, but only if doesn't cause visible
slow-down for creating ABCs (which is already slower that normal classes). TBH,
I don't want to document A as "official" recipe (maybe however mention the
pr
Ivan Levkivskyi added the comment:
> Would it be possible to document the change somewhere?
Most of these things are in the docs for ast module.
But indeed none of static typing related features have been added to What's
New. I have an item on mypy todo list to add four typing PEPs
Ivan Levkivskyi added the comment:
Typo: "mypy todo list" should be "my todo list" :-)
--
___
Python tracker
<https://bugs.python.org/issue35766>
___
_
Ivan Levkivskyi added the comment:
> Perhaps adding some section like "Notes on pickling dynamically-defined
> classes" in the `pickle` module would be more appropriate?
I think just a note with few sentences would be enough.
--
__
Change by Ivan Levkivskyi :
--
pull_requests: +14052
pull_request: https://github.com/python/cpython/pull/14214
___
Python tracker
<https://bugs.python.org/issue33
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +14053
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14216
___
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 :
--
pull_requests: +14058
pull_request: https://github.com/python/cpython/pull/14220
___
Python tracker
<https://bugs.python.org/issue36
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/issue37496>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 110a47c4f42cf4db88edc1876899fff8f05190fb by Ivan Levkivskyi (Carl
Friedrich Bolz-Tereick) in branch 'master':
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
New changeset 430a9f44fe22f029ae8cfeecb46621d7e199414b by Ivan Levkivskyi (Carl
Friedrich Bolz-Tereick) in branch 'master':
bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
New changeset 68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0 by Ivan Levkivskyi (Miss
Islington (bot)) in branch '3.8':
bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)
(GH-14672)
https://github.com/python/cpyt
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
You might want to look into how PEP 563 is implemented, it has a utility to
turn an AST back into a string (I assume this is what you want).
--
___
Python tracker
<https://bugs.python.org/issue37
Ivan Levkivskyi added the comment:
FWIW I like Serhiy's approach more. I have never seen a single metaclass
overriding type.__call__, while overriding type.__new__ is a common practice.
--
___
Python tracker
<https://bugs.python.org/is
Ivan Levkivskyi added the comment:
> I have a couple of questions about how to use `ast_unparse.c`'s
> `expr_as_unicode` function:
> 1. Should I create a new function in the `ast` module that exposes that C
> function in Python in order to use it in `Lib/inspect.py`?
> 2
Ivan Levkivskyi added the comment:
> If consensus has been reached on this, I am willing to do the work.
It looks like there is already an active PR
https://github.com/python/cpython/pull/14970, there are some non-implemented
comments from a core rev
Ivan Levkivskyi added the comment:
> FWIW, I had updated the docs for namedtuple() to link to typing.NamedTuple.
> I think that should suffice.
Thank you! I looked at the docs everything looks good. I think this can be
closed now.
--
assignee: -> docs@python
c
Change by Ivan Levkivskyi :
--
assignee: -> levkivskyi
___
Python tracker
<https://bugs.python.org/issue37806>
___
___
Python-bugs-list mailing list
Un
Ivan Levkivskyi added the comment:
Yes, you are right. Could you please make a PR at
https://github.com/python/cpython/pulls ?
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue30
Changes by Ivan Levkivskyi :
--
assignee: -> levkivskyi
___
Python tracker
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailing list
Unsubscrib
Ivan Levkivskyi added the comment:
The last few weeks something bothered while working on Protocols PEP: protocols
should be ideally compact (and PEP already emphasizes this).
However, the only potential candidates for __getitem__ are Sequence and
Mapping, that are both quite bulky (half dozen
Ivan Levkivskyi added the comment:
Raymond,
> The existence of use ABCs like MutableMapping is being drowned-out by
> one-trick-ponies. We're developing an unfavorable ratio of theoretical
> building blocks versus the practical tools.
Why do you think they are "theoretic
Ivan Levkivskyi added the comment:
Names from collections.abc are re-exported to collections for backward
compatibility. IIRC Serhiy also wanted to stop re-exporting them. I am not sure
whether we need any "deprecation period" for this.
--
nosy: +serhiy
Ivan Levkivskyi added the comment:
The fact that it is a class is an implementation detail and may change before
Python 3.7 beta (situation is the same for Callable). Guido explicitly doesn't
like to "advertise" it as a class yet. Unless he changed his mind, I would
propose to
Ivan Levkivskyi added the comment:
This looks like a reasonable idea, if it is possible to implement this without
complications. Would you like to submit a PR at
https://github.com/python/typing ?
(We have a separate upstream repo for typing while it is provisional.)
--
nosy
Ivan Levkivskyi added the comment:
> This ticket is about fix objects.inv to have the Tuple in the correct bucket.
If you know how to do this without breaking the python docs system (so that
Tuple and Callable will not have a "class" prefix on
https://docs.python.org/3/librar
Ivan Levkivskyi added the comment:
> Do you have any idea?
Unfortunately no.
--
___
Python tracker
<http://bugs.python.org/issue31024>
___
___
Python-bugs-lis
Ivan Levkivskyi added the comment:
Bernát, I would recommend asking this on Sphinx tracker (I also assigned this
to docs@python since this seems to be a purely documentation issue).
https://github.com/sphinx-doc/sphinx
--
assignee: -> docs@python
components: +Documentation
n
Ivan Levkivskyi added the comment:
> For the end user the fact that this is a class is still hidden
I am not sure what you mean by this, but with your PR the rendered docs will
literally say ``class typing.Tuple``.
> We should probably add a unit test that makes sure all runtime
Ivan Levkivskyi added the comment:
TBH, I think this is a Sphinx problem, not a Python problem. And concerning
``Tuple`` being an actual class I think this is an implementation detail, so
that I am closing this as "won't fix".
--
resolution: -> wont fix
stage:
Ivan Levkivskyi added the comment:
I think this is fixed in latest version. I thought it was also backported to
Python 3.5.3. What is the version you are using? Could you please try updating
to the latest bugfix release? (currently these are 3.5.4 and 3.6.2).
--
nosy: +levkivskyi
Ivan Levkivskyi added the comment:
It is listed in Misc/NEWS as "minor bug fixes" in typing module, I don't think
this is something that deserves a separate line in release notes.
--
resolution: -> out of date
stage: -> resolved
s
New submission from Ivan Levkivskyi:
The idea is that creating ABCs is approximately twice slower than normal
classes. Plus there are smaller penalties for various operations with ABCs.
This mostly influences the Python interpreter start-up time (because of
extensive use of ABCs in importlib
Changes by Ivan Levkivskyi :
--
nosy: +brett.cannon, haypo, serhiy.storchaka, yselivanov
___
Python tracker
<http://bugs.python.org/issue31333>
___
___
Python-bug
Ivan Levkivskyi added the comment:
Eric,
> the only ABCs in importlib are in importlib.abc (and used by importlib.util).
> This does not impact interpreter startup.
Hm, indeed, but I see that module 'abc' is in 'sys.modules', probably it is
then onl
Changes by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +3543
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue28556>
___
___
Py
Ivan Levkivskyi added the comment:
This is now fixed (to a reasonable extent) by
https://github.com/python/cpython/commit/f350a268a7071ce7d7a5bb86a9b1229782d4963b
on master, and backported to 3.6.
--
resolution: -> fixed
stage: -> resolved
status: open -&g
Ivan Levkivskyi added the comment:
I am with Inada-san actually. I would go as far as saying that
@cached_property
@abstractmethod
def something(): ...
should unconditionally raise on definition. Mostly because this is just
misleading. This declaration doesn't guarantee tha
Ivan Levkivskyi added the comment:
issue22616 is a bit different (proposing line/column ranges instead of just
endline/endcolumn). I am happy to close this one in favor of issue22616 if we
agree that we will go with endline/endcolumn.
I can't guarantee, but likely I will work on this d
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
New changeset f71a5922916abd6cc7bf7d99ed4715b6e96e5981 by Ivan Levkivskyi (Ismo
Toijala) in branch '3.7':
bpo-34921: Allow escaped NoReturn in get_type_hints (GH-9750) (GH-10772)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
Yes, since we already have `DefaultDict`, `Counter`, and `ChainMap` from
collections, we can also add `OrderedDict`.
--
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
Also typing is technically still provisional, we can backport this to previous
versions (at least to 3.7).
--
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
I would propose to keep this one open as a superseding
https://bugs.python.org/issue23864 and close the latter (assuming we are not
going to make all classes protocols, we I think we really shouldn't, and
instead we should improve the
Ivan Levkivskyi added the comment:
New changeset 68b56d02ef20479b87c65e523cf3dec1b7b77d40 by Ivan Levkivskyi (Ismo
Toijala) in branch 'master':
bpo-35341: Add generic version of OrderedDict to typing (GH-10850)
https://github.com/python/cpython/commit/68b56d02ef20479b87c65e523cf3de
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/issue35540>
__
___
Python-bugs-list mailing list
Unsub
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35631>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 31ec52a9afedd77e36a3ddc31c4c45664b8ac410 by Ivan Levkivskyi
(Ville Skyttä) in branch 'master':
bpo-35631: Improve typing docs wrt abstract/concrete collection types (GH-11396)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
I think this can be closed now. Whether to merge doc-fix backport to now
security-only 3.6 branch is up to Ned.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Pytho
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35717>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
FYI, I started working on this. I will have PR ready end of next week.
Serhiy, I don't think we should keep both this and issue22616 open. Which one
would you prefer to close?
--
___
Python tracker
&
Ivan Levkivskyi added the comment:
> I'm sure we will find use cases though I doubt that many compiler syntax
> errors would benefit (since a syntax error means that we don't have a
> completely matched grammar rule).
This is mostly useful for code analysis tools and IDEs
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue22616>
___
___
Ivan Levkivskyi added the comment:
Closed as superseded by https://bugs.python.org/issue33416
--
superseder: -> Add endline and endcolumn to every AST node
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
keywords: +patch, patch
pull_requests: +11329, 11330
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +11329
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33416>
___
_
Change by Ivan Levkivskyi :
--
keywords: +patch, patch, patch
pull_requests: +11329, 11330, 11331
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35766>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 9932a22897ef9905161dac7476e6976370e13515 by Ivan Levkivskyi in
branch 'master':
bpo-33416: Add end positions to Python AST (GH-11605)
https://github.com/python/cpython/commit/9932a22897ef9905161dac7476e697
Ivan Levkivskyi added the comment:
Buildbots are green, this can be now closed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
Good catch!
I think it was just overlooked rather than a conscious decision (unlike the
left hand side, that generated lots of debates)
I will make a PR to allow everything that is allowed on r.h.s. of a normal
assignment
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +11473
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35814>
___
_
Change by Ivan Levkivskyi :
--
keywords: +patch, patch, patch
pull_requests: +11473, 11474, 11475
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
keywords: +patch, patch
pull_requests: +11473, 11474
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Ivan Levkivskyi added the comment:
Re-opening to track renaming of potentially public PyNode_AddChild() and
PyParser_AddToken().
--
nosy: +vstinner
resolution: fixed ->
stage: resolved -> patch review
status: closed -> open
___
Pytho
Ivan Levkivskyi added the comment:
New changeset 62c35a8a8ff5854ed470b1c16a7a14f3bb80368c by Ivan Levkivskyi in
branch 'master':
bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones
(GH-11667)
https://github.com/python/cpyt
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.7
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35808>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
It looks like an opposite side of https://github.com/python/typing/issues/508
(I wanted to work on it, but never had time to, sorry).
This question appeared couple times before, and I think there are pros and cons
for both returning a ForwardRef() and for
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +11636
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35878>
___
_
Change by Ivan Levkivskyi :
--
keywords: +patch, patch, patch
pull_requests: +11636, 11637, 11638
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
101 - 200 of 681 matches
Mail list logo