#29330: Regression in master: cannot pickle queryset with expression
-------------------------------------+------------------------------------- Reporter: Daniel | Owner: nobody Miller | Type: Bug | Status: new Component: Database | Version: master layer (models, ORM) | Severity: Normal | Keywords: Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Removal of `BaseExpression.__getstate__` in [https://github.com/django/django/pull/9134#pullrequestreview-112057277 PR 9134] caused querysets with expressions derived from `BaseExpression` to no longer be pickle-able. Error: {{{ Traceback (most recent call last): File "/home/travis/build/millerdev/django-cte/tests/test_recursive.py", line 212, in test_pickle_recursive_cte_queryset pickled_qs = pickle.loads(pickle.dumps(regions)) AttributeError: Can't pickle local object 'BaseExpression.convert_value.<locals>.<lambda>' }}} Seen here: https://travis-ci.org/millerdev/django-cte/jobs/366128465 Steps to reproduce: - Clone [https://github.com/dimagi/django-cte django-cte] - Make a virtualenv any way you prefer. - `pip install git+https://github.com/django/django.git@master` (or however you prefer to install django master). - `pip install nose ` - `nosetests tests.test_recursive:TestRecursiveCTE.test_pickle_recursive_cte_queryset` - Observe pickle error. -- Ticket URL: <https://code.djangoproject.com/ticket/29330> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.9bdb4760aa8a1a4b5a7f60f741c29de3%40djangoproject.com. For more options, visit https://groups.google.com/d/optout. |
#29330: Regression in master: cannot pickle queryset with expression
-------------------------------------+------------------------------------- Reporter: Daniel Miller | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: master (models, ORM) | Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by Daniel Miller): https://github.com/django/django/pull/9878 -- Ticket URL: <https://code.djangoproject.com/ticket/29330#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.ff726c2d500636c2687fca1bd7874ed4%40djangoproject.com. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Django
#29330: Regression in master: cannot pickle queryset with expression
-------------------------------------+------------------------------------- Reporter: Daniel Miller | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: master (models, ORM) | Severity: Normal | Resolution: Keywords: | Triage Stage: Ready for | checkin Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Tim Graham): * stage: Unreviewed => Ready for checkin -- Ticket URL: <https://code.djangoproject.com/ticket/29330#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.c6b79ee9d79e85be8c624e2c69c014e2%40djangoproject.com. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Django
#29330: Regression in master: cannot pickle queryset with expression
-------------------------------------+------------------------------------- Reporter: Daniel Miller | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: master (models, ORM) | Severity: Normal | Resolution: fixed Keywords: | Triage Stage: Ready for | checkin Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Tim Graham <timograham@…>): * status: new => closed * resolution: => fixed Comment: In [changeset:"60156750f66fe9e8b95067654b292f12a055393c" 60156750]: {{{ #!CommitTicketReference repository="" revision="60156750f66fe9e8b95067654b292f12a055393c" Fixed #29330 -- Fixed crash when pickling BaseExpression. Regression in cfff2af02be40106d4759cc6f8bfa476ce82421c. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/29330#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.fff7a598e463d07ef925186464e76f12%40djangoproject.com. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |