Skip to content

Upgraded from 3.7 to 3.8 and added 3.11

Akmod requested to merge Akm0d/pop-config:37811 into master

Objective: This task is aimed at updating the pop-config Python library to drop support for Python 3.7, update pre-commit hooks to use Python 3.8, and add support and testing for Python 3.11. Additionally, this includes bumping the minor version of the project and creating a new release.

Background: As Python evolves, it's essential to update the pop-config library to keep up with the changes and ensure compatibility with the latest versions. Python 3.7 is nearing its end-of-life, and Python 3.11 is the latest version. It is a good practice to remove support for older versions and to add support for the new ones, ensuring maintainability and leveraging new features when needed.

Tasks:

Drop Support for Python 3.7: a. Remove Python 3.7 from noxfile.py. b. Update setup.py and pyproject.toml files to specify that the minimum Python version supported is 3.8. c. Update the documentation to indicate that Python 3.7 is no longer supported.

Update Pre-Commit Hooks: a. Update the .pre-commit-config.yaml file to change the hooks that use py37 as the base to use py38. b. Run pre-commit autoupdate to automatically update the hooks. c. Ensure that all hooks are running successfully. If not, address any issues that arise.

Update .gitlab-ci.yaml for Python 3.11 Testing: a. Remove Python 3.7 from the testing matrix in .gitlab-ci.yaml. b. Add Python 3.11 to the testing matrix in .gitlab-ci.yaml. c. Ensure that the CI pipeline passes for Python 3.11, and address any issues that arise.

Update Pre-Commit Hooks for Python 3.11: a. Update the relevant hooks in .pre-commit-config.yaml to run pip-tools-compile for Python 3.11. b. Remove pip-tools-compile for Python 3.7 in the hooks. c. Ensure that hooks are configured correctly and are running as expected.

Bump Minor Version and Release: a. Increment the minor version number in setup.py and/or pyproject.toml. b. Update the CHANGELOG.md with the details of the changes made including dropping support for Python 3.7 and adding support for Python 3.11. c. Create a new Git tag for this version. d. Build and publish the package to the Python Package Index (PyPI). e. Create a release on the repository hosting service (e.g., GitLab) including the new tag, and link to the changelog entry for this version.

Documentation and Changelog: a. Update the documentation to include that Python 3.11 is now supported and the new version number. b. Document any significant changes made during this task in the changelog.

Pull Request and Review: a. Create a pull request with the changes. b. Ensure that the CI/CD pipeline passes. c. Request code reviews and address any feedback received. d. Merge the changes after approval.

Acceptance Criteria:

Python 3.7 support is dropped, and Python 3.7-specific constructs are removed. Pre-commit hooks are updated to use Python 3.8 as the base instead of Python 3.7. Python 3.11 is supported and included in the CI testing matrix. Pre-commit hooks are configured to use pip-tools-compile for Python 3.11 and have dropped it for Python 3.7. The minor version of the project is incremented. A new release is created and published to PyPI. The documentation is updated accordingly. The CI/CD pipeline passes successfully. The pull request is reviewed, approved, and merged.

Merge request reports