plain.oauth 0.25.0__py3-none-any.whl → 0.26.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plain/oauth/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # plain-oauth changelog
2
2
 
3
+ ## [0.26.0](https://github.com/dropseed/plain/releases/plain-oauth@0.26.0) (2025-09-12)
4
+
5
+ ### What's changed
6
+
7
+ - Model queries now use `.query` instead of `.objects` ([037a239](https://github.com/dropseed/plain/commit/037a239ef4))
8
+ - Minimum Python version increased to 3.13 ([d86e307](https://github.com/dropseed/plain/commit/d86e307efb))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - Update any custom code that references `OAuthConnection.objects` to use `OAuthConnection.query` instead
13
+
14
+ ## [0.25.1](https://github.com/dropseed/plain/releases/plain-oauth@0.25.1) (2025-08-22)
15
+
16
+ ### What's changed
17
+
18
+ - Updated admin navigation to place icons on sections rather than individual items ([5a6479a](https://github.com/dropseed/plain/commit/5a6479ac79))
19
+
20
+ ### Upgrade instructions
21
+
22
+ - No changes required
23
+
3
24
  ## [0.25.0](https://github.com/dropseed/plain/releases/plain-oauth@0.25.0) (2025-08-19)
4
25
 
5
26
  ### What's changed
plain/oauth/admin.py CHANGED
@@ -15,7 +15,7 @@ class ProvidersChartCard(ChartCard):
15
15
 
16
16
  def get_chart_data(self) -> dict:
17
17
  results = (
18
- OAuthConnection.objects.all()
18
+ OAuthConnection.query.all()
19
19
  .values("provider_key")
20
20
  .annotate(count=Count("id"))
21
21
  )
@@ -37,9 +37,9 @@ class ProvidersChartCard(ChartCard):
37
37
  class OAuthConnectionViewset(AdminViewset):
38
38
  class ListView(AdminModelListView):
39
39
  nav_section = "OAuth"
40
+ nav_icon = "link-45deg"
40
41
  model = OAuthConnection
41
42
  title = "Connections"
42
- nav_icon = "link-45deg"
43
43
  fields = ["id", "user", "provider_key", "provider_user_id"]
44
44
  cards = [ProvidersChartCard]
45
45
 
plain/oauth/models.py CHANGED
@@ -95,7 +95,7 @@ class OAuthConnection(models.Model):
95
95
  cls, *, provider_key: str, oauth_token: "OAuthToken", oauth_user: "OAuthUser"
96
96
  ) -> "OAuthConnection":
97
97
  try:
98
- connection = cls.objects.get(
98
+ connection = cls.query.get(
99
99
  provider_key=provider_key,
100
100
  provider_user_id=oauth_user.provider_id,
101
101
  )
@@ -134,7 +134,7 @@ class OAuthConnection(models.Model):
134
134
  Connect will either create a new connection or update an existing connection
135
135
  """
136
136
  try:
137
- connection = cls.objects.get(
137
+ connection = cls.query.get(
138
138
  user=user,
139
139
  provider_key=provider_key,
140
140
  provider_user_id=oauth_user.provider_id,
@@ -172,7 +172,7 @@ class OAuthConnection(models.Model):
172
172
 
173
173
  try:
174
174
  keys_in_db = set(
175
- cls.objects.values_list("provider_key", flat=True).distinct()
175
+ cls.query.values_list("provider_key", flat=True).distinct()
176
176
  )
177
177
  except (OperationalError, ProgrammingError):
178
178
  # Check runs on plain migrate, and the table may not exist yet
plain/oauth/providers.py CHANGED
@@ -144,7 +144,7 @@ class OAuthProvider:
144
144
 
145
145
  def handle_disconnect_request(self, *, request: HttpRequest) -> Response:
146
146
  provider_user_id = request.data["provider_user_id"]
147
- connection = OAuthConnection.objects.get(
147
+ connection = OAuthConnection.query.get(
148
148
  provider_key=self.provider_key, provider_user_id=provider_user_id
149
149
  )
150
150
  connection.delete()
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.oauth
3
- Version: 0.25.0
3
+ Version: 0.26.0
4
4
  Summary: Let users log in with OAuth providers.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
7
7
  License-File: LICENSE
8
- Requires-Python: >=3.11
8
+ Requires-Python: >=3.13
9
9
  Requires-Dist: plain-auth<1.0.0
10
10
  Requires-Dist: plain-models<1.0.0
11
11
  Requires-Dist: plain<1.0.0
@@ -1,18 +1,18 @@
1
- plain/oauth/CHANGELOG.md,sha256=jveYhfTEsrfQtDTQTxz4AE5zpapneZoKaaJl0GF9RcQ,2470
1
+ plain/oauth/CHANGELOG.md,sha256=8n2YLJ2UJAucV_A52-_bSgugvQiydzYMM-oggPSvI_I,3248
2
2
  plain/oauth/README.md,sha256=m3RRb01DLnoxBtzuYzESSe49OmsZ8P1R5_QsfCSRQgo,11077
3
3
  plain/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- plain/oauth/admin.py,sha256=9DAku8ubV6a_ByFer6UBS0G1cC_gGGHiI_iRP0b78nE,1310
4
+ plain/oauth/admin.py,sha256=s259OnTWGeOv3nVl4hAV-lNAIE4d2ObbG_97ENC6TuY,1308
5
5
  plain/oauth/config.py,sha256=0Q4IILBKQbIaxqeL9WRTH5Cka-BO3c3SOj1AdQIAJgc,167
6
6
  plain/oauth/default_settings.py,sha256=dlN1J9vSOjjxPNLp-0qe-cLTqwM4E69ZAx_8lpxMhaM,28
7
7
  plain/oauth/exceptions.py,sha256=yoZsq8XgzstuwbE2ihoet0nzpw_sVZgDrwUauh6hhUs,546
8
- plain/oauth/models.py,sha256=iCh_cyi2ajBN2IO8xBIHLyAyjk4OMgB4ziwDQymvwJo,6739
9
- plain/oauth/providers.py,sha256=YDftJUMyyfXgsDCkyTNxGwrbwXAowL0Hg6KrwrAN5S0,7793
8
+ plain/oauth/models.py,sha256=4CMjpXOIie6mqqPLcneM1ZTNokd3d90lFNnaxcoI80g,6733
9
+ plain/oauth/providers.py,sha256=hk4e-7WKZcou0-OWPV1x07JB4duef9hRFGeA9fANCoU,7791
10
10
  plain/oauth/urls.py,sha256=FYzpQwhvZdcat8n3f7RyA-1Q21finKb8JEyakSOjXXg,696
11
11
  plain/oauth/views.py,sha256=J2NCa37YediBTi82CfRlmsb45hFT6gWN6zMaFHhsDMM,2410
12
12
  plain/oauth/migrations/0001_initial.py,sha256=0NjfF7F3szhUXkpK3JvN10Xkat1QR-VvnX6Oed9iFmo,1940
13
13
  plain/oauth/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  plain/oauth/templates/oauth/callback.html,sha256=4CJG0oAN0xYjw2IPkjaL7B4hwlf9um9LI4CTu50E-yE,173
15
- plain_oauth-0.25.0.dist-info/METADATA,sha256=B3Bf2zRjB8LkHautDtWJ9RH7QMubpb-gt1ebvfc4H5s,11482
16
- plain_oauth-0.25.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
- plain_oauth-0.25.0.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
18
- plain_oauth-0.25.0.dist-info/RECORD,,
15
+ plain_oauth-0.26.0.dist-info/METADATA,sha256=pa7yWU-69bbXL19aWqr5BYmJdCWxNN04VKQfjiY9FnU,11482
16
+ plain_oauth-0.26.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
+ plain_oauth-0.26.0.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
18
+ plain_oauth-0.26.0.dist-info/RECORD,,