From 120a981207aacb7453c0e064ec5b3d011ec68345 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 1 May 2014 18:10:16 +0200 Subject: [PATCH] [1.6.x] Fixed #22551 -- Made oracle backend method Python 3 compatible Thanks fatal10110 at gmail.com for the report. The fix is 1.6-only because that code has been refactored in 1.7 (6983201cfb). --- django/db/backends/oracle/base.py | 2 +- docs/releases/1.6.5.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 11ab5744ce..9b07b9dcb7 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -446,7 +446,7 @@ WHEN (new.%(col_name)s IS NULL) bounds = super(DatabaseOperations, self).year_lookup_bounds_for_datetime_field(value) if settings.USE_TZ: bounds = [b.astimezone(timezone.utc).replace(tzinfo=None) for b in bounds] - return [b.isoformat(b' ') for b in bounds] + return [b.isoformat(str(' ')) for b in bounds] def combine_expression(self, connector, sub_expressions): "Oracle requires special cases for %% and & operators in query expressions" diff --git a/docs/releases/1.6.5.txt b/docs/releases/1.6.5.txt index 9c612f7454..9abe6702cc 100644 --- a/docs/releases/1.6.5.txt +++ b/docs/releases/1.6.5.txt @@ -9,4 +9,5 @@ Django 1.6.5 fixes several bugs in 1.6.4. Bugfixes ======== -* ... +* Made the ``year_lookup_bounds_for_datetime_field`` Oracle backend method + Python 3 compatible (`#22551 `_).