Skip to content
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

Solve dependency conflict between Flake8 and Sphinx #177

Closed
Cito opened this issue Jun 19, 2022 · 3 comments
Closed

Solve dependency conflict between Flake8 and Sphinx #177

Cito opened this issue Jun 19, 2022 · 3 comments
Assignees
Labels
modernization Update dependencies etc. pending Waiting for other issues to move forward
Milestone

Comments

@Cito
Copy link
Member

Cito commented Jun 19, 2022

Currently we cannot upgrade to Sphinx v5, because Sphinx and Flask are installed together in the dev environment, and the current versions Sphinx 5 and Flask 4 cannot coexist (see for instance here).

The best solution will be to use dependency groups to separate at least the "docs" environment from the "dev" environment. This is something that is supported and recommended in the next version 1.2 of Poetry.

I think we should do that when Poetry 1.2 has been released and Sphinx 5 is more widely used (to be sure that the themes and "read the docs" support it).

@Cito Cito self-assigned this Jun 19, 2022
@Cito Cito added pending Waiting for other issues to move forward modernization Update dependencies etc. labels Jun 19, 2022
@Cito
Copy link
Member Author

Cito commented Sep 22, 2022

This may be solved with Flask 5, but it would still be a good idea. Will tackle this in the next minor version where we require Python 3.7 because Poetry 1.2 needs that.

@Cito Cito modified the milestones: v3.2, v3.3 Sep 22, 2022
@Cito
Copy link
Member Author

Cito commented Sep 23, 2022

Unfortunately, Flask 5 and Sphinx 5 still have conflicting dependencies.

And unfortunetely, it turend after switching to dependency groups in the development branch for v3.3, this did not solve the problem. Poetry still tries to conciliate all dependency groups, even those that are not installed, and there is no fix for this problem planned in Poetry - see this issue in Poetry.

So I'm looking for a different solution to solve this in the 3.3 branch. Essentially, we require these dependency groups to be installed in different virtual envs, but I'm not sure how I can express this in the pyproject.toml. Maybe these dependencies should simply not go there, but in the tox or nox configuration.

Cito added a commit that referenced this issue Sep 23, 2022
Unfortunately, this does not solve the problem of conflicting
dependencies between Sphinx and Flake8.
@Cito Cito changed the title Use dependency groups (update Poetry to v1.2 and Sphinx to v5) Solve dependency conflict between Flake8 and Sphinx Sep 23, 2022
@Cito
Copy link
Member Author

Cito commented Sep 23, 2022

For now, I have just relaxed the dependencies in pyproject.toml (allowing Sphinx 4.3), and require Sphinx 5.1 only in tox.ini.

I think this is good enough, and that the dependency conflict will eventually disappear anyway, so closing this now.

@Cito Cito closed this as completed Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modernization Update dependencies etc. pending Waiting for other issues to move forward
Projects
None yet
Development

No branches or pull requests

1 participant