python-package-template icon indicating copy to clipboard operation
python-package-template copied to clipboard

Support new python minor versions

Open b-jazz opened this issue 2 years ago • 1 comments

🐛 Bug Report

Newer python versions like 3.10 and 3.11 should be supported.

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. Note that in files like cookiecutter.json, there is no mention of 3.10 or 3.11

Code sample

Environment

  • OS: [e.g. Linux / Windows / macOS]
  • Python version, get it with:
python --version

Screenshots

📈 Expected behavior

I should be able to specify a version of 3.10 so that when I run pyupgrade, it will properly use the --py310-plus argument for example.

📎 Additional context

b-jazz avatar Nov 28 '22 05:11 b-jazz

Hmm, this is another bug/pull-request pair that I was going to make, but I can't figure out how to make 2 separate Pull Requests with my two most recent commits to my fork. Just a fundamental misunderstanding of how PRs work on my part.

You can find the change I made here though if you want to peruse it:

https://github.com/b-jazz/python-package-template/commit/00a52e70750445ac83cb4a140c771c21531aeb53

I had to turn the list of python versions into strings though because [3.9, 3.10, 3.11] would get treated as [3.9, 3.1, 3.11]. It looks like there was already code in place to cast strings to integers in the jinja template, so simply putting double quotes around them in toml appears to be all you need to do.

b-jazz avatar Nov 28 '22 06:11 b-jazz