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

Support pickleable types in Q object #129

Open
archie-ai-code-explain-pr-review bot opened this issue Jul 13, 2024 · 0 comments
Open

Support pickleable types in Q object #129

archie-ai-code-explain-pr-review bot opened this issue Jul 13, 2024 · 0 comments

Comments

@archie-ai-code-explain-pr-review
  • The issue arises when using a reference to a non-pickleable type of object, such as dict_keys, in a Q object.
  • This causes the | operator to fail, as the Q object cannot be properly serialized and deserialized.
  • The example provided demonstrates that Q(x__in={}.keys()) works, but Q() | Q(x__in={}.keys()) raises a TypeError due to the non-pickleable dict_keys object.
  • While a workaround is to use Q(x__in={}) instead, it would be desirable for the Q object to support pickleable types, such as lists or tuples, to avoid this issue.
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

No branches or pull requests

0 participants