Skip to content

Commit 218e87e

Browse files
authored
[TOOLING]: Upgrade to python 3.13.5 (#4094)
* Upgraded versions of Python for base image and for version matrix. * Upgraded refrences to supported Python versions and generally edited and updated links and docs. * Updated doc to reflect new fixes and changes in representer code. * Updated refrences to supported Python versions and changes to tooling and linting. * Updated lnks and refrences. * Updated pylintrc to match the analyzer pylintrc. Updated libs and python versions in requirements. * Changed requirements for generator to later version of dateutils and regenerated test files. * Regenerated test files this time with Python 3.13.5 Black, to match CI. * Added dateutil back in. Evidently, the generator needs it.
1 parent bc67d58 commit 218e87e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+440
-393
lines changed

.github/workflows/ci-workflow.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ name: Exercises check
66
on:
77
push:
88
branches:
9-
- master
109
- main
1110
pull_request:
1211

@@ -19,7 +18,7 @@ jobs:
1918
- name: Set up Python
2019
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2120
with:
22-
python-version: 3.11.2
21+
python-version: 3.13.5
2322

2423
- name: Download & Install dependencies
2524
run: |
@@ -53,20 +52,16 @@ jobs:
5352
needs: housekeeping
5453
strategy:
5554
matrix:
56-
python-version: [3.7, 3.8, 3.9, 3.10.6, 3.11.2]
55+
python-version: [3.10.6, 3.11.2, 3.12, 3.13.5]
5756
steps:
5857
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
5958

6059
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
6160
with:
6261
python-version: ${{ matrix.python-version }}
6362

64-
- name: Install dataclasses package
65-
if: ${{ matrix.python-version == '3.6' }}
66-
run: pip install dataclasses
67-
6863
- name: Install pytest
69-
run: pip install pytest~=7.2.2
64+
run: pip install pytest~=8.4.0
7065

7166
- name: Check exercises
7267
run: |

.github/workflows/test-runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
test-runner:
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1414
- name: Run test-runner

CONTRIBUTING.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Hi.  👋🏽  👋  **We are happy you are here.**  🎉&nb
3232
**`exercism/Python`** is one of many programming language tracks on [exercism(dot)org][exercism-website].
3333
This repo holds all the instructions, tests, code, & support files for Python _exercises_ currently under development or implemented & available for students.
3434

35-
🌟   Track exercises support Python `3.7` - `3.11.5`.
35+
🌟   Track exercises support Python `3.10` - `3.13.5`.
3636
Exceptions to this support are noted where they occur.
37-
🌟   Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.11.2`.
37+
🌟   Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.13.5`.
3838

3939
Exercises are grouped into **concept** exercises which teach the [Python syllabus][python-syllabus], and **practice** exercises, which are unlocked by progressing in the syllabus tree  🌴 .
4040
Concept exercises are constrained to a small set of language or syntax features.
@@ -71,15 +71,14 @@ We're leaving the track contributing docs below for our long-term collaborators
7171
<p vertical-align="middle"><h2 id="in-general">In General</h2></p>
7272
<br>
7373

74-
- Maintainers are happy to review your work and help troubleshoot with you.&nbsp;💛&nbsp;💙&nbsp;
74+
- Maintainers are happy to review your work and help troubleshoot with you.&nbsp;💛&nbsp;💙&nbsp; If you need help, comment in the Pull Request/issue.&nbsp; 🙋🏽‍♀️ &nbsp;
75+
- **Please wait at least 72 hours before pinging or `@`ing reviewers directly.**
7576
- Requests are reviewed as soon as is practical/possible.
76-
- (❗&nbsp;) Reviewers may be in a different timezone&nbsp;&nbsp;, or tied up &nbsp;🧶&nbsp; with other tasks.
77-
- **Please wait at least 72 hours before pinging.**
78-
- If you need help, comment in the Pull Request/issue.&nbsp; 🙋🏽‍♀️ &nbsp;
77+
- (❗&nbsp;) Keep in mind that reviewers may be in a different timezone&nbsp;&nbsp;, or tied up &nbsp;🧶&nbsp; with other tasks.
7978
- If you would like in-progress feedback/discussion, please mark your Pull Request as a **`[draft]`**
8079
- Pull Requests should be focused around a single exercise, issue, or change.
8180
- Pull Request titles and descriptions should make clear **what** has changed and **why**.
82-
- Please link &nbsp;🔗&nbsp; to any related issues the PR addresses.
81+
- Please link &nbsp;🔗&nbsp; to any related forum discussions or issues the PR addresses.
8382
- 📛&nbsp;[ Open an issue ][open-an-issue]📛&nbsp; and discuss it with &nbsp;🧰 &nbsp;maintainers _**before**_:
8483
- creating a Pull Request making significant or breaking changes.
8584
- for changes across multiple exercises, even if they are typos or small.
@@ -204,13 +203,13 @@ _We know it, and trust us, we are working on fixing it._ But if you see &nbsp;
204203

205204
<br>
206205

207-
This track officially supports Python `3.7 - 3.11.2` for students completing exercises.
208-
The track `test runner`, `analyzer`, and `representer` run in docker on `python:3.11.2-slim`.
206+
This track officially supports Python `3.10 - 3.13.5` for students completing exercises.
207+
The track `test runner`, `analyzer`, and `representer` run in docker on `python:3.13.5-alpine3.22`.
209208

210209
Although the majority of test cases are written using `unittest.TestCase`,
211210

212-
- All exercises should be written for compatibility with Python `3.7` - `3.11.2`.
213-
- Version backward _incompatibility_ (_e.g_ an exercise using features introduced in `3.8`, `3.9`, or `3.10`) should be clearly noted in any exercise hints, links, introductions or other notes.
211+
- All exercises should be written for compatibility with Python `3.10` - `3.13.5`.
212+
- Version backward _incompatibility_ (_e.g_ an exercise using features introduced in Python `3.10`+ that would not work in Python `3.10`) should be clearly noted in any exercise hints, links, introductions or other notes.
214213

215214
- Here is an example of how the Python documentation handles [version-tagged &nbsp;🏷&nbsp;][version-tagged-language-features] feature introduction.
216215

@@ -231,7 +230,7 @@ Although the majority of test cases are written using `unittest.TestCase`,
231230

232231
- For specifications, refer to [Concept Exercise Anatomy][concept-exercise-anatomy], or [Practice Exercise Anatomy][practice-exercise-anatomy] depending on which type of exercise you are contributing to.
233232

234-
- **Practice exercise**, descriptions and instructions come from a centralized, cross-track [problem specifications][problem-specifications] repository.
233+
- **Practice exercise** descriptions and instructions come from a centralized, cross-track [problem specifications][problem-specifications] repository.
235234

236235
- Any updates or changes need to be proposed/approved in `problem-specifications` first.
237236
- If Python-specific changes become necessary, they need to be appended to the canonical instructions by creating a `instructions.append.md` file in this (`exercism/Python`) repository.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Hi. &nbsp;👋🏽 &nbsp;👋 &nbsp;**We are happy you are here.**&nbsp; 🎉&nb
3434
**`exercism/Python`** is one of many programming language tracks on [exercism(dot)org][exercism-website].
3535
This repo holds all the instructions, tests, code, & support files for Python _exercises_ currently under development or implemented & available for students.
3636

37-
🌟 &nbsp;&nbsp;Track exercises support Python `3.7` - `3.11.5`.
37+
🌟 &nbsp;&nbsp;Track exercises support Python `3.10` - `3.13.5`.
3838
Exceptions to this support are noted where they occur.
39-
🌟 &nbsp;&nbsp;Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.11.5`.
39+
🌟 &nbsp;&nbsp;Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.13.5`.
4040

4141
Exercises are grouped into **concept** exercises which teach the [Python syllabus][python-syllabus], and **practice** exercises, which are unlocked by progressing in the syllabus tree &nbsp;🌴&nbsp;.
4242
Concept exercises are constrained to a small set of language or syntax features.
@@ -84,7 +84,7 @@ _Thoughtful suggestions will likely result in faster & more enthusiastic respons
8484

8585
## Python Software and Documentation
8686

87-
**Copyright © 2001-2025 Python Software Foundation. All rights reserved.**
87+
**Copyright © 2001-2026 Python Software Foundation. All rights reserved.**
8888

8989
Python software and documentation are licensed under the [PSF License Agreement][psf-license].
9090

docs/ABOUT.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Code can be written and executed from the command line, in an interactive interp
2020
The [zen of Python (PEP 20)][the zen of python] and [What is Pythonic?][what is pythonic] lay out additional philosophies and perspectives on the language.
2121

2222

23-
Tests and tooling for this track currently support `3.7` - `3.11.2` (_tests_) and [`Python 3.11.2`][311-new-features] (_tooling_).
24-
It is highly recommended that students upgrade to at least `Python 3.8`, as some features used by this track may not be supported in earlier versions.
23+
Tests and tooling for this track currently support `3.10` - `3.13.5` (_tests_) and [`Python 3.13.5`][313-new-features] (_tooling_).
24+
It is highly recommended that students upgrade to at least `Python 3.10`, as some features used by this track may not be supported in earlier versions.
2525
That being said, most of the exercises will work with `Python 3.6+`, or even earlier versions.
2626
But we don't guarantee support for versions not listed under [Active Python Releases][active-python-releases].
2727
We will try to note when a feature is only available in a certain version.
2828

2929

30-
Complete documentation for the current release of Python (3.11.x) can be found at [docs.python.org][python docs].
30+
Complete documentation for the current release of Python (3.13.x) can be found at [docs.python.org][python docs].
3131

3232
- [Python Tutorial][python tutorial]
3333
- [Python Library Reference][python library reference]
@@ -37,8 +37,8 @@ Complete documentation for the current release of Python (3.11.x) can be found a
3737
- [Python Glossary of Terms][python glossary of terms]
3838

3939

40-
[311-new-features]: https://docs.python.org/3/whatsnew/3.11.html
41-
[active-python-releases]: https://www.python.org/downloads/
40+
[313-new-features]: https://docs.python.org/3/whatsnew/3.13.html
41+
[active-python-releases]: https://devguide.python.org/versions/#full-chart
4242
[duck typing]: https://en.wikipedia.org/wiki/Duck_typing
4343
[dynamic typing in python]: https://stackoverflow.com/questions/11328920/is-python-strongly-typed
4444
[editors for python]: https://djangostars.com/blog/python-ide/
@@ -49,16 +49,16 @@ Complete documentation for the current release of Python (3.11.x) can be found a
4949
[peps]: https://www.python.org/dev/peps/
5050
[psf membership]: https://www.python.org/psf/membership/
5151
[psf]: https://www.python.org/psf/
52-
[python docs]: https://docs.python.org/3/
53-
[python faqs]: https://docs.python.org/3/faq/index.html
52+
[python docs]: https://docs.python.org/3.13/
53+
[python faqs]: https://docs.python.org/3.13/faq/index.html
5454
[python for beginners]: https://www.python.org/about/gettingstarted/
5555
[python glossary of terms]: https://docs.python.org/3/glossary.html
56-
[python how tos]: https://docs.python.org/3/howto/index.html
56+
[python how tos]: https://docs.python.org/3.13/howto/index.html
5757
[python is used extensively]: https://www.python.org/about/apps/
58-
[python language reference]: https://docs.python.org/3/reference/index.html
59-
[python library reference]: https://docs.python.org/3/library/index.html
60-
[python tutorial]: https://docs.python.org/3/tutorial/index.html
61-
[significant indentation]: https://docs.python.org/3/reference/lexical_analysis.html#indentation
58+
[python language reference]: https://docs.python.org/3.13/reference/index.html
59+
[python library reference]: https://docs.python.org/3.13/library/index.html
60+
[python tutorial]: https://docs.python.org/3.13/tutorial/index.html
61+
[significant indentation]: https://docs.python.org/3.13/reference/lexical_analysis.html#indentation
6262
[the zen of python]: https://www.python.org/dev/peps/pep-0020/
6363
[type hints]: https://docs.python.org/3/library/typing.html
6464
[what is pythonic]: https://blog.startifact.com/posts/older/what-is-pythonic.html

docs/INSTALLATION.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@ Some quick links into the documentation by operating system:
1414

1515
- [Windows][windows] Additionally, this Microsoft article on [installing Python on windows][python-on-windows] is helpful.
1616
- [Unix & Linux Systems][unix-and-linux] (_these largely work for MacOS as well_)
17-
- [MacOS][macos] : **This is outdated.**
18-
We recommend reviewing some of the methods outlined in the Real Python article [Installing Python][installing-python] or the articles by Brett Cannon linked above.
17+
- [MacOS][macos]
1918

19+
We also recommend reviewing some of the methods outlined in the Real Python article [Installing Python][installing-python] or the articles by Brett Cannon linked above.
2020

21-
Exercism tests and tooling currently support `3.7` - `3.11.5` (_tests_) and [`Python 3.11.5`][311-new-features] (_tooling_).
21+
22+
Exercism tests and tooling currently support `3.10` - `3.13.5` (_tests_) and [`Python 3.13.5`][313-new-features] (_tooling_).
2223
Exceptions to this support are noted where they occur.
2324
Most of the exercises will work with `Python 3.6+`, or even earlier versions.
2425
But we don't guarantee support for versions not listed under [Active Python Releases][active-python-releases].
2526

2627

27-
Please refer to the [Python 3.11.x documentation][3.11 docs] for what is currently supported.
28+
Please refer to the [Python 3.13.x documentation][3.13 docs] for what is currently supported.
2829

29-
[3.11 docs]: https://docs.python.org/3.11/
30-
[311-new-features]: https://docs.python.org/3/whatsnew/3.11.html
30+
[3.13 docs]: https://docs.python.org/3.13/
31+
[313-new-features]: https://docs.python.org/3/whatsnew/3.13.html
3132
[Python-three downloads]: https://www.python.org/downloads/
3233
[active-python-releases]: https://www.python.org/downloads/
3334
[helpful guide]: https://realpython.com/installing-python/
34-
[installing-python]: https://realpython.com/installing-python/#what-your-options-are_1
35+
[installing-python]: https://realpython.com/installing-python/
3536
[macos]: https://docs.python.org/3/using/mac.html
3637
[python-m-pip]: https://snarky.ca/why-you-should-use-python-m-pip/
3738
[python-on-windows]: https://docs.microsoft.com/en-us/windows/python/beginners

docs/LEARNING.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@ Below you will find some additional jumping-off places to start your learning jo
1313

1414

1515
- [Python Documentation Tutorial][Python Documentation Tutorial]
16+
- [Stanford Code in Place Course][code in place]
17+
- [Stanford Code in Place Self-Guided][cip self guided]
1618
- [Automate the Boring Stuff with Python (_book_)][automate the boring stuff]
17-
- [Automate the Boring Stuff Videos (_covers first 15 book chapters_)][automate the videos]
19+
- [Automate the Boring Stuff with Python Workbook (_exercises_)][automate the boring stuff workbook]
20+
- [Think Python][Think Python]
21+
- [Beyond the Basic Stuff with Python][beyond the basics]
22+
- [Beyond the Basic Stuff with Python Video][beyond the basics video]
23+
- [Python Programming Exercises, Gently Explained][PPEG]
24+
- [Python for Non-Programmers][python-for-non-programmers]
1825
- [Learn X in Y minutes (where X = Python3)][Learn X in Y minutes]
1926
- [Python at Free Code Camp][python at free code camp]
27+
- [Python at Khan Academy][python at kahn academy]
2028
- [Intro to Python (_python-course.eu_)][python-course.eu]
21-
- [Think Python][Think Python]
22-
- [Python for Non-Programmers][python-for-non-programmers]
23-
- [Python 4 Everyone][python4everyone]
2429
- [Googles Python Class][googles python class]
2530
- [Microsoft's Python Learning Path][MS Python]
2631
- [Introduction to Computer Science and Programming in Python (MIT)][mitocw600]
@@ -30,14 +35,19 @@ Below you will find some additional jumping-off places to start your learning jo
3035
[CS50P]: https://pll.harvard.edu/course/cs50s-introduction-programming-python?delta=0
3136
[Learn X in Y minutes]: https://learnxinyminutes.com/docs/python3/
3237
[MS Python]: https://docs.microsoft.com/en-us/learn/paths/python-language/
38+
[PPEG]: https://inventwithpython.com/pythongently/
3339
[Python Documentation Tutorial]: https://docs.python.org/3/tutorial/index.html
34-
[Python at Free Code Camp]: https://www.freecodecamp.org/learn/scientific-computing-with-python/
35-
[Think Python]: http://www.greenteapress.com/thinkpython/html/index.html
36-
[automate the boring stuff]: https://automatetheboringstuff.com/2e/
37-
[automate the videos]: https://www.youtube.com/watch?v=1F_OgqRuSdI&list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW
38-
[googles python class]: https://developers.google.com/edu/python/introduction
40+
[Python at Free Code Camp]: https://www.freecodecamp.org/learn/python-v9/
41+
[Think Python]: https://allendowney.github.io/ThinkPython/
42+
[automate the boring stuff workbook]: https://automatetheboringstuff.com/#toc
43+
[automate the boring stuff]: https://automatetheboringstuff.com/#toc
44+
[beyond the basics video]: https://www.youtube.com/watch?v=kSrnLbioN6w
45+
[beyond the basics]: https://inventwithpython.com/beyond/
46+
[cip self guided]: https://codeinplace.stanford.edu/public/studenthome
47+
[code in place]: https://codeinplace.stanford.edu/
48+
[googles python class]: https://developers.google.com/edu/python
3949
[mitocw600]: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/
50+
[python at kahn academy]: https://www.khanacademy.org/computing/intro-to-python-fundamentals
4051
[python-course.eu]: https://python-course.eu/python-tutorial/
4152
[python-for-non-programmers]: https://store.lerner.co.il/python-for-non-programmers-live
42-
[python4everyone]: https://www.py4e.com/
4353
[wikipython]: https://en.wikipedia.org/wiki/Python_(programming_language)

docs/PROBLEM-SOLVING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Below are some community-sourced articles, videos, and books that can help you d
88

99

1010
- Free Code Camp offers a good overview article on [How to Think Like a Programmer - Lessons in Problem-Solving][free-code-camp-think-like-a-programmer].
11-
- Kurtis Pykes writing for Towards Data Science has a nice [hands-on tutorial for problem-solving][Kurtis Pykes: Hands-on Tutorial - How to Improve Your Problem-Solving Skills as A Programmer].
12-
- UC Berkeley has a nice PDF summary of [G. Polya's Problem Solving Techniques][g-polya-how-to-solve-it-summary].
11+
- Jeremy Howard, founder of fast.ai has a nice summary of [G. Polya's Problem Solving Techniques][g-polya-how-to-solve-it-summary].
1312
- Originally written in 1945 as guidance for tackling complicated math problems,[G. Polya's How To Solve It][g-polya-how-to-solve-it] (full book) is still _excellent_ advice for problem-solving in general.
13+
- Kurtis Pykes writing for Towards Data Science has a nice [hands-on tutorial for problem-solving][Kurtis Pykes: Hands-on Tutorial - How to Improve Your Problem-Solving Skills as A Programmer].
1414
- Mentioned in the Free Code Camp Article, V. Anton Spraul's [Think Like a Programmer: An Introduction to Creative Problem Solving][v-anton-spraul-think-like-a-programmer] is a more modern and programming-focused take on the same general methods Polya outlines for mathematics.
1515
- [Felienne Hermans][felienne-hermans] is more focused on _how_ people learn the art of coding and how that maps to learning in general.
1616
She has written [The Programmers Brian][programmers-brain-free-online], with strategies for reading code better, thinking about code clearly, writing better code, and becoming a better code collaborator.
@@ -32,8 +32,8 @@ Membership (paid) information is available at [acm(dot)org][association-for-comp
3232
[felienne-hermans-programming-is-writing-is-programming]: https://www.youtube.com/watch?v=uO3a4HIBDU4
3333
[felienne-hermans]: https://www.felienne.com/
3434
[free-code-camp-think-like-a-programmer]: https://www.freecodecamp.org/news/how-to-think-like-a-programmer-lessons-in-problem-solving-d1d8bf1de7d2/
35-
[g-polya-how-to-solve-it-summary]: https://math.berkeley.edu/~gmelvin/polya.pdf
36-
[g-polya-how-to-solve-it]: https://press.princeton.edu/books/paperback/9780691164076/how-to-solve-it
35+
[g-polya-how-to-solve-it-summary]: https://gist.github.com/jph00/d60301884c56fe063101a7cc6193b3af
36+
[g-polya-how-to-solve-it]: https://archive.org/details/howtosolveit0000gpol_c0p2/page/n9/mode/2up
3737
[paul-vickers-how-to-think-like-a-programmer]: https://www.researchgate.net/publication/236270907_How_to_Think_like_a_Programmer_Problem_Solving_for_the_Bewildered
3838
[programmers-brain-free-online]: https://www.manning.com/books/the-programmers-brain#toc
3939
[programmers-brain-manning]: https://www.manning.com/books/the-programmers-brain

0 commit comments

Comments
 (0)