From c865759d7d45449eabbcfa73b9f08dc7adb4975f Mon Sep 17 00:00:00 2001 From: BethanyG Date: Fri, 7 Apr 2023 04:19:47 -0700 Subject: [PATCH] Updated refrences to Python 3.10 --> 3.11. (#3384) --- CONTRIBUTING.md | 13 +++++++------ README.md | 23 ++++++++++++++--------- docs/ABOUT.md | 12 ++++++++---- docs/GENERATOR.md | 17 +++++++++++++---- docs/INSTALLATION.md | 18 ++++++++++++------ docs/LEARNING.md | 5 +++-- docs/TESTS.md | 2 +- exercises/shared/.docs/help.md | 1 + 8 files changed, 59 insertions(+), 32 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 691ca9f9..7f082a56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,14 +28,13 @@ Please read this [community blog post](https://exercism.org/blog/freeing-our-mai **`exercism/Python`** is one of many programming language tracks on [exercism(dot)org][exercism-website]. This repo holds all the instructions, tests, code, & support files for Python _exercises_ currently under development or implemented & available for students. -🌟   Track exercises support Python `3.7` - `3.10.6`. +🌟   Track exercises support Python `3.7` - `3.11.2`. Exceptions to this support are noted where they occur. - 🌟   Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.10.6`. +🌟   Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.11.2`. -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  🌴  . -Concept exercises are constrained to a small set of language or syntax features. -Practice exercises are open-ended, and can be used to practice concepts learned, try out new techniques, and _play_. -These two exercise groupings can be found in the track [config.json][config-json], and under the `python/exercises` directory. +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  🌴 . +Concept exercises are constrained to a small set of language or syntax features. +Practice exercises are open-ended, and can be used to practice concepts learned, try out new techniques, and _play_. These two exercise groupings can be found in the track [config.json][config-json], and under the `python/exercises` directory.
@@ -430,3 +429,5 @@ configlet generate --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 diff --git a/README.md b/README.md index 64930816..1c82f33b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

Exercism Python Track

                          [![Discourse topics](https://img.shields.io/discourse/topics?color=8A08E6&label=Connect%20&labelColor=FFDF58&logo=Discourse&logoColor=8A08E6&server=https%3A%2F%2Fforum.exercism.org&style=social)](https://forum.exercism.org) -  [![Exercism_II](https://img.shields.io/badge/Exercism--Built-9101FF?logo=python&logoColor=FFDF58&labelColor=3D7AAB&label=Python%203.10%20Powered)](https://exercism.org) +  [![Exercism_II](https://img.shields.io/badge/Exercism--Built-9101FF?logo=python&logoColor=FFDF58&labelColor=3D7AAB&label=Python%203.11%20Powered)](https://exercism.org)   [![Exercism_III](https://img.shields.io/badge/PAUSED-C73D4E?labelColor=3D454D&label=Contributions)](https://exercism.org/blog/freeing-our-maintainers)   [![Build Status](https://github.com/exercism/python/workflows/Exercises%20check/badge.svg)](https://github.com/exercism/python/actions?query=workflow%3A%22Exercises+check%22) @@ -17,11 +17,13 @@ Hi.  👋🏽  👋  **We are happy you are here.**  🎉&nb **`exercism/Python`** is one of many programming language tracks on [exercism(dot)org][exercism-website]. This repo holds all the instructions, tests, code, & support files for Python _exercises_ currently under development or implemented & available for students. -🌟   Track exercises support Python `3.7` - `3.10.6`. +🌟   Track exercises support Python `3.7` - `3.11.2`. Exceptions to this support are noted where they occur. - 🌟   Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.10.6`. +🌟   Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Python `3.11.2`. -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  🌴  . Concept exercises are constrained to a small set of language or syntax features. Practice exercises are open-ended, and can be used to practice concepts learned, try out new techniques, and _play_. These two exercise groupings can be found in the track [config.json][config-json], and under the `python/exercises` directory. +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  🌴 . +Concept exercises are constrained to a small set of language or syntax features. +Practice exercises are open-ended, and can be used to practice concepts learned, try out new techniques, and _play_. These two exercise groupings can be found in the track [config.json][config-json], and under the `python/exercises` directory.

@@ -43,24 +45,25 @@ It might also be helpful to look at [Being a Good Community Member][being-a-good We 💛 💙   our community. **`But our maintainers are not accepting community contributions at this time.`** -Please read this [community blog post](https://exercism.org/blog/freeing-our-maintainers) for details. +Please read this [community blog post][freeing-maintainers] for details.
- + Here to suggest a new feature or new exercise?? **Hooray!**  🎉   -We'd love if you did that via our [Exercism Community Forum](https://forum.exercism.org/). Please keep in mind [Chesterton's Fence][chestertons-fence]. +We'd love if you did that via our [Exercism Community Forum](https://forum.exercism.org/). +Please read [Suggesting Exercise Improvements][suggesting-improvements] & [Chesterton's Fence][chestertons-fence]. _Thoughtful suggestions will likely result faster & more enthusiastic responses from volunteers._
- ✨ 🦄  _**Want to jump directly into Exercism specifications & detail?**_      [Structure][exercism-track-structure] **|** [Tasks][exercism-tasks] **|** [Concepts][exercism-concepts] **|** [Concept Exercises][concept-exercises] **|** [Practice Exercises][practice-exercises] **|** [Presentation][exercise-presentation]      [Writing Style Guide][exercism-writing-style] **|** [Markdown Specification][exercism-markdown-specification] (_✨ version in [contributing][website-contributing-section] on exercism.org_) -

+
+
## Python Software and Documentation @@ -94,10 +97,12 @@ This repository uses the [MIT License](/LICENSE). [exercism-track-structure]: https://github.com/exercism/docs/tree/main/building/tracks [exercism-website]: https://exercism.org/ [exercism-writing-style]: https://github.com/exercism/docs/blob/main/building/markdown/style-guide.md +[freeing-maintainers]: https://exercism.org/blog/freeing-our-maintainers [practice-exercises]: https://github.com/exercism/docs/blob/main/building/tracks/practice-exercises.md [prs]: https://github.com/exercism/docs/blob/main/community/good-member/pull-requests.md [psf-license]: https://docs.python.org/3/license.html#psf-license [python-syllabus]: https://exercism.org/tracks/python/concepts +[suggesting-improvements]: https://github.com/exercism/docs/blob/main/community/good-member/suggesting-exercise-improvements.md [the-words-that-we-use]: https://github.com/exercism/docs/blob/main/community/good-member/words.md [website-contributing-section]: https://exercism.org/docs/building [zero-clause-bsd]: https://docs.python.org/3/license.html#zero-clause-bsd-license-for-code-in-the-python-release-documentation diff --git a/docs/ABOUT.md b/docs/ABOUT.md index 9b53653f..05c56799 100644 --- a/docs/ABOUT.md +++ b/docs/ABOUT.md @@ -20,13 +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. -This track currently uses `Python 3.9.0`. +Tests and tooling for this track currently support `3.7` - `3.10.6` (_tests_) and [`Python 3.11`][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 exercises can be completed using Python 3.7, and many can be worked in Python 3.6. -We will note when a feature is only available in a certain version. +That being said, most of the exercises will work with `Python 3.6+`, and many are compatible with `Python 2.7+`. +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.9.7) can be found at [docs.python.org][python docs]. +Complete documentation for the current release of Python (3.11.2) can be found at [docs.python.org][python docs]. - [Python Tutorial][python tutorial] - [Python Library Reference][python library reference] @@ -36,6 +37,9 @@ Complete documentation for the current release of Python (3.9.7) can be found at - [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 [dynamic typing in python]: https://stackoverflow.com/questions/11328920/is-python-strongly-typed [editors for python]: https://djangostars.com/blog/python-ide/ diff --git a/docs/GENERATOR.md b/docs/GENERATOR.md index d1a8a1da..271c03d7 100644 --- a/docs/GENERATOR.md +++ b/docs/GENERATOR.md @@ -1,7 +1,8 @@ # Exercism Python Track Test Generator -The Python track uses a generator script and [Jinja2] templates for -creating test files from the canonical data. +The Python track uses a generator script and [Jinja2][Jinja2] templates for +creating test files from Exercism's [canonical data][canonical data]. + ## Table of Contents @@ -15,14 +16,16 @@ creating test files from the canonical data. * [Learning Jinja](#learning-jinja) * [Creating a templates](#creating-a-templates) + ## Script Usage -Test generation requires a local copy of the [problem-specifications] repository. +Test generation requires a local copy of the [problem-specifications][problem-specifications] repository. The script should be run from the root `python` directory, in order to correctly access the exercises. Run `bin/generate_tests.py --help` for usage information. + ## Test Templates Test templates support [Jinja2] syntax, and have the following context @@ -42,6 +45,7 @@ Additionally, the following template filters are added for convenience: - `error_case`: Checks if a test case expects an error to be thrown (ex: `{% for case in cases%}{% if case is error_case}`) - `regex_replace`: Regex string replacement (ex: `{{ "abc123" | regex_replace("\\d", "D") }}` -> `abcDDD`) + ### Conventions - General-use macros for highly repeated template structures are defined in `config/generator_macros.j2`. @@ -63,6 +67,7 @@ files. # Additional tests for this track ``` + ### Layout Most templates will look something like this: @@ -83,6 +88,7 @@ class {{ exercise | camel_case }}Test(unittest.TestCase): {{ macros.footer() }} ``` + ### Overriding Imports The names imported in `macros.header()` may be overridden by adding @@ -92,6 +98,7 @@ a list of alternate names to import (ex:`clock`): {{ macros.header(["Clock"])}} ``` + ### Ignoring Properties On rare occasion, it may be necessary to filter out properties that @@ -102,6 +109,7 @@ are not tested in this track. The `header` macro also accepts an {{ macros.header(ignore=["scores"]) }} ``` + ## Learning Jinja Starting with the [Jinja Documentation] is highly recommended, but a complete reading is not strictly necessary. @@ -127,8 +135,9 @@ Additional Resources: +[Jinja Documentation]: https://jinja.palletsprojects.com/en/3.1.x/ [Jinja2]: https://palletsprojects.com/p/jinja/ -[Jinja Documentation]: https://jinja.palletsprojects.com/en/2.10.x/ [Primer on Jinja Templating]: https://realpython.com/primer-on-jinja-templating/ [Python Jinja tutorial]: http://zetcode.com/python/jinja/ +[canonical data]: https://github.com/exercism/problem-specifications/tree/main/exercises [problem-specifications]: https://github.com/exercism/problem-specifications diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index ad346329..8bf42a04 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -7,7 +7,7 @@ Finally, these posts by Brett Cannon [A quick-and-dirty guide][quick-and-dirty] **Note for MacOS users:** prior to MacOS Monterey (12.3), `Python 2.7` came pre-installed with the operating system. Using `Python 2.7` with Exercism or most other programs is not recommended. -You should instead install Python 3 via one of the methods detailed below. +You should instead install [Python 3][Python-three downloads] via one of the methods detailed below. As of MacOS Monterey (12.3), no version of Python will be pre-installed via MacOS. Some quick links into the documentation by operating system: @@ -18,12 +18,18 @@ 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 `Python 3.8` (_tests_) and `Python 3.9` (_tooling_). -This means that the [newest features of Python `3.10`][310-new-features] are **not** currently supported. -Please refer to the [Python 3.9.x documentation][3.9 docs] for what is currently supported. +Exercism tests and tooling currently support `3.7` - `3.10.6` (_tests_) and [`Python 3.11`][311-new-features] (_tooling_). +Exceptions to this support are noted where they occur. +Most of the exercises will work with `Python 3.6+`, and many are compatible with `Python 2.7+`. +But we don't guarantee support for versions not listed under [Active Python Releases][active-python-releases]. -[3.9 docs]: https://docs.python.org/3.9/ -[310-new-features]: https://docs.python.org/3/whatsnew/3.10.html + +Please refer to the [Python 3.11.x documentation][3.11 docs] for what is currently supported. + +[3.11 docs]: https://docs.python.org/3.11/ +[311-new-features]: https://docs.python.org/3/whatsnew/3.11.html +[Python-three downloads]: https://www.python.org/downloads/ +[active-python-releases]: https://www.python.org/downloads/ [helpful guide]: https://realpython.com/installing-python/ [installing-python]: https://realpython.com/installing-python/#what-your-options-are_1 [macos]: https://docs.python.org/3/using/mac.html diff --git a/docs/LEARNING.md b/docs/LEARNING.md index 15e4fd80..f9cb1b22 100644 --- a/docs/LEARNING.md +++ b/docs/LEARNING.md @@ -21,12 +21,13 @@ Below you will find some additional jumping-off places to start your learning jo - [Think Python][Think Python] - [Python for Non-Programmers][python-for-non-programmers] - [Python 4 Everyone][python4everyone] -- [Introduction to Computer Science and Programming in Python (MIT)][mitocw600] - [Googles Python Class][googles python class] - [Microsoft's Python Learning Path][MS Python] -- [PyCharm EDU **IDE** and **Courses**][pycharm edu] (_paid_) +- [Introduction to Computer Science and Programming in Python (MIT)][mitocw600] +- [Harvard CS50P][CS50P] +[CS50P]: https://pll.harvard.edu/course/cs50s-introduction-programming-python?delta=0 [Learn X in Y minutes]: https://learnxinyminutes.com/docs/python3/ [MS Python]: https://docs.microsoft.com/en-us/learn/paths/python-language/ [Python Documentation Tutorial]: https://docs.python.org/3/tutorial/index.html diff --git a/docs/TESTS.md b/docs/TESTS.md index 9e522b12..00ff924c 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -272,5 +272,5 @@ export PATH=”$PATH:{python_directory}}” [python command line]: https://docs.python.org/3/using/cmdline.html [python-m-pip]: https://snarky.ca/why-you-should-use-python-m-pip/ [quick-and-dirty]: https://snarky.ca/a-quick-and-dirty-guide-on-how-to-install-packages-for-python/ -[tutorial from pycqa.org]: https://pylint.pycqa.org/en/latest/tutorial.html +[tutorial from pycqa.org]: https://pylint.pycqa.org/en/v2.17.2/tutorial.html [working with custom markers]: https://docs.pytest.org/en/6.2.x/example/markers.html#working-with-custom-markers diff --git a/exercises/shared/.docs/help.md b/exercises/shared/.docs/help.md index 0e105b02..ef95bd61 100644 --- a/exercises/shared/.docs/help.md +++ b/exercises/shared/.docs/help.md @@ -3,6 +3,7 @@ Below are some resources for getting help if you run into trouble: - [The PSF](https://www.python.org) hosts Python downloads, documentation, and community resources. +- [The Exercism Community on Discord](https://exercism.org/r/discord) - [Python Community on Discord](https://pythondiscord.com/) is a very helpful and active community. - [/r/learnpython/](https://www.reddit.com/r/learnpython/) is a subreddit designed for Python learners. - [#python on Libera.chat](https://www.python.org/community/irc/) this is where the core developers for the language hang out and get work done.