Exercises
Many of the topics discussed in this chapter already gave full examples, leaving little room for exercises. There are additional resources to discover, however.
Reading the Python Enhancement Proposals (PEPs)
A good way to learn more about the topics discussed in this chapter (and all the following chapters) is to read the PEP pages. These proposals were written before the changes were accepted into the Python core. Note that not all of the PEPs on the Python site have been accepted, but they will remain on the Python site:
- PEP 440 – Version Identification and Dependency Specification: https://peps.python.org/pep-0440/
- PEP 496 – Environment Markers: https://peps.python.org/pep-0496/
Combining pyenv and poetry or pipenv
Even though the chapter did not cover it, there is nothing stopping you from telling poetry
or pipenv
to use a pyenv
-based Python interpreter. Give it a try!
Converting an existing project to a poetry project
Part of this exercise should be to either create a brand new pyproject.toml
or to convert an existing requirements.txt
file to a pyproject.toml
.