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

Python 3.8 issues #704

Closed
splhack opened this issue May 27, 2020 · 3 comments
Closed

Python 3.8 issues #704

splhack opened this issue May 27, 2020 · 3 comments

Comments

@splhack
Copy link
Contributor

splhack commented May 27, 2020

pytest tests has two issues with Python 3.8.2 (Ubuntu 20.04 default)

First. test_old_io_syntax metadata lineno differences

diff --git a/tests/test_deprecated/test_old_io_syntax/gold/test_for_loop_def.json b/tests/test_deprecated/test_old_io_syntax/gold/test_for_loop_def.json
index 1b8d5f27..58cabd81 100644
--- a/tests/test_deprecated/test_old_io_syntax/gold/test_for_loop_def.json
+++ b/tests/test_deprecated/test_old_io_syntax/gold/test_for_loop_def.json
@@ -8,7 +8,7 @@
           ["I1","BitIn"],
           ["O","Bit"]
         ]],
-        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"55"}
+        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"54"}
       },
       "main":{
         "type":["Record",[
diff --git a/tests/test_deprecated/test_old_io_syntax/gold/test_interleaved_instance_wiring.json b/tests/test_deprecated/test_old_io_syntax/gold/test_interleaved_instance_wiring.json
index a0978e76..21b8d494 100644
--- a/tests/test_deprecated/test_old_io_syntax/gold/test_interleaved_instance_wiring.json
+++ b/tests/test_deprecated/test_old_io_syntax/gold/test_interleaved_instance_wiring.json
@@ -8,7 +8,7 @@
           ["I1","BitIn"],
           ["O","Bit"]
         ]],
-        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"87"}
+        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"86"}
       },
       "main":{
         "type":["Record",[
diff --git a/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def.json b/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def.json
index 157f94a0..a70e1d30 100644
--- a/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def.json
+++ b/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def.json
@@ -8,7 +8,7 @@
           ["I1","BitIn"],
           ["O","Bit"]
         ]],
-        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"14"}
+        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"13"}
       },
       "main":{
         "type":["Record",[
diff --git a/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def_class.json b/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def_class.json
index 76807617..8d5bf14c 100644
--- a/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def_class.json
+++ b/tests/test_deprecated/test_old_io_syntax/gold/test_simple_def_class.json
@@ -8,7 +8,7 @@
           ["I1","BitIn"],
           ["O","Bit"]
         ]],
-        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"14"}
+        "metadata":{"filename":"tests/test_deprecated/test_old_io_syntax/test_old_io_syntax_define.py","lineno":"13"}
       },
       "Main":{
         "type":["Record",[

Second. test_jtag.py recursion error. regardless with or without #703

pytest tests/test_syntax/test_coroutine/test_jtag.py
E               RecursionError: maximum recursion depth exceeded while calling a Python object
@leonardt
Copy link
Collaborator

Thanks for reporting this, I'll take a look. It's likely that the metadata lineno thing can be updated, but it might be a bit annoying to make sure the tests work with 3.7 and 3.8, I"ll have to look at the code to see why this is happening, but it seems like Python may have changed how it stores this metadata in the AST.

Not sure about the jtag test, will take a look

@cdonovick
Copy link
Collaborator

cdonovick commented Jun 13, 2020

@leonardt one more reason to move to LibCST

@splhack
Copy link
Contributor Author

splhack commented Jul 29, 2020

No longer see the issues on 6adc6ee

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

No branches or pull requests

3 participants