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

Q: Python >= 3.7 dependency #312

Closed
arwedus opened this issue Jun 30, 2021 · 10 comments
Closed

Q: Python >= 3.7 dependency #312

arwedus opened this issue Jun 30, 2021 · 10 comments

Comments

@arwedus
Copy link
Contributor

arwedus commented Jun 30, 2021

sphinxcontrib-needs has a dependency on Sphinx 3.0.0 if Python 3.6.x is installed, and Sphinx >= 3.5 if Python 3.7 or newer is installed. Could you explain why? We are working (still) in an Ubuntu 18.04 environment where Python 3.6.9 is the OS-wide standard version for /usr/bin/python3 and there are no plans for switching. Most can work in a virtualenv, but some build nodes don't. I manually installed Sphinx 4.0.2 together with sphinxcontrib-needs 0.6.3 on a Pyhton 3.6.9 and gave it a spin - it works fine. As Sphinx 4 still supports Python 3.6.x, is this maybe just a wrongly declared dependency?

Best regards, Arwed

@danwos
Copy link
Member

danwos commented Jul 1, 2021

@arwedus Thanks for reporting.

@danieleades made some tests regarding Python 3.6 support and figured out, that some tests are failing with Python 3.6 and Sphinx >3.0. See #154 (comment)

However, I agree that from the Sphinx Dependency list itself, Python 3.6 and Sphinx >= 4.0 should be supported.

I will change the deps and our test-matrix and see what works.
Maybe we just need to change some tests.

@danieleades
Copy link
Contributor

Yeah that's about right. I determined that

  • some tests fail
  • it would likely involve special-casing some imports or logic (I didn't investigate)

Arwed it may be that 3.6 is supported at runtime, but not during development. For example if a test fails because it relies on a particular fixture. I'm speculating here.

Also a lot of the issues I ran into early on with dependency resolution were solved by moving nox from the dev environment to the host environment. That might have helped already.

Perhaps we can reframe the question slightly- which features of sphinx-needs are you relying on that prevent you using an older version that supports the interpreter version you're using?

I'll find some time to take another look at this!

danwos added a commit that referenced this issue Jul 1, 2021
danwos added a commit that referenced this issue Jul 1, 2021
@danwos
Copy link
Member

danwos commented Jul 1, 2021

@danieleades: Thanks for joining this discussion so quickly.

I have created PR #314 and activated in general Sphinx 4.0 tests for all Python versions.
Our github config missed totally Sphinx 4.0 up to now.

The CI throws already some errors for this PR.
Unfortunately is stops after first failed tests/job.
Any idea how I can get github actions to test also the rest? So we get a nice big picture about what combinations are working?
Tried it with continue-on-error: true and it works. But also the failed jobs got green. So we would need to check by hand, if a job as failed. Not so nice....

@danieleades
Copy link
Contributor

danwos added a commit that referenced this issue Jul 1, 2021
@danwos
Copy link
Member

danwos commented Jul 1, 2021

Thanks for the hint 👍 It has worked as expected.

And here are the results for the current PR #314 :
image

A little strange that no Python 3.6 based job has passed. No matter what Sphinx version was used.
The PR contains changes in the deps-list, test matrix and poetry.lock only. No code changes.
Need some time to understand this.

@danieleades
Copy link
Contributor

It will impact the version resolution of all the other dependencies, including transitive dependencies. Possibly difficult to solve. But it could be a simple change.

Older python libraries (or older versions of current libraries) tend to be poorly specified in terms of their own dependencies, which causes issues in dependency resolution. The situation is much better these days of course, since most projects are using some form of package management

@arwedus
Copy link
Contributor Author

arwedus commented Jul 6, 2021

actually I do get some issues when building a bigger sphinx-needs project with Sphinx 4.0.x and Python 3.6. But they do not seem to be sphinx-needs related. Maybe Sphinx did not update their own Python dependency right, or one of the other extensions. I'll just try to get things in a virtualenv... thank you for investigating though :).

@arwedus
Copy link
Contributor Author

arwedus commented Jul 7, 2021

@danwos there's another small issue: sphinxcontrib-needs v 0.7 will deinstall Sphinx 4.0.3 and install Sphinx 4.0.0 instead.
The bugfix releases should be compatible.

@danwos
Copy link
Member

danwos commented Jul 8, 2021

Yeah, I noticed this as well. Sh**.
Should be fixed on master with above PR.

danwos added a commit that referenced this issue Jul 8, 2021
danwos added a commit that referenced this issue Jul 8, 2021
@danwos danwos added this to To do in To-Do Priorities Aug 17, 2021
@arwedus
Copy link
Contributor Author

arwedus commented Apr 24, 2023

this issue is mostly fixed, and mostly obsolete now :-).

@arwedus arwedus closed this as completed Apr 24, 2023
To-Do Priorities automation moved this from Prio 3 to Done Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants