Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Fixed #20830 -- Clarified that Django uses a customized versi…

…on of six.

Thanks glarrain for the suggestion.

Backport of a53caf2 from master
  • Loading branch information...
commit 5e549e7efe7fc5b29124846278a6b30332e40dc4 1 parent cdb5672
Daley Chetwynd authored September 23, 2013 timgraham committed September 23, 2013

Showing 1 changed file with 13 additions and 11 deletions. Show diff stats Hide diff stats

  1. 24  docs/topics/python3.txt
24  docs/topics/python3.txt
@@ -26,10 +26,10 @@ to stay compatible with Python 2. But authors of pluggable applications are
26 26
 encouraged to use the same porting strategy as Django itself.
27 27
 
28 28
 Writing compatible code is much easier if you target Python ≥ 2.6. Django 1.5
29  
-introduces compatibility tools such as :mod:`django.utils.six`. For
30  
-convenience, forwards-compatible aliases were introduced in Django 1.4.2. If
31  
-your application takes advantage of these tools, it will require Django ≥
32  
-1.4.2.
  29
+introduces compatibility tools such as :mod:`django.utils.six`, which is a
  30
+customized version of the :mod:`six module <six>`. For convenience,
  31
+forwards-compatible aliases were introduced in Django 1.4.2. If your
  32
+application takes advantage of these tools, it will require Django ≥ 1.4.2.
33 33
 
34 34
 Obviously, writing compatible source code adds some overhead, and that can
35 35
 cause frustration. Django's developers have found that attempting to write
@@ -328,8 +328,8 @@ Writing compatible code with six
328 328
 six_ is the canonical compatibility library for supporting Python 2 and 3 in
329 329
 a single codebase. Read its documentation!
330 330
 
331  
-:mod:`six` is bundled with Django as of version 1.4.2. You can import it as
332  
-:mod:`django.utils.six`.
  331
+A :mod:`customized version of six <django.utils.six>` is bundled with Django
  332
+as of version 1.4.2. You can import it as ``django.utils.six``.
333 333
 
334 334
 Here are the most common changes required to write compatible code.
335 335
 
@@ -364,8 +364,9 @@ Import ``six.moves.xrange`` wherever you use ``xrange``.
364 364
 Moved modules
365 365
 ~~~~~~~~~~~~~
366 366
 
367  
-Some modules were renamed in Python 3. The :mod:`django.utils.six.moves
368  
-<six.moves>` module provides a compatible location to import them.
  367
+Some modules were renamed in Python 3. The ``django.utils.six.moves``
  368
+module (based on the :mod:`Python six.moves module <six.moves>`) provides a
  369
+compatible location to import them.
369 370
 
370 371
 PY2
371 372
 ~~~
@@ -380,10 +381,11 @@ function.
380 381
 
381 382
 .. module:: django.utils.six
382 383
 
383  
-Customizations of six
384  
----------------------
  384
+Django customized version of six
  385
+--------------------------------
385 386
 
386  
-The version of six bundled with Django includes a few extras.
  387
+The version of six bundled with Django (``django.utils.six``) includes a few
  388
+extras.
387 389
 
388 390
 .. function:: assertRaisesRegex(testcase, *args, **kwargs)
389 391
 

0 notes on commit 5e549e7

Please sign in to comment.
Something went wrong with that request. Please try again.