DiamondLightSource / python3-pip-skeleton

Archived in favour of https://github.com/DiamondLightSource/python-copier-template
Apache License 2.0
4 stars 4 forks source link

Discussion: Linting auto installs using latest version of Python #155

Open callumforrester opened 10 months ago

callumforrester commented 10 months ago

The lint CI job automatically works with the latest version of Python. When a new version of Python is released, a projects particular dependencies may cause non-obvious.

At least 2 repositories in DiamondLightSource have been affected by a recent switch to Python3.12. See https://github.com/DiamondLightSource/mx_bluesky/actions/runs/6667521161/job/18122365120?pr=55.

The fix is to pin the Python version in .github/actions/install_requirements/action.yml.

Should we consider baking a known latest version into skeleton and manually updating/expecting projects to be updated by their maintainers?

AlexanderWells-diamond commented 10 months ago

I would prefer to see the Python version specified in the code.yml file - it's already an optional argument to the action. I suppose we could also pin the default at e.g. 3.11 or somesuch, but I think it's better to make it clearer in the top level CI file what version of Python will be used.

DominicOram commented 10 months ago

I actually think we shouldn't pin it in the skeleton. If individual projects want to pin then that's fine but it's useful as a canary for later python versions. In fact, I think we should add a job that runs the tests against the latest python version too.

DominicOram commented 10 months ago

If anyone comes here looking for a fix for the original issue: https://github.com/mdavidsaver/p4p/pull/126