#34484: HttpRequest.__deepcopy__ doesn't deepcopy attributes ---------------------------------+-------------------------------------- Reporter: Adam Johnson | Owner: nobody Type: Bug | Status: new Component: HTTP handling | Version: 4.2 Severity: Release blocker | 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 Adam Johnson): Maybe... On the HttpResponse change, it does seem quite hacky to have HttpResponse know about the attributes the test client adds and remove them at pickle time. It will cause issues in tests that end up copying responses and expect the attributes to still exist. There are definitely tests out there that make requests within setUp and store the responses for assertions within actual test methods - this is a pattern that Will Vincent promotes in his books... The issue will occur if such a test is converted to use setUpTestData, which can easily happen since it's promoted for speed. -- Ticket URL: <https://code.djangoproject.com/ticket/34484#comment:4> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070187719b1bd6-f7f9efe0-63cc-4430-971d-8fb919722491-000000%40eu-central-1.amazonses.com.