Skip to content

Add support for Python3.8#1678

Merged
jacqueswww merged 7 commits into
vyperlang:masterfrom
iamdefinitelyahuman:py38-ast
Nov 11, 2019
Merged

Add support for Python3.8#1678
jacqueswww merged 7 commits into
vyperlang:masterfrom
iamdefinitelyahuman:py38-ast

Conversation

@iamdefinitelyahuman
Copy link
Copy Markdown
Contributor

What I did

Add support for Python 3.8

How I did it

  • Replace Constant python AST type with deprecated type names when generating Vyper AST nodes.
  • Add python3.8 build to CI

How to verify it

Run the tests

Description for the changelog

  • support for Python3.8

Cute Animal Picture

image

@fubuloubu
Copy link
Copy Markdown
Contributor

Huh, fuzzing actually caught something this time lol

@iamdefinitelyahuman
Copy link
Copy Markdown
Contributor Author

Failing test should be fixed by #1679

@iamdefinitelyahuman iamdefinitelyahuman marked this pull request as ready for review November 5, 2019 05:23
@fubuloubu
Copy link
Copy Markdown
Contributor

@iamdefinitelyahuman rebase master

@fubuloubu
Copy link
Copy Markdown
Contributor

I'd like to merge #1657 first and rebase on that to ensure we're playing with all the latest toys

Comment thread vyper/ast_utils.py Outdated
elif isinstance(node, python_ast.NameConstant):
class_name = "NameConstant"
else:
class_name = node.__class__.__name__
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure I understand the fix here, as far as I can tell all these types are replaced by Constant(value=) now, doesn't that mean we have to translate each constant type and port over the value attribute (e.g. .s for Str and .n for number) ?

Copy link
Copy Markdown
Contributor

@jacqueswww jacqueswww Nov 7, 2019

Choose a reason for hiding this comment

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

And would that mean something the replacement step would have to map something like isinstance(node.value, str) => vyper_ast.Str(s=node.value) (if isinstance(node, python_ast.Constant).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See new commits based on our discussion 👍

@fubuloubu
Copy link
Copy Markdown
Contributor

fubuloubu commented Nov 7, 2019

technically, eth-tester (and py-evm) doesn't support 3.8 yet. That could be why this is an issue.

cc @carver

@iamdefinitelyahuman iamdefinitelyahuman force-pushed the py38-ast branch 4 times, most recently from 24d5e4f to cbefaa8 Compare November 7, 2019 19:58
@carver
Copy link
Copy Markdown

carver commented Nov 7, 2019

technically, eth-tester (and py-evm) doesn't support 3.8 yet. That could be why this is an issue.

cc @carver

Ahh, it looks like it's the blake2b-py build that's not compatible somehow. cc @davesque

@davesque
Copy link
Copy Markdown
Contributor

davesque commented Nov 8, 2019

Spending some time on this today.

@davesque
Copy link
Copy Markdown
Contributor

davesque commented Nov 8, 2019

Just released blake2b-py v0.1.3 that includes support for python 3.8.

@jacqueswww jacqueswww merged commit 14aa9d6 into vyperlang:master Nov 11, 2019
@iamdefinitelyahuman iamdefinitelyahuman deleted the py38-ast branch November 11, 2019 16:24
@protolambda protolambda mentioned this pull request Jan 20, 2020
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.

5 participants