From d01eaf7104e96b2fcf373ddfbc80ef4568bd0387 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Fri, 3 Aug 2012 18:46:30 +0200 Subject: [py3] Removed uses of sys.maxint under Python 3. Also fixed #18706: improved exceptions raised by int_to_base36. --- docs/ref/utils.txt | 6 ++++-- docs/releases/1.5.txt | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index c2f2025bc3..5157c399da 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -504,11 +504,13 @@ escaping HTML. .. function:: base36_to_int(s) - Converts a base 36 string to an integer. + Converts a base 36 string to an integer. On Python 2 the output is + guaranteed to be an :class:`int` and not a :class:`long`. .. function:: int_to_base36(i) - Converts a positive integer less than sys.maxint to a base 36 string. + Converts a positive integer to a base 36 string. On Python 2 ``i`` must be + smaller than :attr:`sys.maxint`. ``django.utils.safestring`` =========================== diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt index aae8b25e07..968d63e1f3 100644 --- a/docs/releases/1.5.txt +++ b/docs/releases/1.5.txt @@ -244,6 +244,9 @@ Miscellaneous * GeoDjango dropped support for GDAL < 1.5 +* :func:`~django.utils.http.int_to_base36` properly raises a :exc:`TypeError` + instead of :exc:`ValueError` for non-integer inputs. + Features deprecated in 1.5 ========================== -- cgit v1.3