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

python3Packages.django-allauth: 0.61.1 -> 0.63.0 #306556

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gekoke
Copy link
Contributor

@gekoke gekoke commented Apr 24, 2024

Description of changes

Bumps version to 0.62.0

Things done

  • Built on platform(s)
    • x86_64-linux

@risicle
Copy link
Contributor

risicle commented Apr 25, 2024

@ofborg build python311Packages.django-allauth

@risicle
Copy link
Contributor

risicle commented Apr 25, 2024

@ofborg build python311Packages.dj-rest-auth

Fails for me, nixos x86_64

@gekoke
Copy link
Contributor Author

gekoke commented Apr 26, 2024

Good catch! Looks like dj-rest-auth erroneously imports from allauth.socialaccount.providers.facebook.views instead of allauth.socialaccount.providers.facebook.providers. This import worked incidentally, until some stuff got moved around just prior to django-allauth bumping its version to 0.62.0

The requirements.pip for dj-rest-auth's tests does specify django-allauth's version as ==0.61.1, so I suppose we should just wait until they bump the version to 0.62.x.

@risicle
Copy link
Contributor

risicle commented Apr 26, 2024

Suggest opening an upstream PR.

Incidentally, this is why the long-form pull request template guides you towards doing a nixpkgs-review for your PRs, so you can check you're not breaking anything.

@gekoke
Copy link
Contributor Author

gekoke commented Apr 27, 2024

PR in progress at iMerica/dj-rest-auth#627.

Will likely close this PR in favor of django-allauth 0.62.1 if/when that's merged.

@risicle
Copy link
Contributor

risicle commented Apr 27, 2024

👍

If it takes too long (many upstream projects are in no hurry to cut new releases) you can always pull the patch via fetchpatch.

@SuperSandro2000
Copy link
Member

Please update to 0.63.0 and also adopt the split dependencies in 0.62.0

diff --git a/pkgs/development/python-modules/django-allauth/default.nix b/pkgs/development/python-modules/django-allauth/default.nix
index 8a1f6dc8ac06..3d7103e6af47 100644
--- a/pkgs/development/python-modules/django-allauth/default.nix
+++ b/pkgs/development/python-modules/django-allauth/default.nix
@@ -46,18 +46,25 @@

   propagatedBuildInputs = [
     django
-    pyjwt
-    python3-openid
-    requests
-    requests-oauthlib
-  ] ++ pyjwt.optional-dependencies.crypto;
+  ];

   passthru.optional-dependencies = {
+    mfa = [
+      qrcode
+    ];
+    openid = [
+      python3-openid
+    ];
     saml = [
       python3-saml
     ];
-    mfa = [
-      qrcode
+    socialaccount = [
+      pyjwt
+      requests
+      requests-oauthlib
+    ] ++ pyjwt.optional-dependencies.crypto;
+    steam = [
+      python3-openid
     ];
   };

Co-authored-by: Gregor Grigorjan <gregor@grigorjan.net>
@gekoke gekoke changed the title python3Packages.django-allauth: 0.61.1 -> 0.62.0 python3Packages.django-allauth: 0.61.1 -> 0.63.0 May 15, 2024
@gekoke
Copy link
Contributor Author

gekoke commented May 15, 2024

Done in b9d0d91

@SuperSandro2000
Copy link
Member

PR in progress at iMerica/dj-rest-auth#627.

Will likely close this PR in favor of django-allauth 0.62.1 if/when that's merged.

We still need to fetch that patch

And django-mailman needs https://gitlab.com/mailman/django-mailman3/-/commit/f8fdbcab64892ca89a3dd27488c11258c5d893ec aka a dependency on python3-openid

@gekoke
Copy link
Contributor Author

gekoke commented May 19, 2024

PR in progress at iMerica/dj-rest-auth#627.
Will likely close this PR in favor of django-allauth 0.62.1 if/when that's merged.

We still need to fetch that patch

  patches = [
    # https://github.com/iMerica/dj-rest-auth/pull/597
    (fetchpatch {
      name = "disable-email-confirmation-ratelimit-in-tests-to-support-new-allauth.patch";
      url = "https://github.com/iMerica/dj-rest-auth/commit/c8f19e18a93f4959da875f9c5cdd32f7d9363bba.patch";
      hash = "sha256-Y/YBjV+c5Gw1wMR5r/4VnyV/ewUVG0z4pjY/MB4ca9Y=";
    })
    # https://github.com/iMerica/dj-rest-auth/pull/627
    (fetchpatch {
      name = "fix-test-breakages-with-django-allauth-v0.62.1.patch";
      url = "https://patch-diff.githubusercontent.com/raw/iMerica/dj-rest-auth/pull/627.patch";
      sha256 = "sha256-UUSB/wXxWoWjSqUUxQWW0A00LLgEtoOC9He8DQ6lGOg=";
    })
  ];

These two patches conflict, as the second was based off a newer revision that already had the first.

What's the best way to proceed? Is it ok to bump that package as well?

@alyssais
Copy link
Member

Unmerged PRs shouldn't be fetchpatched anyway, because the URLs aren't stable. So you can vendor versions of the two patches with conflicts resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants