Problem
Current version of src/config does not support using Python versions 3.8 or 3.9. Two primary drivers of the issue are:
- The
tomllib library was implemented in version 3.11 onward. It was backported to earlier versions as tomli.
- Type hints were added by default in version 3.9 onward. Prior to that it was required to import Typing libraries to enable that function.
Impact
Users working with Python 3.8.x or 3.9.x cannot run the tool.
Steps to Reproduce
- Using
pyenv, install python versions 3.8.x and 3.9.x.
- Create a venv with each of the installed versions.
- Follow the steps to run the tool in either virtual environment.
- Error occurs when attempting to import tomllib or use the current syntax for type hints.
Expected
The tool should run without error for users of Python version 3.8.x and 3.9.x.
Proposed Fix
In order to bring this into compliance with the Code Standards which require compatibility with Python versions 3.8+:
- Create try/except in
src/config to install the expected version of tomllib/tomli.
- Explicitly import typing library if run with a compatible version.
- Wishlist: Add logic to
src/config to check that user is running the tool with a compatible version of Python.
Acceptance Criteria
The tool should run as long as the user is running the tool with a version of Python >= 3.8 +.
Problem
Current version of
src/configdoes not support using Python versions 3.8 or 3.9. Two primary drivers of the issue are:tomlliblibrary was implemented in version 3.11 onward. It was backported to earlier versions astomli.Impact
Users working with Python 3.8.x or 3.9.x cannot run the tool.
Steps to Reproduce
pyenv, install python versions 3.8.x and 3.9.x.Expected
The tool should run without error for users of Python version 3.8.x and 3.9.x.
Proposed Fix
In order to bring this into compliance with the Code Standards which require compatibility with Python versions 3.8+:
src/configto install the expected version of tomllib/tomli.src/configto check that user is running the tool with a compatible version of Python.Acceptance Criteria
The tool should run as long as the user is running the tool with a version of Python >= 3.8 +.