[Python-modules-commits] [python-django-jsonfield] 03/03: New upstream release incorporating the latest patch for proper support of PostgreSQL >= 9.4.

Raphaël Hertzog hertzog at moszumanska.debian.org
Thu Jul 21 08:48:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

hertzog pushed a commit to branch master
in repository python-django-jsonfield.

commit 3fc2fb7f4619fb7dda41f304f18d886efa355fa2
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Thu Jul 21 10:46:58 2016 +0200

    New upstream release incorporating the latest patch for proper support of PostgreSQL >= 9.4.
---
 debian/changelog                                   |  7 ++++
 ...ostgreSQL-backend-to-not-do-JSON-decoding.patch | 47 ----------------------
 debian/patches/series                              |  1 -
 3 files changed, 7 insertions(+), 48 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5e7de92..3114c15 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-django-jsonfield (1.0.1-1) unstable; urgency=medium
+
+  * New upstream release incorporating the latest patch for proper support of
+    PostgreSQL >= 9.4.
+
+ -- Raphaël Hertzog <hertzog at debian.org>  Thu, 21 Jul 2016 10:45:17 +0200
+
 python-django-jsonfield (1.0.0-2) unstable; urgency=medium
 
   * Add patch to avoid failures with PostgreSQL >= 9.4.
diff --git a/debian/patches/Configure-PostgreSQL-backend-to-not-do-JSON-decoding.patch b/debian/patches/Configure-PostgreSQL-backend-to-not-do-JSON-decoding.patch
deleted file mode 100644
index fc0e27d..0000000
--- a/debian/patches/Configure-PostgreSQL-backend-to-not-do-JSON-decoding.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: =?utf-8?q?Rapha=C3=ABl_Hertzog?= <hertzog at debian.org>
-Date: Fri, 24 Jun 2016 23:29:06 +0200
-Subject: Configure PostgreSQL backend to not do JSON decoding
-
-With Psycopg >= 2.5.4, "jsonb" fields are returned directly under a
-decoded form and we are not ready for that. Use
-psycopg2.extras.register_default_jsonb() to disable this behaviour on
-Django managed connections.
-
-Bug: https://bitbucket.org/schinckel/django-jsonfield/issues/53/typeerror-when-using-version-100-with
-Applied-Upstream: https://bitbucket.org/schinckel/django-jsonfield/commits/221c256824d495bde6dba17a66b0beeaa56287de
----
- jsonfield/fields.py | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/jsonfield/fields.py b/jsonfield/fields.py
-index 551b6eb..befef2c 100644
---- a/jsonfield/fields.py
-+++ b/jsonfield/fields.py
-@@ -4,6 +4,7 @@ import json
- from django.core.exceptions import ValidationError
- from django.conf import settings
- from django.db import models
-+from django.db.backends.signals import connection_created
- from django.utils.translation import ugettext_lazy as _
- from django.utils import six
- 
-@@ -150,3 +151,19 @@ class TypedJSONField(JSONField):
-             else:
-                 v(value)
- 
-+
-+def configure_database_connection(connection, **kwargs):
-+    if connection.vendor != 'postgresql':
-+        return
-+
-+    # Ensure that psycopg does not do JSON decoding under the hood
-+    # We want to be able to do our own decoding with our own options
-+    import psycopg2.extras
-+    if hasattr(psycopg2.extras, 'register_default_jsonb'):
-+        psycopg2.extras.register_default_jsonb(
-+            connection.connection,
-+            globally=False,
-+            loads=lambda x: x)
-+
-+
-+connection_created.connect(configure_database_connection)
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index f305046..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-Configure-PostgreSQL-backend-to-not-do-JSON-decoding.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django-jsonfield.git



More information about the Python-modules-commits mailing list