Skip to content

Build with poetry: failure to see installed packages #11149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ewjoachim opened this issue Feb 25, 2024 · 5 comments
Closed

Build with poetry: failure to see installed packages #11149

ewjoachim opened this issue Feb 25, 2024 · 5 comments

Comments

@ewjoachim
Copy link
Contributor

ewjoachim commented Feb 25, 2024

Details

So: I'm installing my dependencies from Poetry, including a docs dependency group (not an extra, a dependency group, that's a poetry thing that's supported by RTD, as per the documentation). Then it looks like it's missing dependency that have been installed.

Expected Result

Doc should build. And used to build. It worked 5 days ago, and fails now.

Actual Result

Failure: https://readthedocs.org/projects/procrastinate/builds/23555034/
Could not import extension myst_parser (exception: No module named 'myst_parser')

I can see the myst-parser package is installed in the poetry install step, and yet when trying to import it, the package isn't found.

Notes:

  • The readthedocs.yml is slightly not configured like the doc says (it's configured as the doc used to say) but I've tried fixing that and it failed identically.
  • myst-parser is one of those packages for which the package name has a - and the import name has a _, but I've checked, and I'm using the correct name in pyproject.toml, and in conf.py.
  • Would it be possible that it could be a poetry/virtualenv issue ? The failing extension is the first extension in my list, I'll try changing the order and see if it fails on the first one. I think a possible cause for the issue would be that poetry actually ends up installing packages in a different env than being used by RTD (so virtualenv.create false would not be working?) In that case the issue would likely come from the doc ?
@ewjoachim
Copy link
Contributor Author

ewjoachim commented Feb 25, 2024

Yep, I tried changing the order of extensions and I got another No module named x error.

poetry install says Skipping virtualenv creation, as specified in config file., so it understands correctly.

Somehow, the Python environment we use is not the same as the one Sphinx expects. And somehow, it changed in the last 5 days.

Poetry is 1.8.0, not updated since December.

@humitos
Copy link
Member

humitos commented Feb 25, 2024

Take a look at #11150. Sens related

@ewjoachim
Copy link
Contributor Author

Indeed, I checked before posting that there wasn't already an open issue... and that was opened after mine :) At least it goes to show I'm not the only one impacted

Should we follow this issue here or in #11150 ? (Or maybe it's a poetry bug ?)

@humitos
Copy link
Member

humitos commented Feb 25, 2024

We can continue taking this in the other issue sin or seems more related with poetry than read the docs

@ewjoachim
Copy link
Contributor Author

Ok.

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

No branches or pull requests

2 participants