[Python-modules-commits] [python-django] 06/07: merge debian/patched-master into debian/master

Luke Faraone lfaraone at moszumanska.debian.org
Tue Jul 19 16:18:54 UTC 2016


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

lfaraone pushed a commit to branch debian/master
in repository python-django.

commit 881f15d5938460dff908734cecb5a5771301d82f
Merge: 8945f75 0faf5fc
Author: Luke Faraone <lfaraone at debian.org>
Date:   Tue Jul 19 14:14:14 2016 +0000

    merge debian/patched-master into debian/master

 Django.egg-info/PKG-INFO                           |    2 +-
 Django.egg-info/SOURCES.txt                        |    6 +-
 PKG-INFO                                           |    2 +-
 debian/.git-dpm                                    |    6 +-
 .../patches/02_disable-sources-in-sphinxdoc.diff   |    2 +-
 .../06_use_debian_geoip_database_as_default.diff   |    2 +-
 .../fix-25761-add-traceback-attribute.patch        |    2 +-
 django/__init__.py                                 |    2 +-
 django/conf/global_settings.py                     |    4 +-
 django/contrib/admin/options.py                    |    2 +-
 .../static/admin/js/admin/RelatedObjectLookups.js  |    2 +-
 .../static/admin/js/vendor/xregexp/xregexp.js      | 2308 +++++++++
 django/contrib/gis/db/backends/base/models.py      |    8 +-
 django/contrib/gis/db/models/sql/aggregates.py     |   10 -
 django/contrib/gis/gdal/datasource.py              |    2 +-
 django/contrib/gis/gdal/envelope.py                |    2 +-
 django/contrib/gis/gdal/feature.py                 |    2 +-
 django/contrib/gis/gdal/field.py                   |    2 +-
 django/contrib/gis/gdal/geometries.py              |    4 +-
 django/contrib/gis/gdal/layer.py                   |    2 +-
 django/contrib/gis/maps/google/__init__.py         |    2 +-
 django/contrib/gis/measure.py                      |    2 +-
 django/core/cache/backends/memcached.py            |    2 +-
 django/core/files/temp.py                          |    2 +-
 django/core/management/commands/makemessages.py    |    2 +-
 django/db/backends/oracle/operations.py            |    2 +-
 django/db/backends/postgresql/schema.py            |    6 +
 django/http/response.py                            |    2 +-
 django/template/defaulttags.py                     |    8 +-
 django/test/utils.py                               |    2 +-
 django/views/debug.py                              |    4 +-
 docs/faq/admin.txt                                 |   11 +-
 docs/howto/custom-model-fields.txt                 |   28 +
 docs/howto/deployment/wsgi/apache-auth.txt         |    2 +-
 docs/howto/upgrade-version.txt                     |   39 +-
 docs/intro/contributing.txt                        |    4 +-
 docs/intro/reusable-apps.txt                       |    2 +-
 docs/intro/tutorial01.txt                          |    9 +-
 docs/intro/tutorial07.txt                          |    4 +-
 docs/ref/contrib/admin/index.txt                   |    8 +-
 docs/ref/contrib/gis/admin.txt                     |    2 +-
 docs/ref/contrib/gis/install/index.txt             |    2 +-
 docs/ref/csrf.txt                                  |    4 +-
 docs/ref/django-admin.txt                          |    2 +-
 docs/ref/forms/fields.txt                          |   21 +-
 docs/ref/forms/validation.txt                      |    7 +-
 docs/ref/models/conditional-expressions.txt        |    5 +-
 docs/ref/models/expressions.txt                    |   16 +
 docs/ref/models/meta.txt                           |    6 +-
 docs/ref/request-response.txt                      |    2 +-
 docs/ref/templates/api.txt                         |    8 +
 docs/ref/urlresolvers.txt                          |    2 +-
 docs/releases/1.6.txt                              |    2 +-
 docs/releases/1.7.txt                              |    8 +-
 docs/releases/1.8.14.txt                           |   25 +
 docs/releases/1.8.txt                              |    9 +-
 docs/releases/1.9.8.txt                            |   28 +
 docs/releases/1.9.txt                              |    9 +-
 docs/releases/index.txt                            |    2 +
 docs/topics/auth/default.txt                       |    8 +-
 docs/topics/auth/passwords.txt                     |    4 +-
 docs/topics/class-based-views/generic-display.txt  |    2 +-
 docs/topics/class-based-views/index.txt            |    4 +-
 docs/topics/class-based-views/intro.txt            |    8 +-
 docs/topics/http/file-uploads.txt                  |    6 +-
 docs/topics/http/sessions.txt                      |    3 +
 docs/topics/http/urls.txt                          |    4 +-
 docs/topics/i18n/timezones.txt                     |    6 +-
 docs/topics/i18n/translation.txt                   |   22 +-
 docs/topics/install.txt                            |    2 +-
 docs/topics/logging.txt                            |    2 +-
 docs/topics/serialization.txt                      |   28 +-
 docs/topics/testing/overview.txt                   |   16 +-
 docs/topics/testing/tools.txt                      |    2 +-
 js_tests/qunit/blanket.js                          | 5430 ++++++++++++++++++++
 js_tests/qunit/blanket.min.js                      |   39 -
 js_tests/tests.html                                |    2 +-
 tests/admin_views/models.py                        |    4 +
 tests/admin_views/tests.py                         |    9 +-
 tests/file_storage/tests.py                        |    8 +
 tests/i18n/test_extraction.py                      |    7 +
 .../migrations/0002_create_test_models.py          |    5 +-
 tests/schema/tests.py                              |   44 +-
 tests/servers/tests.py                             |   14 +-
 tests/template_tests/syntax_tests/test_numpy.py    |   14 +-
 85 files changed, 8152 insertions(+), 214 deletions(-)

