[Python-modules-commits] [python-django] 06/08: merge patched-debian/master into debian/master
Chris Lamb
lamby at moszumanska.debian.org
Mon Jan 4 18:44:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch debian/master
in repository python-django.
commit dcce34ed8d60c121b4ca5d44e04987139d9b19d4
Merge: 2e53104 552d239
Author: Chris Lamb <lamby at debian.org>
Date: Mon Jan 4 17:45:41 2016 +0000
merge patched-debian/master into debian/master
Django.egg-info/PKG-INFO | 2 +-
Django.egg-info/SOURCES.txt | 8 +
PKG-INFO | 2 +-
debian/.git-dpm | 6 +-
.../patches/02_disable-sources-in-sphinxdoc.diff | 4 +-
.../06_use_debian_geoip_database_as_default.diff | 2 +-
.../fix-25761-add-traceback-attribute.patch | 2 +-
.../fix-26016-restore-compat-with-py-bcrypt.patch | 27 ---
debian/patches/series | 1 -
django/__init__.py | 2 +-
django/conf/app_template/apps.py | 2 +-
django/conf/locale/__init__.py | 2 +-
django/conf/locale/cs/LC_MESSAGES/django.mo | Bin 24968 -> 25082 bytes
django/conf/locale/cs/LC_MESSAGES/django.po | 8 +-
django/conf/locale/da/LC_MESSAGES/django.mo | Bin 23464 -> 23561 bytes
django/conf/locale/da/LC_MESSAGES/django.po | 8 +-
django/conf/locale/eo/LC_MESSAGES/django.mo | Bin 23518 -> 23633 bytes
django/conf/locale/eo/LC_MESSAGES/django.po | 8 +-
django/conf/locale/fi/LC_MESSAGES/django.mo | Bin 24079 -> 24161 bytes
django/conf/locale/fi/LC_MESSAGES/django.po | 8 +-
django/conf/locale/hr/LC_MESSAGES/django.mo | Bin 15976 -> 20088 bytes
django/conf/locale/hr/LC_MESSAGES/django.po | 87 ++++----
django/conf/locale/id/LC_MESSAGES/django.mo | Bin 19110 -> 19509 bytes
django/conf/locale/id/LC_MESSAGES/django.po | 17 +-
django/conf/locale/kk/LC_MESSAGES/django.mo | Bin 14279 -> 14304 bytes
django/conf/locale/kk/LC_MESSAGES/django.po | 8 +-
django/conf/locale/ko/LC_MESSAGES/django.mo | Bin 21593 -> 22306 bytes
django/conf/locale/ko/LC_MESSAGES/django.po | 19 +-
django/conf/locale/pl/LC_MESSAGES/django.mo | Bin 25307 -> 25420 bytes
django/conf/locale/pl/LC_MESSAGES/django.po | 9 +-
django/conf/locale/uk/LC_MESSAGES/django.mo | Bin 31441 -> 31931 bytes
django/conf/locale/uk/LC_MESSAGES/django.po | 13 +-
django/conf/project_template/project_name/urls.py | 5 +-
django/contrib/admin/actions.py | 2 +-
django/contrib/admin/helpers.py | 1 +
.../contrib/admin/locale/da/LC_MESSAGES/django.mo | Bin 15589 -> 15923 bytes
.../contrib/admin/locale/da/LC_MESSAGES/django.po | 8 +-
.../contrib/admin/locale/fi/LC_MESSAGES/django.mo | Bin 15835 -> 15876 bytes
.../contrib/admin/locale/fi/LC_MESSAGES/django.po | 6 +-
.../contrib/admin/locale/hr/LC_MESSAGES/django.mo | Bin 15686 -> 16146 bytes
.../contrib/admin/locale/hr/LC_MESSAGES/django.po | 16 +-
.../contrib/admin/locale/hu/LC_MESSAGES/django.mo | Bin 14579 -> 15046 bytes
.../contrib/admin/locale/hu/LC_MESSAGES/django.po | 17 +-
.../contrib/admin/locale/id/LC_MESSAGES/django.mo | Bin 14803 -> 14967 bytes
.../contrib/admin/locale/id/LC_MESSAGES/django.po | 13 +-
.../contrib/admin/locale/ko/LC_MESSAGES/django.mo | Bin 16254 -> 16731 bytes
.../contrib/admin/locale/ko/LC_MESSAGES/django.po | 15 +-
.../contrib/admin/locale/uk/LC_MESSAGES/django.mo | Bin 20038 -> 20129 bytes
.../contrib/admin/locale/uk/LC_MESSAGES/django.po | 7 +-
django/contrib/admin/options.py | 2 +-
.../static/admin/js/admin/DateTimeShortcuts.js | 4 +-
.../static/admin/js/admin/RelatedObjectLookups.js | 25 ++-
.../contrib/admin/templates/admin/change_form.html | 18 --
django/contrib/admin/utils.py | 7 +-
.../admindocs/locale/da/LC_MESSAGES/django.mo | Bin 6059 -> 6648 bytes
.../admindocs/locale/da/LC_MESSAGES/django.po | 33 ++--
.../admindocs/locale/hr/LC_MESSAGES/django.mo | Bin 2071 -> 2632 bytes
.../admindocs/locale/hr/LC_MESSAGES/django.po | 25 +--
django/contrib/auth/context_processors.py | 2 +-
.../contrib/auth/locale/da/LC_MESSAGES/django.mo | Bin 5182 -> 6986 bytes
.../contrib/auth/locale/da/LC_MESSAGES/django.po | 27 +--
.../contrib/auth/locale/fa/LC_MESSAGES/django.mo | Bin 5785 -> 8140 bytes
.../contrib/auth/locale/fa/LC_MESSAGES/django.po | 26 ++-
.../contrib/auth/locale/hr/LC_MESSAGES/django.mo | Bin 4057 -> 6686 bytes
.../contrib/auth/locale/hr/LC_MESSAGES/django.po | 50 +++--
.../contrib/auth/locale/hu/LC_MESSAGES/django.mo | Bin 4280 -> 4326 bytes
.../contrib/auth/locale/hu/LC_MESSAGES/django.po | 4 +-
.../contrib/auth/locale/id/LC_MESSAGES/django.mo | Bin 4400 -> 5239 bytes
.../contrib/auth/locale/id/LC_MESSAGES/django.po | 19 +-
.../contrib/auth/locale/ko/LC_MESSAGES/django.mo | Bin 5376 -> 7218 bytes
.../contrib/auth/locale/ko/LC_MESSAGES/django.po | 28 +--
.../contrib/auth/locale/uk/LC_MESSAGES/django.mo | Bin 6589 -> 9077 bytes
.../contrib/auth/locale/uk/LC_MESSAGES/django.po | 31 +--
.../contenttypes/locale/hr/LC_MESSAGES/django.mo | Bin 1108 -> 1167 bytes
.../contenttypes/locale/hr/LC_MESSAGES/django.po | 7 +-
.../flatpages/locale/da/LC_MESSAGES/django.mo | Bin 2098 -> 2126 bytes
.../flatpages/locale/da/LC_MESSAGES/django.po | 8 +-
.../flatpages/locale/hr/LC_MESSAGES/django.mo | Bin 2075 -> 2188 bytes
.../flatpages/locale/hr/LC_MESSAGES/django.po | 9 +-
.../flatpages/locale/id/LC_MESSAGES/django.mo | Bin 1994 -> 2047 bytes
.../flatpages/locale/id/LC_MESSAGES/django.po | 7 +-
.../flatpages/locale/ko/LC_MESSAGES/django.mo | Bin 2127 -> 2158 bytes
.../flatpages/locale/ko/LC_MESSAGES/django.po | 9 +-
django/contrib/gis/db/backends/postgis/models.py | 2 +-
django/contrib/gis/db/models/query.py | 2 +-
django/contrib/gis/gdal/geomtype.py | 2 +-
django/contrib/gis/geos/prototypes/geom.py | 2 +-
django/contrib/gis/geos/prototypes/prepared.py | 2 +-
django/contrib/gis/locale/da/LC_MESSAGES/django.mo | Bin 1743 -> 2007 bytes
django/contrib/gis/locale/da/LC_MESSAGES/django.po | 9 +-
django/contrib/gis/maps/google/__init__.py | 2 +-
django/contrib/gis/maps/google/overlays.py | 14 +-
django/contrib/gis/sitemaps/kml.py | 2 +-
.../humanize/locale/es_MX/LC_MESSAGES/django.mo | Bin 3490 -> 3660 bytes
.../humanize/locale/es_MX/LC_MESSAGES/django.po | 13 +-
django/contrib/postgres/fields/array.py | 14 +-
.../postgres/locale/da/LC_MESSAGES/django.mo | Bin 2779 -> 3035 bytes
.../postgres/locale/da/LC_MESSAGES/django.po | 22 ++-
.../postgres/locale/es_MX/LC_MESSAGES/django.mo | Bin 0 -> 878 bytes
.../locale/{ko => es_MX}/LC_MESSAGES/django.po | 41 ++--
.../postgres/locale/id/LC_MESSAGES/django.mo | Bin 1699 -> 2829 bytes
.../postgres/locale/id/LC_MESSAGES/django.po | 21 +-
.../postgres/locale/ko/LC_MESSAGES/django.mo | Bin 1536 -> 2613 bytes
.../postgres/locale/ko/LC_MESSAGES/django.po | 19 +-
.../redirects/locale/da/LC_MESSAGES/django.mo | Bin 1080 -> 1114 bytes
.../redirects/locale/da/LC_MESSAGES/django.po | 8 +-
.../redirects/locale/es_MX/LC_MESSAGES/django.mo | Bin 1105 -> 1136 bytes
.../redirects/locale/es_MX/LC_MESSAGES/django.po | 7 +-
.../redirects/locale/hr/LC_MESSAGES/django.mo | Bin 1115 -> 1207 bytes
.../redirects/locale/hr/LC_MESSAGES/django.po | 9 +-
.../redirects/locale/id/LC_MESSAGES/django.mo | Bin 1065 -> 1101 bytes
.../redirects/locale/id/LC_MESSAGES/django.po | 7 +-
.../redirects/locale/ko/LC_MESSAGES/django.mo | Bin 1045 -> 1062 bytes
.../redirects/locale/ko/LC_MESSAGES/django.po | 7 +-
.../redirects/locale/uk/LC_MESSAGES/django.mo | Bin 1373 -> 1414 bytes
.../redirects/locale/uk/LC_MESSAGES/django.po | 7 +-
django/contrib/sessions/backends/base.py | 2 +-
.../contrib/sites/locale/hr/LC_MESSAGES/django.mo | Bin 696 -> 876 bytes
.../contrib/sites/locale/hr/LC_MESSAGES/django.po | 9 +-
django/core/cache/backends/base.py | 4 +-
django/core/management/__init__.py | 11 +-
django/core/management/commands/inspectdb.py | 2 +-
django/core/management/commands/loaddata.py | 10 +
django/db/backends/oracle/compiler.py | 3 -
django/db/backends/postgresql/schema.py | 62 ++++--
django/db/migrations/executor.py | 21 +-
django/db/migrations/operations/models.py | 1 +
django/db/migrations/operations/special.py | 2 +-
django/db/models/base.py | 6 +-
django/db/models/expressions.py | 5 +-
django/db/models/fields/files.py | 2 +-
django/db/models/fields/related.py | 17 +-
django/db/models/fields/related_lookups.py | 7 +-
django/db/models/fields/subclassing.py | 2 +-
django/db/models/sql/compiler.py | 4 -
django/db/models/sql/query.py | 3 +
django/db/models/sql/subqueries.py | 2 +-
django/forms/fields.py | 11 +-
django/middleware/common.py | 4 +-
django/template/base.py | 4 +-
django/template/defaultfilters.py | 2 +-
django/template/defaulttags.py | 2 +-
django/test/runner.py | 10 +-
django/utils/translation/trans_real.py | 33 ++--
django/views/decorators/http.py | 2 +-
django/views/generic/detail.py | 2 +-
django/views/generic/edit.py | 5 +-
docs/_theme/djangodocs/static/djangodocs.css | 2 +-
docs/conf.py | 2 +-
docs/faq/install.txt | 2 +-
docs/howto/custom-lookups.txt | 8 +-
docs/howto/custom-template-tags.txt | 9 +-
docs/howto/deployment/wsgi/modwsgi.txt | 9 +-
docs/howto/static-files/deployment.txt | 2 +-
docs/index.txt | 24 +++
.../contributing/writing-code/coding-style.txt | 6 +
.../contributing/writing-documentation.txt | 51 +++++
docs/internals/deprecation.txt | 7 +-
docs/intro/tutorial01.txt | 5 +
docs/intro/tutorial03.txt | 14 +-
docs/intro/tutorial04.txt | 1 +
docs/intro/tutorial05.txt | 4 +-
docs/man/django-admin.1 | 4 +-
docs/ref/applications.txt | 22 ++-
docs/ref/contrib/gis/geos.txt | 51 +++--
docs/ref/contrib/postgres/fields.txt | 7 +-
docs/ref/contrib/postgres/index.txt | 3 +-
docs/ref/contrib/syndication.txt | 4 +-
docs/ref/csrf.txt | 30 +--
docs/ref/django-admin.txt | 4 +-
docs/ref/forms/validation.txt | 2 +-
docs/ref/migration-operations.txt | 13 +-
docs/ref/models/fields.txt | 2 +-
docs/ref/models/instances.txt | 6 +-
docs/ref/template-response.txt | 3 +-
docs/ref/templates/api.txt | 7 +-
docs/ref/templates/builtins.txt | 30 +--
docs/ref/urlresolvers.txt | 2 +-
docs/ref/utils.txt | 4 +-
docs/releases/1.3.txt | 2 +-
docs/releases/1.4.txt | 14 +-
docs/releases/1.7.txt | 9 +-
docs/releases/1.8.8.txt | 42 +++-
docs/releases/1.8.txt | 20 +-
docs/releases/1.9.1.txt | 85 ++++++++
docs/releases/1.9.txt | 25 ++-
docs/releases/index.txt | 1 +
docs/spelling_wordlist | 2 +-
docs/topics/auth/customizing.txt | 10 +-
docs/topics/auth/default.txt | 6 +-
docs/topics/auth/passwords.txt | 2 +-
docs/topics/cache.txt | 3 +-
docs/topics/conditional-view-processing.txt | 2 +-
docs/topics/db/aggregation.txt | 9 +-
docs/topics/db/models.txt | 4 +-
docs/topics/db/transactions.txt | 2 +-
docs/topics/files.txt | 4 +-
docs/topics/forms/formsets.txt | 8 +-
docs/topics/forms/modelforms.txt | 16 +-
docs/topics/http/file-uploads.txt | 4 +-
docs/topics/http/sessions.txt | 7 +-
docs/topics/http/shortcuts.txt | 48 ++---
docs/topics/http/views.txt | 4 +-
docs/topics/install.txt | 6 +-
docs/topics/logging.txt | 8 +-
docs/topics/migrations.txt | 2 +
docs/topics/pagination.txt | 3 +-
docs/topics/security.txt | 10 +-
docs/topics/templates.txt | 5 +-
docs/topics/testing/overview.txt | 16 +-
docs/topics/testing/tools.txt | 19 +-
js_tests/admin/DateTimeShortcuts.test.js | 4 +
package.json | 3 +
setup.cfg | 4 +-
tests/admin_changelist/tests.py | 2 +-
tests/admin_scripts/tests.py | 8 +-
tests/admin_views/admin.py | 11 +-
tests/admin_views/models.py | 3 +
tests/admin_views/tests.py | 59 +++++-
tests/admin_widgets/tests.py | 6 +-
tests/aggregation/tests.py | 2 +-
tests/aggregation_regress/tests.py | 4 +-
tests/auth_tests/test_forms.py | 2 +-
tests/auth_tests/test_views.py | 10 +-
tests/bulk_create/tests.py | 4 +-
tests/cache/tests.py | 9 +
tests/check_framework/test_security.py | 6 +-
tests/csrf_tests/tests.py | 2 +-
tests/delete/tests.py | 12 ++
tests/expressions_case/tests.py | 14 +-
tests/fixtures/tests.py | 14 +-
tests/foreign_object/models/person.py | 13 +-
tests/foreign_object/tests.py | 12 ++
tests/forms_tests/tests/test_fields.py | 8 +
tests/forms_tests/tests/test_forms.py | 2 +-
tests/forms_tests/tests/tests.py | 2 +-
tests/generic_views/test_detail.py | 13 ++
tests/generic_views/test_edit.py | 9 +
tests/generic_views/urls.py | 4 +
tests/generic_views/views.py | 26 +++
tests/gis_tests/geoapp/test_functions.py | 2 +-
tests/httpwrappers/tests.py | 2 +-
tests/i18n/commands/__init__.py | 2 +-
.../i18n/commands/locale/xxx/LC_MESSAGES/django.mo | Bin 0 -> 457 bytes
.../i18n/commands/locale/xxx/LC_MESSAGES/django.po | 21 ++
tests/i18n/tests.py | 19 ++
.../invalid_models_tests/test_deprecated_fields.py | 2 +-
tests/invalid_models_tests/test_models.py | 2 +-
tests/invalid_models_tests/test_relative_fields.py | 14 +-
tests/m2m_through/tests.py | 8 +-
tests/middleware/tests.py | 218 ++++++++++-----------
.../0001_initial.py | 31 +++
.../0002_initial.py | 20 ++
.../__init__.py | 0
tests/migrations/test_autodetector.py | 188 +++++++++---------
tests/migrations/test_executor.py | 59 ++++++
tests/migrations/test_operations.py | 84 ++++++++
tests/migrations/test_writer.py | 8 +-
tests/model_fields/models.py | 8 +-
tests/model_options/test_default_related_name.py | 2 +-
tests/modeladmin/tests.py | 2 +-
tests/null_fk_ordering/models.py | 4 +-
tests/postgres_tests/test_array.py | 21 ++
tests/postgres_tests/test_ranges.py | 2 +-
tests/proxy_models/tests.py | 2 +-
tests/queries/models.py | 2 +-
tests/queries/tests.py | 12 +-
tests/queryset_pickle/tests.py | 2 +-
tests/requests/tests.py | 6 +-
tests/runtests.py | 15 +-
tests/schema/tests.py | 68 +++++++
tests/serializers/test_data.py | 2 +-
tests/signals/tests.py | 2 +-
tests/staticfiles_tests/test_liveserver.py | 2 +-
tests/template_tests/test_response.py | 4 +-
tests/test_client/views.py | 12 +-
tests/test_client_regress/tests.py | 8 +-
tests/test_client_regress/views.py | 11 +-
tests/test_runner/test_discover_runner.py | 6 +-
tests/timezones/tests.py | 2 +-
tests/unmanaged_models/models.py | 2 +-
tests/unmanaged_models/tests.py | 2 +-
tests/urlpatterns_reverse/tests.py | 2 +-
tests/utils_tests/files/strip_tags2.txt | 2 +-
tests/utils_tests/test_http.py | 4 +-
tests/view_tests/views.py | 11 +-
286 files changed, 1960 insertions(+), 1082 deletions(-)
diff --cc debian/.git-dpm
index 243a8ee,0000000..1961764
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
- 875446913d7e87fc586e1ec405849b3892fd7239
- 875446913d7e87fc586e1ec405849b3892fd7239
- f3eb470bfb3d3b5f86aac67f1e7be9aedf202edf
++552d239ac0bb897ba85f1a2fe9c941efb14f797e
++552d239ac0bb897ba85f1a2fe9c941efb14f797e
++4c3207df476c2bbb3a7c107d692f7eae2a3bb744
+4c3207df476c2bbb3a7c107d692f7eae2a3bb744
+python-django_1.9.1.orig.tar.gz
+06457faee6998b922cb9c97a06116dd781618e07
+7411671
+debianTag="debian/%e%v"
+patchedTag="debian/patches/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/02_disable-sources-in-sphinxdoc.diff
index 119ae19,0000000..553487e
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 a2cdcb73e42b6e7faf88523deb11f6625d24746e Mon Sep 17 00:00:00 2001
++From 02627b7e904a0ea7e238c79d6f119a7bd7906024 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 bd80585..a047df9 100644
++index 90d4a29..cf39d30 100644
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -202,7 +202,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 6853c14,0000000..29db558
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 6265f00a2de2a30c22424234634222246bcb25f2 Mon Sep 17 00:00:00 2001
++From 43dddcabcc6f08a4bae582b85e22a35c0f12d78c 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 bfd4cae,0000000..2a216b2
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 450de89e37211b72eaa293b12e92ac22df3c54ea Mon Sep 17 00:00:00 2001
++From 552d239ac0bb897ba85f1a2fe9c941efb14f797e 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
+
diff --cc debian/patches/series
index d18347f,0000000..4549594
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,4 -1,0 +1,3 @@@
+02_disable-sources-in-sphinxdoc.diff
+06_use_debian_geoip_database_as_default.diff
+fix-25761-add-traceback-attribute.patch
- fix-26016-restore-compat-with-py-bcrypt.patch
--
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