#32015: BUG: psycopg2 json is not loaded with connections.cursor -------------------------------------+------------------------------------- Reporter: mblance | Owner: nobody Type: | Status: new Uncategorized | Component: | Version: 3.1 Uncategorized | Keywords: psycopg2, database, Severity: Normal | postgresql, json, jsonb, jsonfield Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Since the upgrade from v3->v3.1, I discovered this regression in the psycopg2 cursor. jsonb results from sql queries are not loaded into python data structures. This causes issues when dumping and loading again, the json fields do not get loaded on the front. The offending line of code can be found here https://github.com/django/django/blob/master/django/db/backends/postgresql/base.py#L206 in the postgresql backend.
This code was introduced to work around issues with specifying a JSONDecoder in the new JSONField. Attempting to implement a workaround by creating additional connections sort of works, but causes freezing during cleanup of test cases, and maybe more serious issues elsewhere. -- Ticket URL: <https://code.djangoproject.com/ticket/32015> 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/050.0ee86cefa55b6ad78cc3651aafc5e8f9%40djangoproject.com.