realpython / realpython/python-guide

Addition of Poetry to "Using virtualenvs..." section

Open
#1,101 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Batchfile
Stars
29.8k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

Hi there, thank you for all the work put into this guide so far!

Are there any discussions or plans to mention Poetry anywhere in this guide (I couldn't find any previous issues on this)?

Rationale

I think poetry solves a huge missing piece in the Python ecosystem. For any node.js developers, it is similar to npm and yarn. For many newcomers to the language, the way python does dependency management and virtual environments has a very high learning curve.

Poetry introduces (over traditional pip based package management):

  • A unified project manifest pyproject.toml containing dependencies and build information
  • Introduces a poetry.lock file that pins dependency versions (a better alternative than pip freeze IMO)
  • Avoids installing dependencies globally (poetry automatically creates a virtualenv and installs project dependencies there)
  • Using poetry run executes commands automatically in the proper virtualenv context (no more needing to source venv/bin/activate)

And plenty more that I'm sure I am not listing here...

Limitations

As with any new technology, there are some limitations:

  • Poetry is dropping support for Python 2.7 and 3.5 in the next release
  • Lots of older tutorials and resources probably do not use it, which could confuse beginners even more

Thoughts on this? Would be happy to help contribute wherever I can.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The request targets the guide’s “Using virtualenvs...” section and links Poetry; start by reading that section and the surrounding dependency-management guidance. Clarify the scope and compatibility caveats, then update the guide so its treatment of Poetry and its limitations is explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.