Skip to content

Commit aa3e379

Browse files
authored
[DOCS]: Update Python Versions and Requirements (exercism#3467)
* Additional sweep to update Python versions and supported Python versions. * Fixed requirements and CONTRIBUTING. * Trying a different line skip to see if it fixes CI. CI is failing on test file generation again. * Once again re-rendering tests to see if it fixes CI. [no important files changed]
1 parent b49664a commit aa3e379

File tree

126 files changed

+132
-143
lines changed

Some content is hidden

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

126 files changed

+132
-143
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ _We know it, and trust us, we are working on fixing it._ But if you see  
195195

196196
<br>
197197

198-
This track officially supports Python `3.7 - 3.10.6` for students completing exercises.
199-
The track `test runner`, `analyzer`, and `representer` run in docker on `python:3.10.6-slim`.
198+
This track officially supports Python `3.7 - 3.11.2` for students completing exercises.
199+
The track `test runner`, `analyzer`, and `representer` run in docker on `python:3.11.2-slim`.
200200

201201
Although the majority of test cases are written using `unittest.TestCase`,
202202

203-
- All exercises should be written for compatibility with Python `3.7` - `3.10.6`.
203+
- All exercises should be written for compatibility with Python `3.7` - `3.11.2`.
204204
- 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.
205205

206206
- Here is an example of how the Python documentation handles [version-tagged &nbsp;🏷&nbsp;][version-tagged-language-features] feature introduction.
@@ -227,7 +227,7 @@ Although the majority of test cases are written using `unittest.TestCase`,
227227
- Any updates or changes need to be proposed/approved in `problem-specifications` first.
228228
- 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.
229229

230-
- Practice Exercise **Test Suits** for many practice exercises are similarly [auto-generated](#auto-generated-files) from data in [problem specifications][problem-specifications].
230+
- Practice Exercise **Test Suits** for most practice exercises are similarly [auto-generated](#auto-generated-files) from data in [problem specifications][problem-specifications].
231231

232232
- Any changes to them need to be proposed/discussed in the `problem-specifications` repository and approved by **3 track maintainers**, since changes could potentially affect many (_or all_) exercism language tracks.
233233
- If Python-specific test changes become necessary, they can be appended to the exercise `tests.toml` file.
@@ -371,6 +371,7 @@ configlet generate <path/to/track> --spec-path path/to/problem/specifications
371371
372372
<br>
373373
374+
374375
[.flake8]: https://github.com/exercism/python/blob/main/.flake8
375376
[.style.yapf]: https://github.com/exercism/python/blob/main/.style.yapf
376377
[american-english]: https://github.com/exercism/docs/blob/main/building/markdown/style-guide.md
@@ -380,6 +381,7 @@ configlet generate <path/to/track> --spec-path path/to/problem/specifications
380381
[concept-exercise-anatomy]: https://github.com/exercism/docs/blob/main/building/tracks/concept-exercises.md
381382
[concept-exercises]: https://github.com/exercism/docs/blob/main/building/tracks/concept-exercises.md
382383
[config-json]: https://github.com/exercism/javascript/blob/main/config.json
384+
[config-json]: https://github.com/exercism/python/blob/main/config.json
383385
[configlet-general]: https://github.com/exercism/configlet
384386
[configlet-lint]: https://github.com/exercism/configlet#configlet-lint
385387
[configlet]: https://github.com/exercism/docs/blob/main/building/configlet/generating-documents.md
@@ -429,5 +431,3 @@ configlet generate <path/to/track> --spec-path path/to/problem/specifications
429431
[version-tagged-language-features]: https://docs.python.org/3/library/stdtypes.html#dict.popitem
430432
[website-contributing-section]: https://exercism.org/docs/building
431433
[yapf]: https://github.com/google/yapf
432-
433-
[config-json]: https://github.com/exercism/python/blob/main/config.json

bin/generate_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def check_template(slug: str, tests_path: Path, tmpfile: Path):
271271
check_ok = False
272272
if check_ok and not filecmp.cmp(tmpfile, tests_path):
273273
with tests_path.open() as f:
274-
for line in range(5):
274+
for line in range(4):
275275
next(f)
276276
current_lines = f.readlines()
277277
with tmpfile.open() as f:

docs/ABOUT.md

Lines changed: 3 additions & 4 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.10.6` (_tests_) and [`Python 3.11`][311-new-features] (_tooling_).
23+
Tests and tooling for this track currently support `3.7` - `3.11.2` (_tests_) and [`Python 3.11.2`][311-new-features] (_tooling_).
2424
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.
25-
That being said, most of the exercises will work with `Python 3.6+`.
25+
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.2) can be found at [docs.python.org][python docs].
30+
Complete documentation for the current release of Python (3.11.x) can be found at [docs.python.org][python docs].
3131

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

3939

40-
4140
[311-new-features]: https://docs.python.org/3/whatsnew/3.11.html
4241
[active-python-releases]: https://www.python.org/downloads/
4342
[duck typing]: https://en.wikipedia.org/wiki/Duck_typing

docs/INSTALLATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Some quick links into the documentation by operating system:
1818
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.
1919

2020

21-
Exercism tests and tooling currently support `3.7` - `3.10.6` (_tests_) and [`Python 3.11`][311-new-features] (_tooling_).
21+
Exercism tests and tooling currently support `3.7` - `3.11.2` (_tests_) and [`Python 3.11.2`][311-new-features] (_tooling_).
2222
Exceptions to this support are noted where they occur.
23-
Most of the exercises will work with `Python 3.6+`.
23+
Most of the exercises will work with `Python 3.6+`, or even earlier versions.
2424
But we don't guarantee support for versions not listed under [Active Python Releases][active-python-releases].
2525

2626

docs/LEARNING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Below you will find some additional jumping-off places to start your learning jo
3737
[automate the videos]: https://www.youtube.com/watch?v=1F_OgqRuSdI&list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW
3838
[googles python class]: https://developers.google.com/edu/python/introduction
3939
[mitocw600]: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/
40-
[pycharm edu]: https://www.jetbrains.com/pycharm-edu/
4140
[python-course.eu]: https://python-course.eu/python-tutorial/
4241
[python-for-non-programmers]: https://store.lerner.co.il/python-for-non-programmers-live
4342
[python4everyone]: https://www.py4e.com/

docs/TESTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Otherwise, the `pytest` installation will be global.
3030

3131
```powershell
3232
PS C:\Users\foobar> py -m pip install pytest pytest-cache pytest-subtests pytest-pylint
33-
Successfully installed pytest-6.2.5 ...
33+
Successfully installed pytest-7.2.2 ...
3434
```
3535

3636
#### Linux / MacOS
3737

3838
```bash
3939
$ python3 -m pip install pytest pytest-cache pytest-subtests pytest-pylint
40-
Successfully installed pytest-6.2.5 ...
40+
Successfully installed pytest-7.2.2 ...
4141

4242
```
4343

@@ -46,7 +46,7 @@ To check if installation was successful:
4646

4747
```bash
4848
$ python3 -m pytest --version
49-
pytest 6.2.5
49+
pytest 7.2.2
5050
```
5151

5252
## Running the tests

docs/TOOLS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If you have an editor, IDE, tool, or plugin recommendation, we encourage you to
3030

3131

3232
Before you start exploring, make sure that you have a recent version of Python installed.
33-
The Exercism platform currently supports `Python 3.8` (_exercises and tests_) and `Python 3.9` (_tooling_).
33+
The Exercism platform currently supports `Python 3.7 - 3.11.2` (_exercises and tests_) and `Python 3.11.2` (_tooling_).
3434
For more information, please refer to [Installing Python locally][Installing Python locally].
3535

3636
<br>

docs/TRACEBACKS.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,6 @@ print(sum)
632632

633633
[assert]: https://realpython.com/python-assert-statement/
634634
[assertionerror]: https://www.geeksforgeeks.org/python-assertion-error/
635-
[floor divison operator]: https://www.codingem.com/python-floor-division
636-
[logging]: https://docs.python.org/3/howto/logging.html
637635
[print]: https://www.w3schools.com/python/ref_func_print.asp
638636
[pdb]: https://www.geeksforgeeks.org/python-debugger-python-pdb/
639637
[exception-hierarchy]: https://docs.python.org/3/library/exceptions.html#exception-hierarchy

exercises/practice/acronym/acronym_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/acronym/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/affine-cipher/affine_cipher_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/affine-cipher/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/all-your-base/all_your_base_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/all-your-base/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/allergies/allergies_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/allergies/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/alphametics/alphametics_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/alphametics/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/anagram/anagram_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/anagram/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/armstrong-numbers/armstrong_numbers_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/armstrong-numbers/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/atbash-cipher/atbash_cipher_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/atbash-cipher/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/bank-account/bank_account_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/bank-account/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/beer-song/beer_song_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/beer-song/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/binary-search-tree/binary_search_tree_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/binary-search-tree/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/binary-search/binary_search_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/binary-search/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/bob/bob_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/bob/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/book-store/book_store_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/book-store/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/bottle-song/bottle_song_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/bottle-song/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/bowling/bowling_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/bowling/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/change/change_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/change/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/circular-buffer/circular_buffer_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/circular-buffer/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/clock/clock_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/clock/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/collatz-conjecture/collatz_conjecture_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/collatz-conjecture/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/complex-numbers/complex_numbers_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# These tests are auto-generated with test data from:
44
# https://github.com/exercism/problem-specifications/tree/main/exercises/complex-numbers/canonical-data.json
5-
# File last updated on 2023-07-15
5+
# File last updated on 2023-07-16
66

77
import unittest
88

exercises/practice/connect/connect_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/connect/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/crypto-square/crypto_square_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/crypto-square/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/custom-set/custom_set_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/custom-set/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/darts/darts_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/darts/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/diamond/diamond_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/diamond/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/difference-of-squares/difference_of_squares_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/difference-of-squares/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/diffie-hellman/diffie_hellman_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/diffie-hellman/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/dnd-character/dnd_character_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/dnd-character/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/dominoes/dominoes_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/dominoes/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

exercises/practice/etl/etl_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/etl/canonical-data.json
3-
# File last updated on 2023-07-15
3+
# File last updated on 2023-07-16
44

55
import unittest
66

0 commit comments

Comments
 (0)