#18 Add openidc-client as install_requires
Opened 2 years ago by nielsenb. Modified 2 years ago
fedora-qa/ nielsenb/relval dependency-fix  into  main

file modified
+3 -2
@@ -21,8 +21,9 @@ 

      url = "https://pagure.io/fedora-qa/relval",

      packages = ["relval"],

      include_package_data = True,

-     install_requires = ['wikitcms>=2.6.0', 'setuptools', 'markupsafe', 'six',

-                         'fedfind>=2.8.0', 'mwclient', 'python-bugzilla'],

+     install_requires = ['wikitcms>=2.6.0', 'setuptools', 'markupsafe',

+                         'openidc-client', 'six', 'fedfind>=2.8.0', 'mwclient',

+                         'python-bugzilla'],

      long_description=read('README.md'),

      classifiers=[

          "Development Status :: 3 - Alpha",

Fixes "ImportError: python-openidc-client is needed for OIDC" error when
calling site.login().

Well, this is the wrong place, because it's python-wikitcms where all the login code is.

In python-wikitcms it's trickier. Technically speaking, the dependency is optional, or rather, it's required only for using wikis on fedoraproject.org of version 1.29 or higher.

So, very strictly speaking, it's not actually a hard dependency. In practice, right now, the only wiki instances you would be interested in using wikitcms with require it, so it almost is. However, I'm not 100% sure I'd want to add this to wikitcms, even, because one possible short to medium term future is that the infra team wants to get rid of the general-purpose wiki, and we in QA replace it with a special-purpose instance of the wiki that exists only for wikitcms. Which I guess might not necessarily use OIDC...

I guess you could say that since relval hardcodes the wiki location and only uses ones that use OIDC, you could make a case for having this requirement at relval level, but again, the possible-future makes it a bit fuzzy...

I guess you could say that since relval hardcodes the wiki location and only uses ones that use OIDC, you could make a case for having this requirement at relval level, but again, the possible-future makes it a bit fuzzy...

I agree with this logic more than the other comment. Technically wikitcms can function without OIDC, but as it currently stands relval errors out without openidc-client. If something changes in the future, it isn't a significant change to undo.

My goal here to to make it so someone doing what I consider "standard" Python development flow can contribute without dependency hunting. By standard flow, I mean: checkout project, create virtual environment / venv / pipenv, pip install -e . inside environment, start hacking.

As it currently stands, doing the above yields "ImportError: python-openidc-client is needed for OIDC" the first time they try to run relval unless the dependency is already satisfied system wide.

You could instead argue this should be handled with a requirements-dev.txt file.

Metadata