GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Addition of Poetry to "Using virtualenvs..." section · Issue #1101 · realpython/python-guide

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

New issue
Copy link
New issue
Copy link
Open
Open
Addition of Poetry to "Using virtualenvs..." section#1101
Copy link

Description

@hkennyv
hkennyv
opened on May 4, 2021
Issue body actions

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.

Reacted by Ashok Bakthavathsalam, Martin A. Kayser, Joaquín Pérez and akupac

Activity

  1. shatteredsword commented on Sep 24, 2021

    @shatteredsword
    shatteredsword
    on Sep 24, 2021
    More actions

    agreed. PEP 518 has been out for more than 5 years

    Reacted by Kenny Huynh
  2. akupac commented on Mar 13, 2024

    @akupac
    akupac
    on Mar 13, 2024
    More actions

    Is this guide up to date with Python best practices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.