-
Notifications
You must be signed in to change notification settings - Fork 249
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
Copy ClassVar upstream #280
Conversation
It looks like tests for 3.6 are failing because they are run on 3.6a4
other tests are OK |
I removed the test modules, anyway they are failing now (SyntaxError), but they will be in 3.6b1 test suite and will work. |
@@ -5,7 +5,7 @@ | |||
import sys | |||
from unittest import TestCase, main, skipUnless, SkipTest | |||
if sys.version_info[:2] >= (3, 6): | |||
import ann_module, ann_module2, ann_module3 | |||
from test import ann_module, ann_module2, ann_module3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I think this points to a different problem.
The stdlib tests for variable annotations syntax should be moved to a different file altogether (maybe test_annotations.py?). Then we won't need this stuff here. (Also, I really want the text of typing.py and test_typing.py to be identical in Py3.5, Py3.6, and here.)
Regarding the test failure for the 3.6 nightly build, some guesses as to why it fails to import ann_module from test:
|
Hm, I just looked more carefully and those three modules are imported to test get_type_hints(). I think that can to be done somewhat differently, using the same pattern as used for PY35_TESTS. |
@gvanrossum
I import modules, to check that |
Looks like the nightly build doesn't even have PEP 526 support yet... Let's just wait a day. |
Can you at least get that test to pass with a 3.6 built from the HEAD locally? |
I just did
|
try make clean or make clobber? On Fri, Sep 9, 2016 at 2:28 PM, Ivan Levkivskyi [email protected]
--Guido van Rossum (python.org/~guido) |
Or cp Modules/Setup.dist Modules/Setup On Fri, Sep 9, 2016 at 2:30 PM, Guido van Rossum [email protected]
--Guido van Rossum (python.org/~guido) |
OK, I managed that and get these errors:
|
@gvanrossum |
@gvanrossum
|
OK, but the previous version of test_typing still passes! |
Do you need more help? |
I will try to fix it, and if will not manage within 30 minutes, then I will ask for help :-) Thanks! |
I have fixed all tests locally, the most important fix was to also copy typing to hg tip that means that python/typing is ahead and here are some changes that are not integrated in master hg repo. The easiest fix would be to just copy what we have here (both typing and test_typing) to master hg repo. Could you please do this (of course if you are satisfied with the PR)? |
Yay! It works! I'll wait to merge until the nightly build has variable annotations. I also want to port this to the cpython repo. |
@gvanrossum |
Thanks!! |
I added ClassVar to both Python2 and Python3 (and new version of get_type_hints to Python3 version) in a backward compatible manner.
@gvanrossum Please, take a look.