diff --git a/django/core/validators.py b/django/core/validators.py
index effa5140ce..2092b52cd6 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -61,7 +61,7 @@ class RegexValidator:
@deconstructible
class URLValidator(RegexValidator):
- ul = '\u00a1-\uffff' # unicode letters range (must not be a raw string)
+ ul = '\u00a1-\uffff' # Unicode letters range (must not be a raw string).
# IP patterns
ipv4_re = r'(?:25[0-5]|2[0-4]\d|[0-1]?\d?\d)(?:\.(?:25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}'
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 4d2f5b51f1..8285aacdc1 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -38,8 +38,8 @@ def _setup_environment(environ):
_setup_environment([
# Oracle takes client-side character set encoding from the environment.
('NLS_LANG', '.AL32UTF8'),
- # This prevents unicode from getting mangled by getting encoded into the
- # potentially non-unicode database character set.
+ # This prevents Unicode from getting mangled by getting encoded into the
+ # potentially non-Unicode database character set.
('ORA_NCHAR_LITERAL_REPLACE', 'TRUE'),
])
diff --git a/django/utils/encoding.py b/django/utils/encoding.py
index 080b63d214..e1ebacef47 100644
--- a/django/utils/encoding.py
+++ b/django/utils/encoding.py
@@ -157,7 +157,7 @@ _hextobyte = {
for fmt in ['%02x', '%02X']
}
# And then everything above 128, because bytes ≥ 128 are part of multibyte
-# unicode characters.
+# Unicode characters.
_hexdig = '0123456789ABCDEFabcdef'
_hextobyte.update({
(a + b).encode(): bytes.fromhex(a + b)
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt
index 7b7a184b1a..6374f4e8cd 100644
--- a/docs/ref/validators.txt
+++ b/docs/ref/validators.txt
@@ -154,7 +154,7 @@ to, or in lieu of custom ``field.clean()`` methods.
an error code of ``'invalid'`` if it doesn't.
Loopback addresses and reserved IP spaces are considered valid. Literal
- IPv6 addresses (:rfc:`3986#section-3.2.2`) and unicode domains are both
+ IPv6 addresses (:rfc:`3986#section-3.2.2`) and Unicode domains are both
supported.
In addition to the optional arguments of its parent :class:`RegexValidator`
diff --git a/docs/releases/1.3.6.txt b/docs/releases/1.3.6.txt
index a808c18b60..8932939425 100644
--- a/docs/releases/1.3.6.txt
+++ b/docs/releases/1.3.6.txt
@@ -73,6 +73,6 @@ Admin history view information leakage
======================================
In previous versions of Django, an admin user without change permission on a
-model could still view the unicode representation of instances via their admin
+model could still view the Unicode representation of instances via their admin
history log. Django 1.3.6 now limits the admin history log view for an object
to users with change permission for that model.
diff --git a/docs/releases/1.4.4.txt b/docs/releases/1.4.4.txt
index 26b4c56e55..979d1144f3 100644
--- a/docs/releases/1.4.4.txt
+++ b/docs/releases/1.4.4.txt
@@ -74,7 +74,7 @@ Admin history view information leakage
======================================
In previous versions of Django, an admin user without change permission on a
-model could still view the unicode representation of instances via their admin
+model could still view the Unicode representation of instances via their admin
history log. Django 1.4.4 now limits the admin history log view for an object
to users with change permission for that model.
diff --git a/docs/releases/1.5.2.txt b/docs/releases/1.5.2.txt
index 33341342a6..e4f21bc5ae 100644
--- a/docs/releases/1.5.2.txt
+++ b/docs/releases/1.5.2.txt
@@ -52,7 +52,7 @@ Bugfixes
* Fixed ``geojson`` detection with SpatiaLite.
* :meth:`~django.test.SimpleTestCase.assertContains` once again works with
binary content (#20237).
-* Fixed :class:`~django.db.models.ManyToManyField` if it has a unicode ``name``
+* Fixed :class:`~django.db.models.ManyToManyField` if it has a Unicode ``name``
parameter (#20207).
* Ensured that the WSGI request's path is correctly based on the
``SCRIPT_NAME`` environment variable or the :setting:`FORCE_SCRIPT_NAME`
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index 502667c0f1..44d567931a 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -499,7 +499,7 @@ There are no known incompatibilities between Django's copy of version 2.0.7 and
Python's copy of version 2.0.9. However, there are some incompatibilities
between other versions of ``simplejson``:
-- While the ``simplejson`` API is documented as always returning unicode
+- While the ``simplejson`` API is documented as always returning Unicode
strings, the optional C implementation can return a bytestring. This was
fixed in Python 2.7.
- ``simplejson.JSONEncoder`` gained a ``namedtuple_as_object`` keyword
diff --git a/docs/releases/1.6.1.txt b/docs/releases/1.6.1.txt
index 28fb4358e0..995cf95934 100644
--- a/docs/releases/1.6.1.txt
+++ b/docs/releases/1.6.1.txt
@@ -25,7 +25,7 @@ Bug fixes
* Added missing ``to_python`` method for ``ModelMultipleChoiceField`` which
is required in Django 1.6 to properly detect changes from initial values
(#21568).
-* Fixed ``django.contrib.humanize`` translations where the unicode sequence
+* Fixed ``django.contrib.humanize`` translations where the Unicode sequence
for the non-breaking space was returned verbatim (#21415).
* Fixed :djadmin:`loaddata` error when fixture file name contained any dots
not related to file extensions (#21457) or when fixture path was relative
diff --git a/docs/releases/1.6.6.txt b/docs/releases/1.6.6.txt
index 42ad2f8b5f..38e2304c5d 100644
--- a/docs/releases/1.6.6.txt
+++ b/docs/releases/1.6.6.txt
@@ -84,7 +84,7 @@ Bugfixes
* Fixed the "ORA-01843: not a valid month" errors when using Unicode
with older versions of Oracle server (:ticket:`20292`).
-* Restored bug fix for sending unicode email with Python 2.6.5 and below
+* Restored bug fix for sending Unicode email with Python 2.6.5 and below
(:ticket:`19107`).
* Prevented ``UnicodeDecodeError`` in ``runserver`` with non-UTF-8 and
diff --git a/docs/releases/1.7.1.txt b/docs/releases/1.7.1.txt
index bb30e2c62d..6cf0e9edf4 100644
--- a/docs/releases/1.7.1.txt
+++ b/docs/releases/1.7.1.txt
@@ -83,7 +83,7 @@ Bugfixes
* Added ``SchemaEditor`` for Oracle GIS backend so that spatial metadata and
indexes will be created for apps with migrations (:ticket:`23537`).
-* Coerced the ``related_name`` model field option to unicode during migration
+* Coerced the ``related_name`` model field option to Unicode during migration
generation to generate migrations that work with both Python 2 and 3
(:ticket:`23455`).
diff --git a/docs/releases/1.7.2.txt b/docs/releases/1.7.2.txt
index 171d938861..d057295017 100644
--- a/docs/releases/1.7.2.txt
+++ b/docs/releases/1.7.2.txt
@@ -125,7 +125,7 @@ Bugfixes
* Fixed a crash in the admin when using "Save as new" and also deleting a
related inline (:ticket:`23857`).
-* Always converted ``related_name`` to text (unicode), since that is required
+* Always converted ``related_name`` to text (Unicode), since that is required
on Python 3 for interpolation. Removed conversion of ``related_name`` to text
in migration deconstruction (:ticket:`23455` and :ticket:`23982`).
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 0e7a2da6c6..fab2fe9187 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -658,7 +658,7 @@ Validators
~~~~~~~~~~
* :class:`~django.core.validators.URLValidator` now supports IPv6 addresses,
- unicode domains, and URLs containing authentication data.
+ Unicode domains, and URLs containing authentication data.
.. _backwards-incompatible-1.8:
diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt
index c085f65447..e774f9e558 100644
--- a/docs/releases/2.0.txt
+++ b/docs/releases/2.0.txt
@@ -345,7 +345,7 @@ Removed support for bytestrings in some places
----------------------------------------------
To support native Python 2 strings, older Django versions had to accept both
-bytestrings and unicode strings. Now that Python 2 support is dropped,
+bytestrings and Unicode strings. Now that Python 2 support is dropped,
bytestrings should only be encountered around input/output boundaries (handling
of binary fields or HTTP streams, for example). You might have to update your
code to limit bytestring usage to a minimum, as Django no longer accepts
diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist
index 63e7c3dbb4..cb1d869147 100644
--- a/docs/spelling_wordlist
+++ b/docs/spelling_wordlist
@@ -724,7 +724,6 @@ ungrouped
unhandled
unharmful
unhashable
-unicode
uninstall
uninstalling
unioning
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 354ef95a69..eb816c690b 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -418,7 +418,7 @@ arbitrary Python code. For example, the following won't work because the
`requests
') def test_unicode_handling(self): - response = HttpResponse('
Some help text for the title (with unicode ŠĐĆŽćžšđ)
') + response = HttpResponse('Some help text for the title (with Unicode ŠĐĆŽćžšđ)
') self.assertContains( response, - 'Some help text for the title (with unicode ŠĐĆŽćžšđ)
', + 'Some help text for the title (with Unicode ŠĐĆŽćžšđ)
', html=True ) diff --git a/tests/utils_tests/test_text.py b/tests/utils_tests/test_text.py index 66dbd5b366..9dbf9367c3 100644 --- a/tests/utils_tests/test_text.py +++ b/tests/utils_tests/test_text.py @@ -189,7 +189,7 @@ class TestUtilsText(SimpleTestCase): def test_slugify(self): items = ( - # given - expected - unicode? + # given - expected - Unicode? ('Hello, World!', 'hello-world', False), ('spam & eggs', 'spam-eggs', False), ('spam & ıçüş', 'spam-ıçüş', True), diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py index dd07aa9f93..fcbffa711d 100644 --- a/tests/view_tests/tests/test_i18n.py +++ b/tests/view_tests/tests/test_i18n.py @@ -252,7 +252,7 @@ class I18NViewTests(SimpleTestCase): self.assertEqual(response['Content-Type'], 'text/javascript; charset="utf-8"') # response content must include a line like: # "this is to be translated":