CityOfZion / neo-boa

Python compiler for the Neo2 Virtual Machine, see neo3-boa for NEO3
MIT License
69 stars 55 forks source link

Fix abi generation using Python 3.8 #137

Open meevee98 opened 4 years ago

meevee98 commented 4 years ago

What problem does this PR solve? The abi file generation using Python 3.8+ wasn't including any methods.

How did you solve this problem? Passed the blocks that define the abi decorators codes to the method constructor as extra codes. Also included a verification, so python versions before 3.8 use the same code that was already working.

How did you make sure your solution works? Ran the same unit tests that are working in Python 3.7, but using Python 3.8 instead

lock9 commented 4 years ago

Hi @ixje , can you review this?

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.7%) to 89.153% when pulling 80752ce9ccdc6b531ab376cbe54432a4f7515b69 on simplitech:fix-abi-methods into 9c23baf151ff8703bc00d93a94ebf422cfc68e56 on CityOfZion:development.

meevee98 commented 4 years ago
  • Note: the tests seems to fail here on 3.8

@ixje It seems that the tests were failing on 3.8 before this pull request as well. I'm fixing the unit tests, but there's going to be many modifications in the code. Do you think it's better to fix the tests on this pull request or open another one for the fixes?

ixje commented 4 years ago

@meevee98 I didn't realize they were always failing on 3.8. I think it would be best to do it on a different PR and we can merge this PR afterwards. Note: we have to move the .travis.yml changes done here to that PR as well. Thanks!