Skip to content

Commit

Permalink
[DOCS]: Update Python Versions and Requirements (#3467)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
BethanyG authored Jul 16, 2023
1 parent b49664a commit aa3e379
Show file tree
Hide file tree
Showing 126 changed files with 132 additions and 143 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ _We know it, and trust us, we are working on fixing it._ But if you see  

<br>

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

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

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

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

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

- 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.
- If Python-specific test changes become necessary, they can be appended to the exercise `tests.toml` file.
Expand Down Expand Up @@ -371,6 +371,7 @@ configlet generate <path/to/track> --spec-path path/to/problem/specifications
<br>
[.flake8]: https://github.com/exercism/python/blob/main/.flake8
[.style.yapf]: https://github.com/exercism/python/blob/main/.style.yapf
[american-english]: https://github.com/exercism/docs/blob/main/building/markdown/style-guide.md
Expand All @@ -380,6 +381,7 @@ configlet generate <path/to/track> --spec-path path/to/problem/specifications
[concept-exercise-anatomy]: https://github.com/exercism/docs/blob/main/building/tracks/concept-exercises.md
[concept-exercises]: https://github.com/exercism/docs/blob/main/building/tracks/concept-exercises.md
[config-json]: https://github.com/exercism/javascript/blob/main/config.json
[config-json]: https://github.com/exercism/python/blob/main/config.json
[configlet-general]: https://github.com/exercism/configlet
[configlet-lint]: https://github.com/exercism/configlet#configlet-lint
[configlet]: https://github.com/exercism/docs/blob/main/building/configlet/generating-documents.md
Expand Down Expand Up @@ -429,5 +431,3 @@ configlet generate <path/to/track> --spec-path path/to/problem/specifications
[version-tagged-language-features]: https://docs.python.org/3/library/stdtypes.html#dict.popitem
[website-contributing-section]: https://exercism.org/docs/building
[yapf]: https://github.com/google/yapf
[config-json]: https://github.com/exercism/python/blob/main/config.json
2 changes: 1 addition & 1 deletion bin/generate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def check_template(slug: str, tests_path: Path, tmpfile: Path):
check_ok = False
if check_ok and not filecmp.cmp(tmpfile, tests_path):
with tests_path.open() as f:
for line in range(5):
for line in range(4):
next(f)
current_lines = f.readlines()
with tmpfile.open() as f:
Expand Down
7 changes: 3 additions & 4 deletions docs/ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ Code can be written and executed from the command line, in an interactive interp
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.


Tests and tooling for this track currently support `3.7` - `3.10.6` (_tests_) and [`Python 3.11`][311-new-features] (_tooling_).
Tests and tooling for this track currently support `3.7` - `3.11.2` (_tests_) and [`Python 3.11.2`][311-new-features] (_tooling_).
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.
That being said, most of the exercises will work with `Python 3.6+`.
That being said, most of the exercises will work with `Python 3.6+`, or even earlier versions.
But we don't guarantee support for versions not listed under [Active Python Releases][active-python-releases].
We will try to note when a feature is only available in a certain version.


Complete documentation for the current release of Python (3.11.2) can be found at [docs.python.org][python docs].
Complete documentation for the current release of Python (3.11.x) can be found at [docs.python.org][python docs].

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



[311-new-features]: https://docs.python.org/3/whatsnew/3.11.html
[active-python-releases]: https://www.python.org/downloads/
[duck typing]: https://en.wikipedia.org/wiki/Duck_typing
Expand Down
4 changes: 2 additions & 2 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Some quick links into the documentation by operating system:
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.


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


Expand Down
1 change: 0 additions & 1 deletion docs/LEARNING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Below you will find some additional jumping-off places to start your learning jo
[automate the videos]: https://www.youtube.com/watch?v=1F_OgqRuSdI&list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW
[googles python class]: https://developers.google.com/edu/python/introduction
[mitocw600]: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/
[pycharm edu]: https://www.jetbrains.com/pycharm-edu/
[python-course.eu]: https://python-course.eu/python-tutorial/
[python-for-non-programmers]: https://store.lerner.co.il/python-for-non-programmers-live
[python4everyone]: https://www.py4e.com/
Expand Down
6 changes: 3 additions & 3 deletions docs/TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Otherwise, the `pytest` installation will be global.

```powershell
PS C:\Users\foobar> py -m pip install pytest pytest-cache pytest-subtests pytest-pylint
Successfully installed pytest-6.2.5 ...
Successfully installed pytest-7.2.2 ...
```

#### Linux / MacOS

```bash
$ python3 -m pip install pytest pytest-cache pytest-subtests pytest-pylint
Successfully installed pytest-6.2.5 ...
Successfully installed pytest-7.2.2 ...

```

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

```bash
$ python3 -m pytest --version
pytest 6.2.5
pytest 7.2.2
```

## Running the tests
Expand Down
2 changes: 1 addition & 1 deletion docs/TOOLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you have an editor, IDE, tool, or plugin recommendation, we encourage you to


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

<br>
Expand Down
2 changes: 0 additions & 2 deletions docs/TRACEBACKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,6 @@ print(sum)

[assert]: https://realpython.com/python-assert-statement/
[assertionerror]: https://www.geeksforgeeks.org/python-assertion-error/
[floor divison operator]: https://www.codingem.com/python-floor-division
[logging]: https://docs.python.org/3/howto/logging.html
[print]: https://www.w3schools.com/python/ref_func_print.asp
[pdb]: https://www.geeksforgeeks.org/python-debugger-python-pdb/
[exception-hierarchy]: https://docs.python.org/3/library/exceptions.html#exception-hierarchy
2 changes: 1 addition & 1 deletion exercises/practice/acronym/acronym_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/acronym/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/affine-cipher/affine_cipher_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/affine-cipher/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/all-your-base/all_your_base_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/all-your-base/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/allergies/allergies_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/allergies/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/alphametics/alphametics_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/alphametics/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/anagram/anagram_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/anagram/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/armstrong-numbers/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/atbash-cipher/atbash_cipher_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/atbash-cipher/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/bank-account/bank_account_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/bank-account/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/beer-song/beer_song_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/beer-song/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/binary-search-tree/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/binary-search/binary_search_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/binary-search/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/bob/bob_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/bob/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/book-store/book_store_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/book-store/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/bottle-song/bottle_song_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/bottle-song/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/bowling/bowling_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/bowling/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/change/change_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/change/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/circular-buffer/circular_buffer_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/circular-buffer/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/clock/clock_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/clock/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/collatz-conjecture/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/complex-numbers/complex_numbers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/connect/connect_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/connect/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/crypto-square/crypto_square_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/crypto-square/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/custom-set/custom_set_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/custom-set/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/darts/darts_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/darts/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/diamond/diamond_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/diamond/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/difference-of-squares/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/diffie-hellman/diffie_hellman_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/diffie-hellman/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/dnd-character/dnd_character_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/dnd-character/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/dominoes/dominoes_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/dominoes/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/etl/etl_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/etl/canonical-data.json
# File last updated on 2023-07-15
# File last updated on 2023-07-16

import unittest

Expand Down
Loading

0 comments on commit aa3e379

Please sign in to comment.