#33333: Models with a BinaryField fail to deepcopy in setUpTestData() on
PostgreSQL.
-------------------------------------+-------------------------------------
Reporter: Adam Zimmerman | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
> considering changing memoryview to bytes might have serious memory
implications not plainly visible in tests.
Fixing #27813 would be somewhat of a breaking change on PostgreSQL as a
different type would be returned but I doubt it would have memory
implications in the sense of elevated memory usage.
In the end `memoryview` is a pointer to a sequence of bytes but these
bytes have to live somewhere when returned from the database backend and
made available to the client. Returning them proxied by a `memoryview`
instance or not should not make a significant difference in memory usage
beyond the size of the `memoryview` instance itself.
---
Mariusz, how do you want to proceed here? I have to admit I'm not sure how
to navigate the current state of things.
Should we submit a patch meant to be backported to 3.2 and 4.0 in
`setUpTestData` that solely deals with this particular edge case of models
and queryset with a `BinaryField` on Postgres to circumvent #27813? What
if we get other reports of users who ignored the deprecation warning for
other non-pickleable objects assigned during `setUpTestData`?
--
Ticket URL: <https://code.djangoproject.com/ticket/33333#comment:8>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.4398de57566216e3a3141843dc473445%40djangoproject.com.