-
Notifications
You must be signed in to change notification settings - Fork 6
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
I want to use just the qualname_overrides functionality of elegant_typehints within having sphinx_autodoc_typehints
installed
#64
Comments
Actually, I've just found a comment sphinx-doc/sphinx#10151 (comment) that gives a somewhat different solution to the problem, that seems to be original to the comment's author, and not be GPL restricted. I may just use that for now, as long as you're happy with that, and don't feel that I'm in some way circumventing the GPL license of your code doing so? |
Hi! Why do you think that importing GPL code is incompatible with other licenses? As long as you don’t distribute binaries with modified GPL code in it, you’re fine. In general, I’d be very happy to extract that functionality to another sub-extension. I would have preferred if sphinx-doc/sphinx#9039 was merged two years ago, then we wouldn‘t have the need. |
Hi, I'm not very knowledgeable here (and not a lawyer etc.), but my reading of some of the FAQs of the GPL makes me worried about this, e.g. here:
...
Although notably I can't find a definition of what is considered a 'plug-in' in this context. However, your question also prompted me to realise that we are uploading a Docker image of our code to an internal registry, so that could count as distributing a 'non-source form' of the GPL code if we were to take a dependency on scanpydoc. In general, since my project is developed within a corporate context, I think while I have significant uncertainty here, it wouldn't be fair on my employer to potentially expose them to legal risk (although I recognise this uncertainty may be entirely due to my lack of understanding). |
I think the simplest thing for me is probably if I just use the workaround here: sphinx-doc/sphinx#10151 (comment) - as long as you feel comfortable with that? I think it's different enough to be it's own original work unrelated to scanpydoc, but I just thought I'd check you don't feel uncomfortable with me doing that if you feel like I'm not giving you appropriate credit for your work fixing the problem (even if it is legal for me to use the code in the comment if it's sufficiently unrelated to scanpydoc). Thanks for your time replying to this issue, given its licensing related and the 'problem' is basically due to my restrictions in my corporate environment, rather than a technical one with thecode, so I really appreciate you engaging. |
Sure, no problem. I assume using that should be safe, as it’s from a comment in the sphinx repo: https://opensource.stackexchange.com/a/7900
I totally get that! If you prefer my solution from a technical standpoint, I’m happy to relicense it: As I think this particular piece of code shouldn’t be necessary, I don’t feel like it deserves protection (it’s only a workaround, not a solution to a “natural” problem)
Hmm, I should think about this. My licensing intention is that everyone should be able to use my code, but as soon as you make money off something using a modified version of my code, you have to make the modification public. Seems like I probably misunderstood the GPL … Maybe I should use LGPL, but I have to read more on that. With AWS and so on stealing open source projects and offering them as a service without contributing back improvements, my conviction to use some kind of copyleft got even stronger. But I need to carefully consider what to use. Thank you for kicking this off. |
Hi,
Thanks for scanpydoc, it looks great!
I found it via this sphinx issue which is closely related to the problem I'm facing - I'm trying to get Intersphinx links working with my type hints (using just
autodoc_typehints = "description"
, docs here, notsphinx_autodoc_typehints
), but have issues with qualnames.I basically want to just use the
qualname_overrides
option that scanpydoc.elegant_typehints introduces (relevant code here and here).If I try to use scanpydoc.elegant_typehints, I get an error because I'm not currently using 'sphinx_autodoc_typehints' (just
autodoc_typehints = "description"
). I can't see whatsphinx_autodoc_typehints
would add for me. I also don't particularly want the reformatting in elegant_typehints or the typle return type change.However, scanpydoc is GPLv3 licensed, and my project (here if you're interested) is Apache v2 (and I don't have scope to change due to corporate policies).
My impression is that you're happy for scanpydoc to be used as a dependency in non-GPL downstream projects - since scanpy is BSD 3-Clause.
How would you feel about either:
Me opening PRs to add config options to switch off(/on) the different parts of elegant_typehints in the numbered list here, and relaxing the requirement on
sphinx_autodoc_typehints
. Then I can use scandocpy as a dependency, if I'm correct that you're happy for scanpydoc to be used as a python dependency of an Apache 2.0 project?Agreeing on a way I could extract and modify just the qualname_overrides part of the code:
Given your work on the MIT-licensed Sphinx, especially in this area (e.g. this pr related to the issue), I thought I would be cheeky, and ask whether you would consider (dual-)licensing (some of) scanpydoc under a license compatible with Apache v2 (Apache, MIT, BSD etc.)?
That way I could extract the relevant lines from scanpydoc just for qualname_overrides, and use them in my project (with attribution, license details etc.).
I realise that a licensing change is a big ask, and please feel free to say 'no, the project will remain GPLv3, license your project as GPLv3 if you want to use it'. I thought it was worth reaching out just in case, especially given your contributions to Sphinx previously.
This is also something where I feel like now I've seen your code implementing this fix, given the small-ish size of the fix, if I 'write the code from scratch myself', it's undoubtedly going to take inspiration and look like your code, so I feel like I wouldn't be able to do this under the license constraints, so this issue would be very hard for me to work around 😞. Of course, that's my problem, not yours.
The text was updated successfully, but these errors were encountered: