Closed loreloc closed 1 month ago
Perhaps use this just one time to upgrade all the type hints from Python 3.8 to 3.9. https://adamj.eu/tech/2021/05/21/python-type-hints-how-to-upgrade-syntax-with-pyupgrade/ https://github.com/asottile/pyupgrade
Just to note that I have left some # FURURE
comments in the repo. Those with the corresponding version can be cleaned every time we move to the next Python version.
We decided to move directly to Python 3.10. Motivation: 3.10 is the default python version in the oldest Ubuntu LTS version. Also, https://colab.google/articles/py3.10
we might need to double-check, e.g. (main as of today) https://github.com/april-tools/cirkit/blob/1d4f8f3e5f344744a99c936e70ba1798a1fddb7b/cirkit/templates/region_graph/graph.py#L15
re-opening with lo-pri
EDIT: seems pylint can catch this #244
That one is now fixed in main, but I do not know if there is an automatic way to check for this kind of issues without reading the whole pylint output.
I am going to close this, since there is no reliable and automatic way to check that we are always using the latest python features.
As suggested by @lkct, upgrade the whole repository to Python 3.9 (EOL Oct 2025) or Python 3.10 (EOL Oct 2026). I guess many things about typing have changed. https://devguide.python.org/versions/