Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.7 #18

Merged
merged 13 commits into from
Mar 20, 2018
Merged

Support Python 3.7 #18

merged 13 commits into from
Mar 20, 2018

Conversation

ilevkivskyi
Copy link
Owner

Fixes #17

This adds support for upcoming Python 3.7. The typing module in this version was thoroughly reworked, but I tried to keep semantics as much close to the previous versions as possible.

@ilevkivskyi ilevkivskyi mentioned this pull request Mar 19, 2018
@ilevkivskyi ilevkivskyi changed the title [WIP] Support Python 3.7 Support Python 3.7 Mar 19, 2018
@Fuyukai
Copy link

Fuyukai commented Mar 20, 2018

This seems to work nearly drop-in on my code, so that's great.

I did notice that get_origin(X) returns a different type than before for things such as List or Tuple (which I had to work around), but I assume that it's part of typing3.7 rather than this library. The docstring should be changed though, since it reports the old incorrect return behaviour for some of these types.

@ilevkivskyi ilevkivskyi merged commit 7aa7bb5 into master Mar 20, 2018
@ilevkivskyi ilevkivskyi deleted the support-37 branch March 20, 2018 22:22
@ilevkivskyi
Copy link
Owner Author

I will make a new release on PyPI closer to the release date of Python 3.7, maybe we will need to adjust something, if there will be more changes in typing.

@@ -294,7 +294,7 @@ def get_args(tp, evaluate=None):
get_args(Callable[[], T][int], evaluate=True) == ([], int,)
"""
if NEW_TYPING:
if not evaluate:
if evaluare is not None and not evaluate:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean evaluate (not evaluare)?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean evaluate (not evaluare)?

Yes, thanks, this typo should be already fixed in the merged version.

calebmarchent pushed a commit to calebmarchent/python-nubia that referenced this pull request Dec 14, 2018
calebmarchent pushed a commit to calebmarchent/python-nubia that referenced this pull request Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken on 3.7b2
3 participants