Skip to content

Fix ATOMIC_REQUESTS incompatibility with async views#72

Merged
7tg merged 1 commit intomainfrom
fix/atomic-requests-compatibility
Feb 8, 2026
Merged

Fix ATOMIC_REQUESTS incompatibility with async views#72
7tg merged 1 commit intomainfrom
fix/atomic-requests-compatibility

Conversation

@7tg
Copy link
Owner

@7tg 7tg commented Feb 8, 2026

Summary

  • Apply transaction.non_atomic_requests decorator to mcp_endpoint and MCPHTTPView async views, preventing Django from wrapping them in transaction.atomic() when ATOMIC_REQUESTS=True

Fixes #67

Test plan

  • Verify mcp_endpoint has _non_atomic_requests attribute set for the default database
  • Verify MCPHTTPView.as_view() has _non_atomic_requests attribute set for the default database
  • All 380 tests pass, lint clean

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@7tg 7tg merged commit 0754c94 into main Feb 8, 2026
17 checks passed
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.

Incompatible with Django ATOMIC_REQUESTS database setting

1 participant