You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
antsibull currently supports Python 3.6 and above. I propose increasing the bumping Python version to 3.8. For one thing, the latest Ansible release to support below Python 3.8 (on the controller) was 2.11/4, so antsibull is useless on older Python versions for building new ansible releases. Currently, there are multiple TODO: PY3.8 comments throughout the codebase:
$ rg 'TODO: PY3.8'antsibull/src/antsibull/build_ansible_commands.py: # TODO: PY3.8:antsibull/src/antsibull/build_ansible_commands.py: # TODO: PY3.8:antsibull-core/src/antsibull_core/ansible_core.py: # TODO: PY3.8: while chunk := await response.read(lib_ctx.chunksize):antsibull-core/src/antsibull_core/dependency_files.py: # TODO: PY3.8:antsibull-core/src/antsibull_core/utils/hashing.py: # TODO: PY3.8: while chunk := await f.read(ctx.chunksize):antsibull-core/src/antsibull_core/galaxy.py: # TODO: PY3.8: self.collection_cache: t.Final[t.Optional[str]] = collection_cacheantsibull-core/src/antsibull_core/galaxy.py: # TODO: PY3.8: We can use t.Final in __init__ instead of cast here.antsibull-core/src/antsibull_core/galaxy.py: # TODO: PY3.8: while chunk := await response.content.read(lib_ctx.chunksize):antsibull-core/src/antsibull_core/galaxy.py: # TODO: PY3.8: We can use t.Final in __init__ instead of cast here.antsibull-core/src/antsibull_core/utils/io.py: # TODO: PY3.8: while chunk := await f.read(lib_ctx.chunksize)
Amongst other improvements, we'd able to take advantage of new type-hinting enhancements from Python 3.9 and 3.10 by using from __future__ import annotations. E.g., t.Dict[str, str] > dict[str, str] and t.Optional[str] -> str | None. (We couldn't use the newer syntax on 3.8 in the pydantic models, but it's fair game everywhere else.)
The text was updated successfully, but these errors were encountered:
I thought about this earlier, but never got around to do that yet. Both antsibull and antsibull-changelog can easily go up to 3.8. I would probably stick to 3.8 for now and not use 3.9 though. The advantages of 3.9 are not that big that it's worth annoying devs who still stick to 3.8 for whatever reasons (this is more a problem for antsibull-changelog than for antsibull though).
antsibull currently supports Python 3.6 and above. I propose increasing the bumping Python version to 3.8. For one thing, the latest Ansible release to support below Python 3.8 (on the controller) was 2.11/4, so antsibull is useless on older Python versions for building new ansible releases. Currently, there are multiple
TODO: PY3.8
comments throughout the codebase:Amongst other improvements, we'd able to take advantage of new type-hinting enhancements from Python 3.9 and 3.10 by using
from __future__ import annotations
. E.g.,t.Dict[str, str]
>dict[str, str]
andt.Optional[str]
->str | None
. (We couldn't use the newer syntax on 3.8 in the pydantic models, but it's fair game everywhere else.)The text was updated successfully, but these errors were encountered: