Upgrade to Python 3.12
ChrisNeedham24 opened this issue · 3 comments
ChrisNeedham24 commented
- Jump straight from 3.10 to 3.12 - there wasn't anything in 3.11 that I thought was worth upgrading for.
- Update documentation to reflect that 3.12 is required.
- Consider whether there are places where we could declare custom types (e.g.
type Location = Tuple[int, int]) - Replace usages of
split_list_into_chunks()incalculator.pywithitertools.batched()- can remove the custom function and its test afterwards. - Determine whether there are any multi-line f-strings we could use.
- Deal with any other warnings that may appear.
ChrisNeedham24 commented
Will also need to update nuitka since the current version only experimentally supports 3.11/3.12.
ChrisNeedham24 commented
Acceptance Criteria:
- Bump Python version in GitHub actions (
.github/workflows/ci.ymland.github/workflows/bundle.yml) to the latest available patch version of 3.12. - Update
README.mdandCONTRIBUTING.mdto refer to Python 3.12 rather than 3.10. - Investigate and determine whether there are any places where custom types (e.g.
type Location = Tuple[int, int]would make sense, and implement them if so. - Replace usages of
split_list_into_chunks()incalculator.pywithitertools.batched(). - Remove the
split_list_into_chunks()function fromcalculator.pyand its test fromtest_calculator.py. - Investigate and determine whether there are any cases where we would benefit from using multi-line f-strings, and implement them if so.
- Remove any warnings that appear in your IDE (PyCharm is usually good for this).
ChrisNeedham24 commented
Will also need to update pyproject.toml to remove 3.10 and 3.11 as supported.