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

Use Constant.value, not Constant.n #292

Closed
wants to merge 1 commit into from
Closed

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Apr 11, 2019

Since Python 3.8, class ast.Constant is used for all constants.
Old classes ast.Num, ast.Str, ast.Bytes, ast.NameConstant and
ast.Ellipsis are still available, but they will be removed in
future Python releases.

Constants have values, but not always ns.

See #287 (comment)
See python/cpython#9445
Fixes Pylons/pyramid_mako#47

Since Python 3.8, class ast.Constant is used for all constants.
Old classes ast.Num, ast.Str, ast.Bytes, ast.NameConstant and
ast.Ellipsis are still available, but they will be removed in
future Python releases.

Constants have values, but not always ns.

See sqlalchemy#287 (comment)
See python/cpython#9445
Fixes Pylons/pyramid_mako#47
@zzzeek
Copy link
Member

zzzeek commented Apr 11, 2019

OK we can't really test reasonably, source code inspection reveals Constant.n Constant.s are completely bogus im not sure why they added them

@zzzeek zzzeek requested a review from sqla-tester April 11, 2019 16:02
Copy link
Collaborator

@sqla-tester sqla-tester left a comment

Choose a reason for hiding this comment

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

OK, this is sqla-tester setting up my work to try to get revision b48081a of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester
Copy link
Collaborator

New Gerrit review created for change b48081a: https://gerrit.sqlalchemy.org/#/c/sqlalchemy/mako/+/1188

@sqla-tester
Copy link
Collaborator

mike bayer (zzzeek) wrote:

Verified+1 Code-Review+2 Workflow+1

@sqla-tester
Copy link
Collaborator

Gerrit review https://gerrit.sqlalchemy.org/1188 has been merged. Congratulations! :)

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.

Python 3.8 test error: AttributeError: 'Constant' object has no attribute 'n'
3 participants