Revert "upgrade python-django to CentOS 7.6 version"
This reverts commitd0e1110fda
. Patch [2/2] Revert Reason As part of CentOS 7.6 upgrade tasks, I have upgraded python-django from 1.8.14-1 to 1.11.13 from 3rd-party repo "https://dl.fedoraproject.org/pub/epel/testing/7/SRPMS/Packages/p/" However lately CentOS repo made a refreshment and we noticed in official repo, python-django still keeps version 1.8.14-1. “http://vault.centos.org/7.6.1810/cloud/Source/openstack-pike/common/” so we revert previous changed0e1110fda
. Story: 2004522 Task: 28853 Depends-On: https://review.openstack.org/#/c/629970/ Change-Id: Iadd18f4293e82cd50493a524bde96af455765b04
This commit is contained in:
parent
1bcac9b7b6
commit
9f41b6d9db
@ -11,12 +11,12 @@ diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec
|
||||
index d0e54bb..5cf8579 100644
|
||||
--- a/SPECS/python-django.spec
|
||||
+++ b/SPECS/python-django.spec
|
||||
@@ -22,7 +22,7 @@
|
||||
@@ -29,7 +29,7 @@
|
||||
Name: python-django
|
||||
|
||||
Version: 1.11.13
|
||||
-Release: 4%{?dist}
|
||||
+Release: 4.el7%{?_tis_dist}.%{tis_patch_ver}
|
||||
Version: 1.8.14
|
||||
-Release: 1%{?dist}
|
||||
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: A high-level Python Web framework
|
||||
|
||||
Group: Development/Languages
|
||||
|
@ -2,3 +2,4 @@ spec-include-TiS-patches.patch
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
||||
fix-build-failures-due-to-unwanted-sgid.patch
|
||||
meta-size-number-format.patch
|
||||
spec-patch-to-remove-SmartyPants.patch
|
@ -12,8 +12,8 @@ diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec
|
||||
index 5cf8579..79557de 100644
|
||||
--- a/SPECS/python-django.spec
|
||||
+++ b/SPECS/python-django.spec
|
||||
@@ -396,6 +396,8 @@ cd tests
|
||||
# %doc docs/_build/html/*
|
||||
@@ -421,6 +421,8 @@ popd
|
||||
%doc docs/_build/html/*
|
||||
|
||||
%files bash-completion
|
||||
+%dir %attr(0755,root,root) %{_datadir}/bash-completion
|
||||
|
@ -3,23 +3,30 @@ From: Wei Zhou <wei.zhou@windriver.com>
|
||||
Date: Wed, 11 Oct 2017 22:23:10 -0500
|
||||
Subject: [PATCH 1/1] meta size number format
|
||||
|
||||
Signed-off-by: SidneyAn <ran1.an@intel.com>
|
||||
---
|
||||
SPECS/python-django.spec | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
SPECS/python-django.spec | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec
|
||||
index 79557de..5bef0ec 100644
|
||||
--- a/SPECS/python-django.spec
|
||||
+++ b/SPECS/python-django.spec
|
||||
@@ -32,6 +32,7 @@ Source0: https://files.pythonhosted.org/packages/source/D/Django/Django-%
|
||||
@@ -41,6 +41,7 @@ Patch0: python-django-1.8.3-shell-completion.patch
|
||||
|
||||
# WRS
|
||||
Patch0: session-filebase-backend-fix.patch
|
||||
+Patch1: size-number-format.patch
|
||||
Patch1: session-filebase-backend-fix.patch
|
||||
+Patch2: size-number-format.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
@@ -154,6 +155,7 @@ rm -rf Django.egg-info
|
||||
|
||||
# WRS
|
||||
%patch1 -p1
|
||||
+%patch2 -p1
|
||||
|
||||
# empty files
|
||||
for f in \
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
@ -3,34 +3,34 @@ From: Scott Little <scott.little@windriver.com>
|
||||
Date: Fri, 26 Aug 2016 15:10:15 -0400
|
||||
Subject: [PATCH 1/1] WRS: spec-include-TiS-patches.patch
|
||||
|
||||
Signed-off-by: SidneyAn <ran1.an@intel.com>
|
||||
---
|
||||
SPECS/python-django.spec | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
SPECS/python-django.spec | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec
|
||||
index 269991d..d0e54bb 100644
|
||||
--- a/SPECS/python-django.spec
|
||||
+++ b/SPECS/python-django.spec
|
||||
@@ -30,6 +30,9 @@ License: BSD
|
||||
URL: http://www.djangoproject.com/
|
||||
Source0: https://files.pythonhosted.org/packages/source/D/Django/Django-%{version}.tar.gz
|
||||
@@ -39,6 +39,9 @@ Source0: https://files.pythonhosted.org/packages/source/D/Django/Django-%
|
||||
|
||||
Patch0: python-django-1.8.3-shell-completion.patch
|
||||
|
||||
+# WRS
|
||||
+Patch0: session-filebase-backend-fix.patch
|
||||
+Patch1: session-filebase-backend-fix.patch
|
||||
+
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
|
||||
@@ -149,6 +152,9 @@ rm -rf Django.egg-info
|
||||
|
||||
@@ -146,7 +149,7 @@ principle.
|
||||
%endif
|
||||
%patch0
|
||||
|
||||
%prep
|
||||
-%autosetup -n %{pkgname}-%{version}
|
||||
+%autosetup -n %{pkgname}-%{version} -p1
|
||||
|
||||
|
||||
%build
|
||||
+# WRS
|
||||
+%patch1 -p1
|
||||
+
|
||||
# empty files
|
||||
for f in \
|
||||
django/contrib/staticfiles/models.py \
|
||||
--
|
||||
1.8.3.1
|
||||
1.9.1
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec
|
||||
index 5bef0ec..827d08f 100644
|
||||
--- a/SPECS/python-django.spec
|
||||
+++ b/SPECS/python-django.spec
|
||||
@@ -42,6 +42,7 @@ Patch0: python-django-1.8.3-shell-completion.patch
|
||||
# WRS
|
||||
Patch1: session-filebase-backend-fix.patch
|
||||
Patch2: size-number-format.patch
|
||||
+Patch3: remove-SmartyPantsHTMLTranslator.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
@@ -156,6 +157,7 @@ rm -rf Django.egg-info
|
||||
# WRS
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
+%patch3 -p1
|
||||
|
||||
# empty files
|
||||
for f in \
|
@ -0,0 +1,50 @@
|
||||
From 3624581259cecf7ca2d695fbebc27fed2a4d941c Mon Sep 17 00:00:00 2001
|
||||
From: root <root@yow-cgts4-lx.wrs.com>
|
||||
Date: Thu, 5 Oct 2017 16:38:20 -0400
|
||||
Subject: [PATCH] No smartypants
|
||||
|
||||
|
||||
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
|
||||
index fd93194..aa3afbb 100644
|
||||
--- a/docs/_ext/djangodocs.py
|
||||
+++ b/docs/_ext/djangodocs.py
|
||||
@@ -12,7 +12,7 @@ from sphinx.builders.html import StandaloneHTMLBuilder
|
||||
from sphinx.util.compat import Directive
|
||||
from sphinx.util.console import bold
|
||||
from sphinx.util.nodes import set_source_info
|
||||
-from sphinx.writers.html import SmartyPantsHTMLTranslator
|
||||
+from sphinx.writers.html import HTMLTranslator
|
||||
|
||||
# RE for option descriptions without a '--' prefix
|
||||
simple_option_desc_re = re.compile(
|
||||
@@ -227,7 +227,7 @@ class VersionDirective(Directive):
|
||||
return ret
|
||||
|
||||
|
||||
-class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
|
||||
+class DjangoHTMLTranslator(HTMLTranslator):
|
||||
"""
|
||||
Django-specific reST to HTML tweaks.
|
||||
"""
|
||||
@@ -260,10 +260,10 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
|
||||
#
|
||||
def visit_literal_block(self, node):
|
||||
self.no_smarty += 1
|
||||
- SmartyPantsHTMLTranslator.visit_literal_block(self, node)
|
||||
+ HTMLTranslator.visit_literal_block(self, node)
|
||||
|
||||
def depart_literal_block(self, node):
|
||||
- SmartyPantsHTMLTranslator.depart_literal_block(self, node)
|
||||
+ HTMLTranslator.depart_literal_block(self, node)
|
||||
self.no_smarty -= 1
|
||||
|
||||
#
|
||||
@@ -300,7 +300,7 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
|
||||
old_ids = node.get('ids', [])
|
||||
node['ids'] = ['s-' + i for i in old_ids]
|
||||
node['ids'].extend(old_ids)
|
||||
- SmartyPantsHTMLTranslator.visit_section(self, node)
|
||||
+ HTMLTranslator.visit_section(self, node)
|
||||
node['ids'] = old_ids
|
||||
|
||||
|
@ -2,26 +2,24 @@ diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.
|
||||
index cd2457d..dc10ea3 100644
|
||||
--- a/django/template/defaultfilters.py
|
||||
+++ b/django/template/defaultfilters.py
|
||||
@@ -896,15 +896,15 @@ def filesizeformat(bytes_):
|
||||
if bytes_ < KB:
|
||||
value = ungettext("%(size)d byte", "%(size)d bytes", bytes_) % {'size': bytes_}
|
||||
elif bytes_ < MB:
|
||||
- value = ugettext("%s KB") % filesize_number_format(bytes_ / KB)
|
||||
+ value = ugettext("%s KiB") % filesize_number_format(bytes_ / KB)
|
||||
elif bytes_ < GB:
|
||||
- value = ugettext("%s MB") % filesize_number_format(bytes_ / MB)
|
||||
+ value = ugettext("%s MiB") % filesize_number_format(bytes_ / MB)
|
||||
elif bytes_ < TB:
|
||||
- value = ugettext("%s GB") % filesize_number_format(bytes_ / GB)
|
||||
+ value = ugettext("%s GiB") % filesize_number_format(bytes_ / GB)
|
||||
elif bytes_ < PB:
|
||||
- value = ugettext("%s TB") % filesize_number_format(bytes_ / TB)
|
||||
+ value = ugettext("%s TiB") % filesize_number_format(bytes_ / TB)
|
||||
@@ -905,15 +905,15 @@ def filesizeformat(bytes):
|
||||
if bytes < KB:
|
||||
value = ungettext("%(size)d byte", "%(size)d bytes", bytes) % {'size': bytes}
|
||||
elif bytes < MB:
|
||||
- value = ugettext("%s KB") % filesize_number_format(bytes / KB)
|
||||
+ value = ugettext("%s KiB") % filesize_number_format(bytes / KB)
|
||||
elif bytes < GB:
|
||||
- value = ugettext("%s MB") % filesize_number_format(bytes / MB)
|
||||
+ value = ugettext("%s MiB") % filesize_number_format(bytes / MB)
|
||||
elif bytes < TB:
|
||||
- value = ugettext("%s GB") % filesize_number_format(bytes / GB)
|
||||
+ value = ugettext("%s GiB") % filesize_number_format(bytes / GB)
|
||||
elif bytes < PB:
|
||||
- value = ugettext("%s TB") % filesize_number_format(bytes / TB)
|
||||
+ value = ugettext("%s TiB") % filesize_number_format(bytes / TB)
|
||||
else:
|
||||
- value = ugettext("%s PB") % filesize_number_format(bytes_ / PB)
|
||||
+ value = ugettext("%s PiB") % filesize_number_format(bytes_ / PB)
|
||||
|
||||
if negative:
|
||||
value = "-%s" % value
|
||||
- value = ugettext("%s PB") % filesize_number_format(bytes / PB)
|
||||
+ value = ugettext("%s PiB") % filesize_number_format(bytes / PB)
|
||||
|
||||
return avoid_wrapping(value)
|
||||
|
||||
|
@ -1 +1 @@
|
||||
mirror:Source/python-django-1.11.13-4.el7.src.rpm
|
||||
mirror:Source/python-django-1.8.14-1.el7.src.rpm
|
||||
|
@ -4,33 +4,52 @@ Date: Mon, 11 Jul 2016 16:20:13 -0400
|
||||
Subject: [PATCH 1/1] session-filebase-backend-fix
|
||||
|
||||
---
|
||||
Django-1.11.13 | 1 +
|
||||
django/contrib/sessions/backends/file.py | 3 +++
|
||||
2 files changed, 4 insertions(+)
|
||||
create mode 100644 Django-1.11.13
|
||||
Django-1.8.7 | 1 +
|
||||
django/contrib/sessions/backends/file.py | 15 ++++++++++++---
|
||||
2 files changed, 13 insertions(+), 3 deletions(-)
|
||||
create mode 120000 Django-1.8.7
|
||||
|
||||
diff --git a/Django-1.11.13 b/Django-1.11.13
|
||||
new file mode 100644
|
||||
index 0000000..b7c239f
|
||||
diff --git a/Django-1.8.7 b/Django-1.8.7
|
||||
new file mode 120000
|
||||
index 0000000..2fa6e7c
|
||||
--- /dev/null
|
||||
+++ b/Django-1.11.13
|
||||
+++ b/Django-1.8.7
|
||||
@@ -0,0 +1 @@
|
||||
+Django-1.11.13
|
||||
|
||||
+Django-1.8.7
|
||||
\ No newline at end of file
|
||||
diff --git a/django/contrib/sessions/backends/file.py b/django/contrib/sessions/backends/file.py
|
||||
index 41469c4..2b10b3e 100644
|
||||
--- a/django/contrib/sessions/backends/file.py
|
||||
+++ b/django/contrib/sessions/backends/file.py
|
||||
@@ -78,6 +78,9 @@ class SessionStore(SessionBase):
|
||||
expiry = session_data.get('_session_expiry')
|
||||
if not expiry:
|
||||
expiry = self._last_modification() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)
|
||||
@@ -71,6 +71,17 @@ class SessionStore(SessionBase):
|
||||
modification = datetime.datetime.fromtimestamp(modification)
|
||||
return modification
|
||||
|
||||
+ def _expiry_date(self, session_data):
|
||||
+ """
|
||||
+ Return the expiry time of the file storing the session's content.
|
||||
+ """
|
||||
+ expiry = session_data.get('_session_expiry')
|
||||
+ if not expiry:
|
||||
+ expiry = self._last_modification() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)
|
||||
+ elif not isinstance(expiry, datetime.datetime):
|
||||
+ expiry = self._last_modification() + datetime.timedelta(seconds=expiry)
|
||||
+ return expiry
|
||||
+
|
||||
return expiry
|
||||
|
||||
def load(self):
|
||||
--
|
||||
1.8.3.1
|
||||
session_data = {}
|
||||
try:
|
||||
@@ -89,9 +100,7 @@ class SessionStore(SessionBase):
|
||||
self.create()
|
||||
|
||||
# Remove expired sessions.
|
||||
- expiry_age = self.get_expiry_age(
|
||||
- modification=self._last_modification(),
|
||||
- expiry=session_data.get('_session_expiry'))
|
||||
+ expiry_age = self.get_expiry_age(expiry=self._expiry_date(session_data))
|
||||
if expiry_age < 0:
|
||||
session_data = {}
|
||||
self.delete()
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user