Python compatibility clarifications #26
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python 3.5.2 turned out to be unsupported because there was an issue in the static typing library: python/typing#308. The issue has been fixed in Python 3.5.3, so all newer versions function correctly. This is how you can reproduce the problem:
The above is the expected behavior observable in Python 3.5.3+. In 3.5.2 you get this instead:
An alternative solution would be to remove the offending type annotations, which you can look at here:
https://github.com/UAVCAN/pydsdl/blob/9a0bd72b4fd298e96c57f77e3c9a48b6fe1ee70a/pydsdl/_expression.py#L563-L565
However, I would rather not do that because that would require us to plaster the code with linter suppression comments and doing so for the sake of an ancient version of the interpreter (which will be EOLed next year) doesn't seem particularly sensible.
Should we accept this change, or should we add workarounds instead and retain compatibility with all v3.5.x?