diff --cc debian/.git-dpm
index 38f05a9,0000000..42bc09c
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 550694a2186bb09ebdeac0c14ee50c636ef0f763
- 550694a2186bb09ebdeac0c14ee50c636ef0f763
- 3ed79eadd5daa9e988aa7210d493692927b11b49
++0faf5fc7568143a0c84da1eb72e27daaa3e034a8
++0faf5fc7568143a0c84da1eb72e27daaa3e034a8
++096e282a00b0722fa2a45e69ee92745f027bf370
 +096e282a00b0722fa2a45e69ee92745f027bf370
 +python-django_1.9.8.orig.tar.gz
 +a3617f4007255fc69df5152741446ebeee7e0a82
 +7494012
 +debianTag="debian/%e%v"
 +patchedTag="debian/patches/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/02_disable-sources-in-sphinxdoc.diff
index b64811a,0000000..d168500
mode 100644,000000..100644
--- a/debian/patches/02_disable-sources-in-sphinxdoc.diff
+++ b/debian/patches/02_disable-sources-in-sphinxdoc.diff
@@@ -1,33 -1,0 +1,33 @@@
- From 3ab3591516990502ae198a33bc2e6daa646d3b57 Mon Sep 17 00:00:00 2001
++From 70a558f6b4830714b5f5534dad09ba00105d160b Mon Sep 17 00:00:00 2001
 +From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog at debian.org>
 +Date: Sun, 11 Oct 2015 11:43:19 +1100
 +Subject: Disable creation of _sources directory by Sphinx
 +
 + We do this to save some space as the sources of the documentation
 + are not really useful in a binary package.
 + .
 + This is a Debian specific patch.
 +Forwarded: not-needed
 +Origin: vendor
 +
 +Patch-Name: 02_disable-sources-in-sphinxdoc.diff
 +---
 + docs/conf.py | 5 ++++-
 + 1 file changed, 4 insertions(+), 1 deletion(-)
 +
 +diff --git a/docs/conf.py b/docs/conf.py
 +index 7d237f6..8727edd 100644
 +--- a/docs/conf.py
 ++++ b/docs/conf.py
 +@@ -214,7 +214,10 @@ html_additional_pages = {}
 + # html_split_index = False
 + 
 + # If true, links to the reST sources are added to the pages.
 +-# html_show_sourcelink = True
 ++html_show_sourcelink = False
 ++
 ++# Do not ship a copy of the sources
 ++html_copy_source = False
 + 
 + # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
 + # html_show_sphinx = True
