Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Test failures with Python 3.8.0a2 #287
Those are the test failures I get with Python 3.8.0a2:
(I needed to apply #286 first.)
Most of the failures are some kind of
Seems like some values are missing in the rendered code, but I really have no idea.
referenced this issue
Apr 11, 2019
Note that now we get Pylons/pyramid_mako#47:
So apparently, the Constant object can has different attributes.
This mentions that:
But in Mako, the following attributes are used:
Now, the fix adds:
But that only fixes it for the tested case. In fact, for pyramid-mako, node.value fixes the tested case.
I am not familiar with the _ast classes, but I think either there must be other attribute, or some kind of trial and error must be used instead.
Ok, so this works:
>>> import ast >>> c = ast.Constant('a') >>> c.value 'a' >>> c.n 'a' >>> c.s 'a'
But this doesn't:
>>> import _ast >>> c = _ast.Constant('a') >>> c.value 'a' >>> c.n Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Constant' object has no attribute 'n' >>> c.s Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Constant' object has no attribute 's'
this is weird:
but in the test suite, same python, it's there - why?
this is in _ast.py....
Sooooooo....going to figure this out very shortly? moment
here is what's happening:
so there's really no way to test this, it's just, there it is, fix it....is Constant in 3.7 and earlier at all ?