diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2012-09-17 20:00:14 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2012-09-17 20:00:14 +0100 |
| commit | 9313dea7006ab77d54735fdd5825a812684e7144 (patch) | |
| tree | 3c4e67806b8805e41889d8f078d7c0cb2030a85d /docs/topics/python3.txt | |
| parent | dbf8b93c527733fb5e3ea101a67bd94db745888e (diff) | |
| parent | d21f3d9b171a3cbff4c8ce7a9dbb8b8be3f21bac (diff) | |
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
django/db/backends/mysql/base.py
django/db/backends/postgresql_psycopg2/base.py
Diffstat (limited to 'docs/topics/python3.txt')
| -rw-r--r-- | docs/topics/python3.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index d816db8046..f5749faaf2 100644 --- a/docs/topics/python3.txt +++ b/docs/topics/python3.txt @@ -324,8 +324,8 @@ Writing compatible code with six six_ is the canonical compatibility library for supporting Python 2 and 3 in a single codebase. Read its documentation! -:mod`six` is bundled with Django as of version 1.4.2. You can import it as -:mod`django.utils.six`. +:mod:`six` is bundled with Django as of version 1.4.2. You can import it as +:mod:`django.utils.six`. Here are the most common changes required to write compatible code. @@ -400,5 +400,12 @@ The version of six bundled with Django includes one extra function: 2 and :meth:`~django.utils.datastructures.MultiValueDict.lists()` on Python 3. +.. function:: assertRaisesRegex(testcase, *args, **kwargs) + + This replaces ``testcase.assertRaisesRegexp`` on Python 2, and + ``testcase.assertRaisesRegex`` on Python 3. ``assertRaisesRegexp`` still + exists in current Python3 versions, but issues a warning. + + In addition to six' defaults moves, Django's version provides ``thread`` as ``_thread`` and ``dummy_thread`` as ``_dummy_thread``. |
