Skip to content

Python 2.7 support #164

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

Merged
merged 2 commits into from
Oct 28, 2015
Merged

Python 2.7 support #164

merged 2 commits into from
Oct 28, 2015

Conversation

vlasovskikh
Copy link
Member

Lots of changes in the backport to Python 2.7. Please review the 2aa1374 commit. It's the diff between Python 2 and 3.

The Python 2 port is located in python2/. Other options were:

* Having a separate branch for Python2 => cannot create a single typing
  package for PyPI
* Storing a diff file for Python 2 and apply a patch when creating a
  source package => hard to do on Windows and CI servers

The current approach requires applying new changes in src/ to python2/
manually or patching python2/ with diffs from commits.

get_type_hints() does nothing and it is untested, since there are no
__annotations__ for functions in Python 2.

_root=True backported as the TypingMeta.assert_no_subclassing() check
that you have to call explicitly.
@vlasovskikh
Copy link
Member Author

Fixes #160.

@o11c
Copy link
Contributor

o11c commented Oct 27, 2015

Conflicts are due to the removal of unused imports on current master, should be easy to rebase.

@vlasovskikh vlasovskikh merged commit 2aa1374 into master Oct 28, 2015
@vlasovskikh vlasovskikh deleted the python2 branch October 28, 2015 09:42
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.

2 participants