-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
python311Packages.mozilla-django-oidc: init at 4.0.1; peering-manager: add oidc support #278982
Conversation
Problem with openssl - solvedI'm still tryin to figure out how to install openssl...Jan 05 19:55:40 netbox gunicorn[21935]: Traceback (most recent call last): Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker Jan 05 19:55:40 netbox gunicorn[21935]: worker.init_process() Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process Jan 05 19:55:40 netbox gunicorn[21935]: self.load_wsgi() Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi Jan 05 19:55:40 netbox gunicorn[21935]: self.wsgi = self.app.wsgi() Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/app/base.py", line 67, in wsgi Jan 05 19:55:40 netbox gunicorn[21935]: self.callable = self.load() Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 58, in load Jan 05 19:55:40 netbox gunicorn[21935]: return self.load_wsgiapp() Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp Jan 05 19:55:40 netbox gunicorn[21935]: return util.import_app(self.app_uri) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2cpaym60w5gm96wbfj4bwm0802q16py6-python3.11-gunicorn-21.2.0/lib/python3.11/site-packages/gunicorn/util.py", line 371, in import_app Jan 05 19:55:40 netbox gunicorn[21935]: mod = importlib.import_module(module) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module Jan 05 19:55:40 netbox gunicorn[21935]: return _bootstrap._gcd_import(name[level:], package, level) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 1204, in _gcd_import Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 1176, in _find_and_load Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 1147, in _find_and_load_unlocked Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 690, in _load_unlocked Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 940, in exec_module Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 241, in _call_with_frames_removed Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/8rag7izykzf0ksyv3m7pal1c6wdf3qnj-peering-manager-1.8.2/opt/peering-manager/peering_manager/wsgi.py", line 16, in Jan 05 19:55:40 netbox gunicorn[21935]: application = get_wsgi_application() Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application Jan 05 19:55:40 netbox gunicorn[21935]: return WSGIHandler() Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/core/handlers/wsgi.py", line 118, in __init__ Jan 05 19:55:40 netbox gunicorn[21935]: self.load_middleware() Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/core/handlers/base.py", line 40, in load_middleware Jan 05 19:55:40 netbox gunicorn[21935]: middleware = import_string(middleware_path) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/utils/module_loading.py", line 30, in import_string Jan 05 19:55:40 netbox gunicorn[21935]: return cached_import(module_path, class_name) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/yqxwxb7a1y1zj0fwi4ra4fzbjlpbvk6q-python3.11-Django-4.2.7/lib/python3.11/site-packages/django/utils/module_loading.py", line 15, in cached_import Jan 05 19:55:40 netbox gunicorn[21935]: module = import_module(module_path) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module Jan 05 19:55:40 netbox gunicorn[21935]: return _bootstrap._gcd_import(name[level:], package, level) Jan 05 19:55:40 netbox gunicorn[21935]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 1204, in _gcd_import Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 1176, in _find_and_load Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 1147, in _find_and_load_unlocked Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 690, in _load_unlocked Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 940, in exec_module Jan 05 19:55:40 netbox gunicorn[21935]: File "", line 241, in _call_with_frames_removed Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2x272drmdsldbzqb7p1qhm0k3g13ybgn-python3.11-mozilla-django-oidc-2.0.0/lib/python3.11/site-packages/mozilla_django_oidc/middleware.py", line 12, in Jan 05 19:55:40 netbox gunicorn[21935]: from mozilla_django_oidc.auth import OIDCAuthenticationBackend Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/2x272drmdsldbzqb7p1qhm0k3g13ybgn-python3.11-mozilla-django-oidc-2.0.0/lib/python3.11/site-packages/mozilla_django_oidc/auth.py", line 15, in Jan 05 19:55:40 netbox gunicorn[21935]: from josepy.b64 import b64decode Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/bb2ah9gvjpv7fdn4hdacfvigh9j1vmc7-python3.11-josepy-1.13.0/lib/python3.11/site-packages/josepy/__init__.py", line 40, in Jan 05 19:55:40 netbox gunicorn[21935]: from josepy.json_util import ( Jan 05 19:55:40 netbox gunicorn[21935]: File "/nix/store/bb2ah9gvjpv7fdn4hdacfvigh9j1vmc7-python3.11-josepy-1.13.0/lib/python3.11/site-packages/josepy/json_util.py", line 14, in Jan 05 19:55:40 netbox gunicorn[21935]: from OpenSSL import crypto Jan 05 19:55:40 netbox gunicorn[21935]: ModuleNotFoundError: No module named 'OpenSSL'Shouldn't this be a dependency of `josepy` already? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/oidc-support-for-peering-manager/37875/1 |
Whoops, this wasn't intended... |
I just noticed that the latest version of |
When trying to use Traceback (most recent call last): File "/nix/store/z42spfv8zgigkvd3m68j7hbzcj7dpahz-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook raise BackendUnavailable(data.get('traceback', '')) pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last): File "/nix/store/z42spfv8zgigkvd3m68j7hbzcj7dpahz-python3.11-pyproject-hooks-1.0.0/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend obj = import_module(mod_path) ^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1126, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1140, in _find_and_load_unlocked ModuleNotFoundError: No module named 'setuptools' |
Result of 1 package blacklisted:
4 packages built:
Any idea why the blacklisted package |
It looks like it's working. Thanks a lot to you @NetaliDev for pointing me in the right direction. |
You're welcome :D I have added OIDC support to our Peering-Manager at work today and stumbled over this PR and just shared my own solution :) |
version 4.0.1 of mozilla-django-oidc does work for peering-manager. |
@yu-re-ka what do you think about the proposed changes? |
pkgs/development/python-modules/mozilla-django-oidc/default.nix
Outdated
Show resolved
Hide resolved
Python import error for tests; fixed by adjusting python path as suggested in yu-re-ka's comment@nix { "action": "setPhase", "phase": "installCheckPhase" } Running phase: installCheckPhase Traceback (most recent call last): File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/bin/.django-admin-wrapped", line 9, in sys.exit(execute_from_command_line()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/commands/test.py", line 24, in run_from_argv super().run_from_argv(argv) File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/base.py", line 404, in run_from_argv parser = self.create_parser(argv[0], argv[1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/base.py", line 367, in create_parser self.add_arguments(parser) File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/core/management/commands/test.py", line 54, in add_arguments test_runner_class = get_runner(settings, self.test_runner) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/test/utils.py", line 388, in get_runner test_runner_class = test_runner_class or settings.TEST_RUNNER ^^^^^^^^^^^^^^^^^^^^ File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/conf/__init__.py", line 102, in __getattr__ self._setup(name) File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/conf/__init__.py", line 89, in _setup self._wrapped = Settings(settings_module) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/a4jv5jy6hlz40lhgkk2zrxvy0nhclm64-python3.12-django-4.2.12/lib/python3.12/site-packages/django/conf/__init__.py", line 217, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/lib/python3.12/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1310, in _find_and_load_unlocked File "", line 488, in _call_with_frames_removed File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1324, in _find_and_load_unlocked ModuleNotFoundError: No module named 'tests'I don't know why this is not working... |
I will have a look in a bit |
Thanks a lot. Take you're time :) |
Do you mind if I push the fix directly to your branch? |
What I did specifically to find the solution to this:
The resulting diff is this:
|
This looks much better. Any idea why the Result of 1 package blacklisted:
12 packages built:
For now I'm going to keep the two additional packages, maybe someone else need them for anything... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we have the same issue of running the unit tests for readthedocs-sphinx-search and bumpversion 😬
I would also check once more if all the nativeCheckInputs are actually required, and only leave those which are |
Just in case we need these later...
|
Actually I don't think that any other package than djangorestframework is required. No idea what these shitty dev dependencies are, but they are not for testing... Thats why I asked, if I need to add all of them (include the two that weren't packaged before). Maybe I misunderstood what you meant... I'm going to push the thing with just django rest framework in it. These had been added before...
|
pkgs/development/python-modules/mozilla-django-oidc/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/mozilla-django-oidc/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/python-modules/mozilla-django-oidc/default.nix
Outdated
Show resolved
Hide resolved
please rebase |
Co-authored-by: Yureka <[email protected]> Co-authored-by: Sandro <[email protected]>
Co-authored-by: Jenny <[email protected]> Co-authored-by: Sandro <[email protected]>
@SuperSandro2000 done |
Result of 2 packages blacklisted:
4 packages built:
|
@JohnRTitor Would it be possible to backport this to 24.05? |
Successfully created backport PR for |
Sure. |
Description of changes
Packaged
mozilla-django-oidc
which is a requirement ofpeering-manager
when using oidc (see documentation).Added oidc configuration options to
peering-manager
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.