Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Docker: Pin to Python 3.7 #360

Closed robjwells closed 3 years ago

robjwells commented 3 years ago

The python:3 image uses the latest stable version of Python 3, whereas Throat's minimum supported version is currently 3.7. In particular, testing with a version > 3.7 can give misleading results. The Docker image should be bumped in line with Throat’s MSV.

happy-river commented 3 years ago

Could you clarify what misleading results you see with higher python versions? I'm running 3.8 and the tests are passing.

robjwells commented 3 years ago

Yes, sure — it’s not actually a problem in the current codebase or test suite. (I see now I was misleadingly vague in the original description!)

When I was working on #359 I used a feature which was only introduced in 3.8 (an additional signature for functools.lru_cache), and the test suite ran fine locally and via Docker, both of which were using the latest stable version (3.9.4). However, after creating the PR the CI build failed, as it runs against 3.7.10.

So this proposed change is really about having the Docker image reflect the minimum requirements of the project, rather than isolating the project from some unwanted behaviour in a more recent version of Python. This should let people develop against the Docker image with the confidence that if the suite runs fine there, the CI build will pass too.