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

Various fix for no_dereferencing context manager #2788

Merged

Conversation

bagerard
Copy link
Collaborator

@bagerard bagerard commented Dec 19, 2023

  • Fix no_dereferencing context manager which wasn't turning off auto-dereferencing correctly in some cases
  • Fix tests that were really broken (due to __exit__ swallowing the exception) ...
  • BREAKING CHANGE: no_dereferencing context manager no longer returns the class in enter
    as it was useless and making it look like it was returning a different class.

This means it is now just with no_dereferencing(User): instead of with no_dereferencing(User) as OtherUserClass:

Fixes #2504

…referencing correctly in some cases + fix tests
@bagerard bagerard force-pushed the fix_no_dereference_swallowing_errors branch from a935dc1 to a9285ef Compare December 19, 2023 22:52
@bagerard bagerard force-pushed the fix_no_dereference_swallowing_errors branch from a9285ef to 40dde29 Compare December 19, 2023 22:57
@bagerard bagerard merged commit cfb4265 into MongoEngine:master Dec 23, 2023
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.

test_no_dereference_context_manager_object_id not working
1 participant