- Notifications
You must be signed in to change notification settings - Fork282
Copy ClassVar upstream#280
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ilevkivskyi commentedSep 9, 2016
It looks like tests for 3.6 are failing because they are run on 3.6a4 other tests are OK |
ilevkivskyi commentedSep 9, 2016
I removed the test modules, anyway they are failing now (SyntaxError), but they will be in 3.6b1 test suite and will work. |
src/test_typing.py Outdated
| fromunittestimportTestCase,main,skipUnless,SkipTest | ||
| ifsys.version_info[:2]>= (3,6): | ||
| importann_module,ann_module2,ann_module3 | ||
| fromtestimportann_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.)
gvanrossum commentedSep 9, 2016
Regarding the test failure for the 3.6 nightly build, some guesses as to why it fails to import ann_module from test:
|
gvanrossum commentedSep 9, 2016
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. |
ilevkivskyi commentedSep 9, 2016
@gvanrossum I import modules, to check that |
gvanrossum commentedSep 9, 2016
Looks like the nightly build doesn't even have PEP 526 support yet... Let's just wait a day. |
gvanrossum commentedSep 9, 2016
Can you at least get that test to pass with a 3.6 built from the HEAD locally? |
ilevkivskyi commentedSep 9, 2016
I just did |
gvanrossum commentedSep 9, 2016
try make clean or make clobber? On Fri, Sep 9, 2016 at 2:28 PM, Ivan Levkivskyinotifications@github.com
--Guido van Rossum (python.org/~guido) |
gvanrossum commentedSep 9, 2016
Or cp Modules/Setup.dist Modules/Setup On Fri, Sep 9, 2016 at 2:30 PM, Guido van Rossumnotifications@github.com
--Guido van Rossum (python.org/~guido) |
gvanrossum commentedSep 9, 2016
OK, I managed that and get these errors: |
ilevkivskyi commentedSep 9, 2016
@gvanrossum |
ilevkivskyi commentedSep 9, 2016
@gvanrossum |
ilevkivskyi commentedSep 9, 2016
OK, but the previous version of test_typing still passes! |
gvanrossum commentedSep 9, 2016
Do you need more help? |
ilevkivskyi commentedSep 9, 2016
I will try to fix it, and if will not manage within 30 minutes, then I will ask for help :-) Thanks! |
ilevkivskyi commentedSep 9, 2016
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)? |
gvanrossum commentedSep 9, 2016
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. |
ilevkivskyi commentedSep 10, 2016
@gvanrossum |
gvanrossum commentedSep 10, 2016
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.