[Python-modules-commits] [python-django] 06/07: merge debian/patched-master into debian/master
Luke Faraone
lfaraone at moszumanska.debian.org
Sat Mar 5 21:05:23 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 3e788e5757e02145d13fb370a4ca17c463badf4a
Merge: 3e1c295 9a0c9a8
Author: Luke Faraone <lfaraone at debian.org>
Date: Sat Mar 5 20:10:37 2016 +0000
merge debian/patched-master into debian/master
Django.egg-info/PKG-INFO | 2 +-
Django.egg-info/SOURCES.txt | 5 +
PKG-INFO | 2 +-
debian/.git-dpm | 6 +-
.../patches/02_disable-sources-in-sphinxdoc.diff | 6 +-
.../06_use_debian_geoip_database_as_default.diff | 2 +-
.../fix-25761-add-traceback-attribute.patch | 2 +-
django/__init__.py | 2 +-
django/contrib/admin/templates/admin/login.html | 2 +-
django/contrib/auth/base_user.py | 2 +-
django/contrib/auth/hashers.py | 77 +++++++++----
django/contrib/contenttypes/models.py | 20 ++--
django/contrib/postgres/fields/array.py | 7 +-
django/contrib/postgres/fields/ranges.py | 8 +-
django/core/checks/urls.py | 10 +-
django/core/validators.py | 9 +-
django/db/backends/base/operations.py | 2 +-
django/db/backends/postgresql/base.py | 2 +-
django/db/migrations/state.py | 2 +-
django/db/models/expressions.py | 2 +-
django/db/models/fields/__init__.py | 2 +-
django/db/models/fields/related.py | 50 ++++----
django/db/models/fields/related_descriptors.py | 2 +-
django/db/models/query.py | 8 +-
django/db/models/query_utils.py | 2 +-
django/db/models/sql/query.py | 2 +-
django/forms/boundfield.py | 2 +-
django/middleware/common.py | 2 +-
django/template/loaders/cached.py | 2 +-
django/template/response.py | 6 +-
django/test/signals.py | 2 +-
django/utils/http.py | 13 ++-
django/utils/translation/__init__.py | 7 ++
docs/conf.py | 9 ++
docs/faq/general.txt | 2 +-
docs/howto/custom-model-fields.txt | 3 +-
docs/howto/deployment/checklist.txt | 5 +-
docs/howto/deployment/wsgi/apache-auth.txt | 4 +-
docs/howto/deployment/wsgi/modwsgi.txt | 4 +-
docs/howto/outputting-pdf.txt | 6 +-
docs/internals/deprecation.txt | 3 +
docs/internals/release-process.txt | 5 +-
docs/intro/reusable-apps.txt | 6 +-
docs/intro/tutorial02.txt | 13 ++-
docs/intro/tutorial04.txt | 2 +-
docs/ref/applications.txt | 12 +-
docs/ref/class-based-views/generic-date-based.txt | 32 ++++--
docs/ref/contrib/admin/admindocs.txt | 9 --
docs/ref/contrib/admin/index.txt | 16 ++-
docs/ref/contrib/gis/feeds.txt | 4 +-
docs/ref/contrib/gis/geos.txt | 2 +-
docs/ref/contrib/gis/testing.txt | 4 +-
docs/ref/contrib/gis/tutorial.txt | 8 +-
docs/ref/csrf.txt | 61 ++++++++--
docs/ref/models/expressions.txt | 37 +++++-
docs/ref/models/fields.txt | 29 +++++
docs/ref/models/meta.txt | 4 +-
docs/ref/settings.txt | 75 +++++++-----
docs/ref/templates/builtins.txt | 5 +-
docs/ref/validators.txt | 6 +-
docs/releases/1.6.txt | 4 +-
docs/releases/1.8.10.txt | 80 +++++++++++++
docs/releases/1.8.11.txt | 8 ++
docs/releases/1.8.txt | 7 +-
docs/releases/1.9.1.txt | 2 +-
docs/releases/1.9.3.txt | 107 +++++++++++++++++
docs/releases/1.9.4.txt | 8 ++
docs/releases/index.txt | 4 +
docs/releases/security.txt | 38 ++++++
docs/spelling_wordlist | 2 +
docs/topics/auth/customizing.txt | 128 ++++++---------------
docs/topics/auth/default.txt | 2 +-
docs/topics/auth/passwords.txt | 114 ++++++++++++++++++
docs/topics/db/models.txt | 11 +-
docs/topics/db/multi-db.txt | 4 +-
docs/topics/email.txt | 2 +
docs/topics/i18n/translation.txt | 24 +---
docs/topics/security.txt | 3 +-
docs/topics/settings.txt | 11 ++
docs/topics/testing/tools.txt | 96 +++++++---------
setup.cfg | 2 +-
tests/admin_filters/tests.py | 19 ++-
tests/auth_tests/test_forms.py | 34 ++++++
tests/auth_tests/test_handlers.py | 7 +-
tests/auth_tests/test_hashers.py | 58 +++++++++-
tests/backends/tests.py | 5 +
tests/check_framework/test_urls.py | 7 ++
tests/contenttypes_tests/test_models.py | 14 ++-
tests/foreign_object/models/article.py | 13 +++
tests/foreign_object/tests.py | 13 +++
tests/forms_tests/tests/test_fields.py | 3 +
tests/forms_tests/tests/test_forms.py | 14 +++
tests/i18n/tests.py | 8 ++
tests/invalid_models_tests/test_relative_fields.py | 36 +++++-
tests/model_fields/tests.py | 66 ++++++-----
tests/postgres_tests/test_array.py | 6 +-
tests/postgres_tests/test_hstore.py | 9 +-
tests/postgres_tests/test_json.py | 6 +-
tests/postgres_tests/test_ranges.py | 11 ++
tests/queries/tests.py | 12 ++
tests/raw_query/models.py | 1 +
tests/raw_query/tests.py | 6 +
tests/requests/tests.py | 8 +-
tests/template_tests/test_loaders.py | 12 ++
tests/template_tests/test_response_deprecations.py | 42 +++++++
tests/utils_tests/test_http.py | 24 ++++
tests/validators/invalid_urls.txt | 4 +-
tests/validators/valid_urls.txt | 4 +
108 files changed, 1285 insertions(+), 450 deletions(-)
diff --cc debian/.git-dpm
index 7ce57c3,0000000..cccbe85
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
- acea9419ff66c14d564734089a28413e23454d32
- acea9419ff66c14d564734089a28413e23454d32
- 6e04957b7d59fceb9d1ce51839f6d6fa7d9b67f4
++9a0c9a8c732f39a7f72a0b3991e53b2e7a14dc0c
++9a0c9a8c732f39a7f72a0b3991e53b2e7a14dc0c
++b849285b12d9ba5635c7c84b03652d81ae147dac
+b849285b12d9ba5635c7c84b03652d81ae147dac
+python-django_1.9.4.orig.tar.gz
+30848b412df1f07b35ef280545900864d4d61cc7
+7426995
+debianTag="debian/%e%v"
+patchedTag="debian/patches/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/02_disable-sources-in-sphinxdoc.diff
index 9c582c5,0000000..e555786
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 c8b85dea27394132d99a08594752da6aab7412a4 Mon Sep 17 00:00:00 2001
++From 2f6bc22aef2f102ddcfeb9e8810d6dc7acaa4971 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 b23f62d..94a8b72 100644
++index b146392..4182d61 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
- @@ -202,7 +202,10 @@ html_additional_pages = {}
++@@ -211,7 +211,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 6b6dd3c,0000000..20332c4
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 5b9e2d6ad57a11c752bd6a5022045b027b47b98c Mon Sep 17 00:00:00 2001
++From 3cda4aac09b082edc33322bef37fb6483397d2c9 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 8f2a2e7,0000000..ef84a92
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 acea9419ff66c14d564734089a28413e23454d32 Mon Sep 17 00:00:00 2001
++From 9a0c9a8c732f39a7f72a0b3991e53b2e7a14dc0c 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