diff --cc debian/patches/06_use_debian_geoip_database_as_default.diff
index 5c040ac,0000000..d789b90
mode 100644,000000..100644
--- a/debian/patches/06_use_debian_geoip_database_as_default.diff
+++ b/debian/patches/06_use_debian_geoip_database_as_default.diff
@@@ -1,69 -1,0 +1,69 @@@
- From fae7e5c641d1a8e2f069ef69d6332ccc71433e0c Mon Sep 17 00:00:00 2001
++From e69fdbc645da3a937f51bce6f392c38df1598adc Mon Sep 17 00:00:00 2001
 +From: Tapio Rantala <tapio.rantala at iki.fi>
 +Date: Sun, 11 Oct 2015 11:43:20 +1100
 +Subject: Use Debian GeoIP database path as default
 +
 + Default to Debian standard path for GeoIP directory and for GeoIP city
 + file. Avoids the need to declare them in each project.
 + .
 + This is a Debian specific patch.
 +Bug-Debian: http://bugs.debian.org/645094
 +Forwarded: not-needed
 +
 +Patch-Name: 06_use_debian_geoip_database_as_default.diff
 +---
 + django/contrib/gis/geoip/base.py | 19 ++++++++++---------
 + 1 file changed, 10 insertions(+), 9 deletions(-)
 +
 +diff --git a/django/contrib/gis/geoip/base.py b/django/contrib/gis/geoip/base.py
 +index d40ae7e..1e33033 100644
 +--- a/django/contrib/gis/geoip/base.py
 ++++ b/django/contrib/gis/geoip/base.py
 +@@ -68,7 +68,8 @@ class GeoIP(object):
 +         * path: Base directory to where GeoIP data is located or the full path
 +             to where the city or country data files (*.dat) are located.
 +             Assumes that both the city and country data sets are located in
 +-            this directory; overrides the GEOIP_PATH settings attribute.
 ++            this directory. Overrides the GEOIP_PATH settings attribute.
 ++            If neither is set, defaults to '/usr/share/GeoIP'.
 + 
 +         * cache: The cache settings when opening up the GeoIP datasets,
 +             and may be an integer in (0, 1, 2, 4, 8) corresponding to
 +@@ -77,11 +78,13 @@ class GeoIP(object):
 +             settings,  respectively.  Defaults to 0, meaning that the data is read
 +             from the disk.
 + 
 +-        * country: The name of the GeoIP country data file.  Defaults to
 +-            'GeoIP.dat'; overrides the GEOIP_COUNTRY settings attribute.
 ++        * country: The name of the GeoIP country data file. Overrides
 ++            the GEOIP_COUNTRY settings attribute. If neither is set,
 ++            defaults to 'GeoIP.dat'
 + 
 +-        * city: The name of the GeoIP city data file.  Defaults to
 +-            'GeoLiteCity.dat'; overrides the GEOIP_CITY settings attribute.
 ++        * city: The name of the GeoIP city data file. Overrides the
 ++            GEOIP_CITY settings attribute. If neither is set, defaults
 ++            to 'GeoIPCity.dat'.
 +         """
 + 
 +         warnings.warn(
 +@@ -98,9 +101,7 @@ class GeoIP(object):
 + 
 +         # Getting the GeoIP data path.
 +         if not path:
 +-            path = GEOIP_SETTINGS.get('GEOIP_PATH')
 +-            if not path:
 +-                raise GeoIPException('GeoIP path must be provided via parameter or the GEOIP_PATH setting.')
 ++            path = GEOIP_SETTINGS.get('GEOIP_PATH', '/usr/share/GeoIP')
 +         if not isinstance(path, six.string_types):
 +             raise TypeError('Invalid path type: %s' % type(path).__name__)
 + 
 +@@ -113,7 +114,7 @@ class GeoIP(object):
 +                 self._country = GeoIP_open(force_bytes(country_db), cache)
 +                 self._country_file = country_db
 + 
 +-            city_db = os.path.join(path, city or GEOIP_SETTINGS.get('GEOIP_CITY', 'GeoLiteCity.dat'))
 ++            city_db = os.path.join(path, city or GEOIP_SETTINGS.get('GEOIP_CITY', 'GeoIPCity.dat'))
 +             if os.path.isfile(city_db):
 +                 self._city = GeoIP_open(force_bytes(city_db), cache)
 +                 self._city_file = city_db
diff --cc debian/patches/fix-25761-add-traceback-attribute.patch
index 17fe3ab,0000000..42bf934
mode 100644,000000..100644
--- a/debian/patches/fix-25761-add-traceback-attribute.patch
+++ b/debian/patches/fix-25761-add-traceback-attribute.patch
@@@ -1,82 -1,0 +1,82 @@@
- From 550694a2186bb09ebdeac0c14ee50c636ef0f763 Mon Sep 17 00:00:00 2001
++From 0faf5fc7568143a0c84da1eb72e27daaa3e034a8 Mon Sep 17 00:00:00 2001
 +From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog at debian.org>
 +Date: Wed, 25 Nov 2015 12:54:52 +0100
 +Subject: Fix #25761 -- re-raised exceptions need __cause__.__traceback__
 +
 +When Django re-raises an exception, it sets the __cause__ attribute even
 +in Python 2, thus mimicking Python's 3 behaviour for "raise Foo from Bar".
 +However Python 3 also ensures that all exceptions have a __traceback__
 +attribute and thus the "traceback2" Python 2 module (backport of Python
 +3's "traceback" module) relies on the fact that whenever you have a
 +__cause__ attribute, the recorded exception also has a __traceback__
 +attribute.
 +
 +This is breaking at least testtools which is using traceback2 (see
 +https://github.com/testing-cabal/testtools/issues/162).
 +
 +This commit fixes this inconsistency by ensuring that Django sets
 +the __traceback__ attribute on any exception stored in a __cause__
 +attribute of a re-raised exception.
 +
 +Patch-Name: fix-25761-add-traceback-attribute.patch
 +---
 + django/db/migrations/loader.py | 2 ++
 + django/db/utils.py             | 2 ++
 + django/utils/timezone.py       | 2 ++
 + docs/ref/exceptions.txt        | 4 +++-
 + 4 files changed, 9 insertions(+), 1 deletion(-)
 +
 +diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
 +index 310a4d0..7ef5e9d 100644
 +--- a/django/db/migrations/loader.py
 ++++ b/django/db/migrations/loader.py
 +@@ -272,6 +272,8 @@ class MigrationLoader(object):
 +                         ),
 +                         missing)
 +                     exc_value.__cause__ = exc
 ++                    if not hasattr(exc, '__traceback__'):
 ++                        exc.__traceback__ = sys.exc_info()[2]
 +                     six.reraise(NodeNotFoundError, exc_value, sys.exc_info()[2])
 +             raise exc
 + 
 +diff --git a/django/db/utils.py b/django/db/utils.py
 +index 380a4b9..73ed6a6 100644
 +--- a/django/db/utils.py
 ++++ b/django/db/utils.py
 +@@ -88,6 +88,8 @@ class DatabaseErrorWrapper(object):
 +             if issubclass(exc_type, db_exc_type):
 +                 dj_exc_value = dj_exc_type(*exc_value.args)
 +                 dj_exc_value.__cause__ = exc_value
 ++                if not hasattr(exc_value, '__traceback__'):
 ++                    exc_value.__traceback__ = traceback
 +                 # Only set the 'errors_occurred' flag for errors that may make
 +                 # the connection unusable.
 +                 if dj_exc_type not in (DataError, IntegrityError):
 +diff --git a/django/utils/timezone.py b/django/utils/timezone.py
 +index 70fd5e3..205cac4 100644
 +--- a/django/utils/timezone.py
 ++++ b/django/utils/timezone.py
 +@@ -146,6 +146,8 @@ class LocalTimezone(ReferenceLocalTimezone):
 +             exc_value = exc_type(
 +                 "Unsupported value: %r. You should install pytz." % dt)
 +             exc_value.__cause__ = exc
 ++            if not hasattr(exc, '__traceback__'):
 ++                exc.__traceback__ = sys.exc_info()[2]
 +             six.reraise(exc_type, exc_value, sys.exc_info()[2])
 + 
 + utc = pytz.utc if pytz else UTC()
 +diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt
 +index 46a0c81..a16d352 100644
 +--- a/docs/ref/exceptions.txt
 ++++ b/docs/ref/exceptions.txt
 +@@ -201,7 +201,9 @@ As per :pep:`3134`, a ``__cause__`` attribute is set with the original
 + (underlying) database exception, allowing access to any additional
 + information provided. (Note that this attribute is available under
 + both Python 2 and Python 3, although :pep:`3134` normally only applies
 +-to Python 3.)
 ++to Python 3. With Python 2, Django will also record the traceback in the
 ++``__traceback__`` attribute of the exception made available via
 ++``__cause__``.)
 + 
 + .. exception:: models.ProtectedError
 + 

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



More information about the Python-modules-commits mailing list