Q: Python >= 3.7 dependency
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
@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 https://github.com/useblocks/sphinxcontrib-needs/pull/154#issuecomment-703848972
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.
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!
@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....
I think you're looking for 'fail-fast'
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
Thanks for the hint :+1: It has worked as expected.
And here are the results for the current PR #314 :

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.
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
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 :).
@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.
Yeah, I noticed this as well. Sh**. Should be fixed on master with above PR.
this issue is mostly fixed, and mostly obsolete now :-).