[Python-modules-commits] [python-django] 01/06: Unapply patches and disable git-dpm

Raphaël Hertzog hertzog at moszumanska.debian.org
Sat May 20 14:02:53 UTC 2017


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

hertzog pushed a commit to branch debian/jessie-backports
in repository python-django.

commit 52492bda5c19651849d2e7aed78db79f5a7a733d
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Sat May 20 15:29:18 2017 +0200

    Unapply patches and disable git-dpm
---
 debian/.git-dpm                  | 11 -----------
 django/contrib/gis/geoip/base.py | 19 +++++++++----------
 django/db/migrations/loader.py   |  2 --
 django/db/utils.py               |  2 --
 django/utils/timezone.py         |  2 --
 docs/conf.py                     |  5 +----
 docs/ref/exceptions.txt          |  4 +---
 7 files changed, 11 insertions(+), 34 deletions(-)

diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 4f9c054..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-cb21fad4da3c90955a04671c112631c14657fd46
-cb21fad4da3c90955a04671c112631c14657fd46
-9bea6eba2d4c60c9a467172e687aafe47dd8f436
-9bea6eba2d4c60c9a467172e687aafe47dd8f436
-python-django_1.8.16.orig.tar.gz
-ab43db10f9981970401373bc9562828e849c17a9
-7299872
-debianTag="debian/%e%v"
-patchedTag="debian/patches/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/django/contrib/gis/geoip/base.py b/django/contrib/gis/geoip/base.py
index 0420bba..0b160ff 100644
--- a/django/contrib/gis/geoip/base.py
+++ b/django/contrib/gis/geoip/base.py
@@ -66,8 +66,7 @@ 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.
-            If neither is set, defaults to '/usr/share/GeoIP'.
+            this directory; overrides the GEOIP_PATH settings attribute.
 
         * cache: The cache settings when opening up the GeoIP datasets,
             and may be an integer in (0, 1, 2, 4, 8) corresponding to
@@ -76,13 +75,11 @@ 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. Overrides
-            the GEOIP_COUNTRY settings attribute. If neither is set,
-            defaults to 'GeoIP.dat'
+        * country: The name of the GeoIP country data file.  Defaults to
+            'GeoIP.dat'; overrides the GEOIP_COUNTRY 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'.
+        * city: The name of the GeoIP city data file.  Defaults to
+            'GeoLiteCity.dat'; overrides the GEOIP_CITY settings attribute.
         """
         # Checking the given cache option.
         if cache in self.cache_options:
@@ -92,7 +89,9 @@ class GeoIP(object):
 
         # Getting the GeoIP data path.
         if not path:
-            path = GEOIP_SETTINGS.get('GEOIP_PATH', '/usr/share/GeoIP')
+            path = GEOIP_SETTINGS.get('GEOIP_PATH', None)
+            if not path:
+                raise GeoIPException('GeoIP path must be provided via parameter or the GEOIP_PATH setting.')
         if not isinstance(path, six.string_types):
             raise TypeError('Invalid path type: %s' % type(path).__name__)
 
@@ -105,7 +104,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', 'GeoIPCity.dat'))
+            city_db = os.path.join(path, city or GEOIP_SETTINGS.get('GEOIP_CITY', 'GeoLiteCity.dat'))
             if os.path.isfile(city_db):
                 self._city = GeoIP_open(force_bytes(city_db), cache)
                 self._city_file = city_db
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index 8939537..bbd60a6 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -287,8 +287,6 @@ 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 24020dc..ccfcfd4 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -91,8 +91,6 @@ 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 f64576d..dbda90c 100644
--- a/django/utils/timezone.py
+++ b/django/utils/timezone.py
@@ -146,8 +146,6 @@ 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/conf.py b/docs/conf.py
index 9962889..1bdefc0 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -215,10 +215,7 @@ html_additional_pages = {}
 # html_split_index = False
 
 # If true, links to the reST sources are added to the pages.
-html_show_sourcelink = False
-
-# Do not ship a copy of the sources
-html_copy_source = False
+# html_show_sourcelink = True
 
 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
 # html_show_sphinx = True
diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt
index a16d352..46a0c81 100644
--- a/docs/ref/exceptions.txt
+++ b/docs/ref/exceptions.txt
@@ -201,9 +201,7 @@ 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. With Python 2, Django will also record the traceback in the
-``__traceback__`` attribute of the exception made available via
-``__cause__``.)
+to Python 3.)
 
 .. 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