Closed
Description
PEP 484 will drop its provisional status at some point. I hope this will happen in time for 3.6.
I propose to create a milestone to estimate how much work should be done before this happens.
Here are some issues that I propose to add to this milestone:
Big things:
- The notorious Kill __subclasscheck__ #136 (and Bare Union, Callable and Tuple should not be classes #133, typing.MutableMapping not a drop-in replacement for collections.abc.MutableMapping #203 that depend on it). This bug requires substantial changes to typing.py. However, it does not require PEP change and there is already a PR Fix generics inheritance and drop __subclasscheck__ #207 so that probably it will not take too much time.
- Protocols (a.k.a. structural subtyping) #11 (Protocols) It looks like a very convenient tool, and it is suitable for Python's duck-typing. There is already a concrete proposal by @JukkaL Protocols (a.k.a. structural subtyping) #11 (comment) that was positively accepted at python-ideas.
Smaller things:
- Introduce an Intersection #213 (
Intersection
) This will be very easy to implement in typing.py. It will work nicely with protocols. Also I could speculate that mypy implementation will not be too difficult (it should be similar toUnion
). - Make Callable more flexible #239 and Proposal: Generalize
Callable
to be able to specify argument names and kinds #264 (flexibleCallable
) This feature has been requested several times, and it is really easy to implement in typing.py, there are some detail to discuss. - Allow subclassing without supertyping #241 and Declaring classes as pure mixins #246 (
Implementation
) It seems that an agreement on this is quite close. - Decide how to handle str/unicode #208 how to handle str/unicode.
- A way to spell "SelfType", the type of self #271 SelfType and type annotations of classmethods? I am not sure about this one.
I could volunteer to take care about all of the above except #11 (it probably will be better done by Jukka) and SelfType. By "take care" I mean make PRs to PEPs and typing.py. However, I do not exclude also working on some of these in mypy if necessary. I think it is not necessary for mypy to support all the features at the point when PEP 484 drops provisional status, they could be implemented later.
Metadata
Metadata
Assignees
Labels
No labels