django-polymorphic icon indicating copy to clipboard operation
django-polymorphic copied to clipboard

Replace deepcopy of the Q object

Open rrauenza opened this issue 1 year ago • 6 comments

rrauenza avatar May 09 '23 19:05 rrauenza

Still trying to run unit tests locally, hoping marking this PR as ready would trigger some on project side.

rrauenza avatar May 09 '23 19:05 rrauenza

See https://github.com/django-polymorphic/django-polymorphic/issues/542

rrauenza avatar May 09 '23 20:05 rrauenza

Can also confirm that is indeed fixing the issue in deepcopying Q objects. (reproduced on Python 3.7)

TomHaii avatar Jun 07 '23 11:06 TomHaii

Is there some unittest can cover the case it fixes?

alphatownsman avatar Jul 06 '23 22:07 alphatownsman

I think if the existing unit tests work, that is sufficient, since it shows the change doesn't break from the current method of copying.

We could assign a non picklable object attr to one of the children to prevent future regression?

rrauenza avatar Jul 07 '23 14:07 rrauenza

+1 to adding a non picklable object attr to prevent future regressions or even an explicit scenario that should break in 3.7 without this fix

AdamDonna avatar Nov 23 '23 10:11 AdamDonna