Closed rodrigomelo9 closed 4 years ago
From #136 it looks like almost all of the tests, including this one, fail with Python 3.5 but pass for later versions. It works for me with 3.6, and looking at the CI run the only failure for 3.6 was for test_verible_lint_default
that needs the reference data updated (#135).
It looks like we have a lot of cleanup to do if we want to support 3.5!
From the diff I see that the argument order has changed. I highly value reproducability to minimize unnecessary changes in the generated files between builds, so I would like this to be fixed. The dicts that contain the generic/vlogparam key/value pairs are already OrderedDicts, so they should be stable as long as the insertion order is unchanged.
This probably means that there have been some changes to the order if which the arguments are parsed. Perhaps the easiest way is just to ignore the insertion order and sort them just before they are actually written to the tcl file. This would mean a lot more places to patch, I guess. Also weird that only the vivado backend is affected by this. Not sure about anything right now
Hi @olofk.
Also weird that only the vivado backend is affected by this.
I only executed the vivado test, because it was where I was working (#133). I am using Debian 9, so my default Python is 3.5. @GCHQDeveloper560 commented::
From #136 it looks like almost all of the tests, including this one, fail with Python 3.5 but pass for later versions.
Regards
I've got a couple of fixes in my py35 branch that allow everything except test_vunit
to pass for me.
There were a couple of places involving generics/parameters where OrderedDict
wasn't used that broke test_vivado
(and likely other) tests.
The vunit tests imported typing.Collections
, which is new for 3.6, so this also caused errors. These were unused imports, so I just removed them. There's still a vunit failure I've not figured out, as there's a lot going on in test_vunit_hooks
.
FAILED tests/test_vunit.py::test_vunit_hooks - AttributeError: assert_called_once
Any ideas on that one are appreciated, or I'll just submit a PR for these fixes.
That's fantastic! I would like to support Python 3.5 for still some time but worried it would be hard to fix. Many thanks. Please submit what you have. Worst case we just mark that particular vunit case as an expected fail when running with python 3.5
I looked at the vunit
failure again. I did more unused import cleanup looking for the problem, but removing these didn't change anything. It looks like the actual problems were another OrderedDict
needed to replace a dict comprehension and use of unittest.mock.assert_called_once()
which is new for 3.6+.
The need to use OrderedDict
for almost every dict in the tests where we're comparing files is going to make it difficult to keep the tests for 3.5 working unless we're careful.
I rebased the branch against master so that it applies cleanly and submitted #143
I see the tests include Python 2.7 and they're not surprisingly failing. I didn't look long but fixed the first layer of failures with the dict unpacking in test_quartus.py
and lack of support for unittest.mock
but there was another longer list of failures after that.
Does Edalize intend to support Python 2? If not should we add that restriction to setup.py
and turn off the tests?
@GCHQDeveloper560 fusesoc remoed Python 2.7 support, there has been no discussion or decision on edalize yet. I've opened https://github.com/olofk/edalize/issues/144 to track that.
For now it's probably OK to disable the tests for Python 2.7 (as they are already broken), and then fix them or disable them depending on how we want to move on. Can you do that in #143?
All tests are green in CI now.
I made some
diff
to see changes: