Skip to content

Release/3.0.0 - #894

Draft
tomwojcik wants to merge 2 commits into
masterfrom
release/3.0.0
Draft

Release/3.0.0#894
tomwojcik wants to merge 2 commits into
masterfrom
release/3.0.0

Conversation

@tomwojcik

Copy link
Copy Markdown
Collaborator

No description provided.

@tomwojcik
tomwojcik changed the base branch from master to migrate-to-pytest-2 July 28, 2025 14:18
@codecov

codecov Bot commented Jul 30, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.46714% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.18%. Comparing base (1d4bdd0) to head (38a3c15).

Files with missing lines Patch % Lines
djoser/views/user/base.py 92.85% 2 Missing ⚠️
djoser/views/user/update_put.py 95.23% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##           migrate-to-pytest-2     #894      +/-   ##
=======================================================
+ Coverage                98.67%   99.18%   +0.50%     
=======================================================
  Files                       27       60      +33     
  Lines                      908     1224     +316     
=======================================================
+ Hits                       896     1214     +318     
+ Misses                      12       10       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@haxoza haxoza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dispatcher mechanizm looks a bit complicated, but do I get it correctly that it is the cost of splitting the "god" view and keeping the API the same?

Comment thread djoser/urls/utils.py
method = request.method
if method in method_view_map:
view_class = method_view_map[method]
return view_class.as_view()(request, *args, **kwargs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to support function based views?

@tomwojcik tomwojcik self-assigned this Jul 21, 2026
@tomwojcik
tomwojcik marked this pull request as draft July 21, 2026 20:15
tomwojcik and others added 2 commits August 1, 2026 18:32
Replace the 2.x god-object UserViewSet (CRUD plus nine @action methods,
with permission and serializer dispatch keyed on self.action) with
standalone views under djoser/views/, one module per endpoint, grouped by
domain: activation, me, password, token, user, username. Views are
configurable via the new VIEWS setting; hand-written URL configs replace
the DRF router, with method dispatchers where several views share a path.

2.x URL behavior is preserved: dispatcher callables carry csrf_exempt,
lookup regexes and format-suffix routes match 2.x, slash-less token/JWT
paths redirect with 308, and HIDE_USERS 404s regardless of permission
class.

Also enables the docformatter pre-commit hook (multi-line summaries) and
folds pytest.ini into pyproject.toml.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01879VbpYuX2k9AeUjUahxFV
Add tests for the VIEWS setting (test_configurable_views), the BaseMeAPIView
queryset behavior (test_me_base), dispatcher CSRF exemption and 405
handling, format-suffix and slash-less URL compatibility, and the
HIDE_USERS permission_denied contract on the split views. Update the URL
snapshot for the hand-written URL configs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01879VbpYuX2k9AeUjUahxFV
@tomwojcik
tomwojcik changed the base branch from migrate-to-pytest-2 to master August 1, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants