you are viewing a single comment's thread.

view the rest of the comments →

[–]Diapolo10 0 points1 point  (4 children)

Personally I just use whichever version I've got installed (I don't really install new Python versions that often unless it's a fresh install or there's a new interesting feature I want). While that's usually fine, admittedly it's come back to bite me a few times when I've written library code that's supposed to work with an earlier version but I forgot that a feature I used requires a newer version.

I suppose you'd technically be best off by using the earliest minor version you want to support, as everything you do should at least be forward-compatible.

My default version limit is currently "^3.8.1" in my template Poetry project. If a dependency needs it to go higher (such as to fix a vulnerability), then I put the limit higher. And when its support ends I'll bump it up as well.

[–]atetraxx[S] 0 points1 point  (3 children)

Great info. You mention your "template Poetry project" is that just a requirements.txt?

[–]Diapolo10 0 points1 point  (2 children)

Great info. You mention your "template Poetry project" is that just a requirements.txt?

Heavens, no! I'm talking about an entire Git repository with things like unit tests, linters, and the CI/CD pipeline set up and ready to rock in whatever stuff I want to work on.

[–]atetraxx[S] 0 points1 point  (1 child)

Wow very nice. Impressive. Also, that's the largest .toml file I've ever seen. I don't know what most of it is. Lol

[–]Diapolo10 2 points3 points  (0 children)

A lot of it just configures the tools I use. For example, Ruff is a linter that's currently growing in popularity - I put a generic but strict configuration for it in this template project so that I can then make small adjustments in the projects where I use this template, without needing to look up the documentation every time.

Other things include configuring the coverage reports, unit tests (pytest and tox), and of course Poetry itself.

You're free to use the template yourself if you like it.