Skip to content

Conversation

@Serene-Arc
Copy link
Contributor

I was getting my development environment set up so I could start contributing code again (yay!) when I noticed that the docs are out of date. poetry shell is no longer part of the core poetry tool, but a plugin. Using poetry env activate is given as a replacement. This just updates the docs to reflect that. I also added a shortcut so people could understand how to install all the extras, since that's pretty necessary for developers.

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

@Serene-Arc Serene-Arc requested a review from a team as a code owner December 6, 2025 03:59
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `CONTRIBUTING.rst:125` </location>
<code_context>
 ::

-    $ poetry shell
+    $ poetry env activate

 You should see ``(beets-py3.10)`` prefix in your shell prompt. Now you can run
</code_context>

<issue_to_address>
**issue:** Re-check whether `poetry env activate` matches the described behavior of activating the virtual environment and changing the prompt.

This command is described as activating the virtualenv and changing your prompt to show `(beets-py3.10)`. That behavior usually matches `poetry shell`; `poetry env activate` often only prints an activation command instead of starting a new shell. Please verify the behavior with the Poetry version you support and either restore `poetry shell` or adjust the explanation so it matches what actually happens.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

::

$ poetry shell
$ poetry env activate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Re-check whether poetry env activate matches the described behavior of activating the virtual environment and changing the prompt.

This command is described as activating the virtualenv and changing your prompt to show (beets-py3.10). That behavior usually matches poetry shell; poetry env activate often only prints an activation command instead of starting a new shell. Please verify the behavior with the Poetry version you support and either restore poetry shell or adjust the explanation so it matches what actually happens.

Copy link
Member

@JOJ0 JOJ0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome back again @Serene-Arc 👋 👍

sorcery-ai has a point. we mention that the prompt changes which doesn't with poetry env activate.

there is other commands for showing that info ar adjusting one's prompt manuyll poetry env info for example. We could add that or we just link to the poetry docs which I find better actually. (we might do that already, didn't check)


::

$ (beets-py3.10) pytest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ pytest

@henry-oberholtzer
Copy link
Member

I think before we'd change this, we would want to look into bumping our poetry version above v2. We're still specifying poetry <2.0 which means that the poetry shell command would still be the recommended way to set up the environment.

@snejus
Copy link
Member

snejus commented Dec 6, 2025

I think before we'd change this, we would want to look into bumping our poetry version above v2. We're still specifying poetry <2.0 which means that the poetry shell command would still be the recommended way to set up the environment.

Indeed, @Serene-Arc see #5783 for the context.

Co-authored-by: J0J0 Todos <[email protected]>
@Serene-Arc
Copy link
Contributor Author

@snejus @wisp3rwind perhaps it's time to try a switch to uv, or perhaps implementing a fix to the issue in #5783 at least? Is there any particular reason it's not moved forwards at all? I would prefer using it over poetry and pipenv and I'm willing to investigate the integration (and this isn't a real reason, but I do so enjoy supporting rust tools).

@semohr
Copy link
Contributor

semohr commented Dec 7, 2025

@snejus @wisp3rwind perhaps it's time to try a switch to uv, or perhaps implementing a fix to the issue in #5783 at least? Is there any particular reason it's not moved forwards at all? I would prefer using it over poetry and pipenv and I'm willing to investigate the integration (and this isn't a real reason, but I do so enjoy supporting rust tools).

Tbh, I’d also prefer using uv, but there are a few arguments against adopting it right now, mainly that it would further segregate our development env across the various subpackages. Still, if you want to evaluating a uv-based setup for beets, you can take a look at beetbox/mediafile#87, which replaces poetry & pipx with uv in the mediafile package. It may serve as a useful reference point.

@snejus
Copy link
Member

snejus commented Dec 7, 2025

The reason why we pinned poetry is here: #5770

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants