From ec0803b1be161afe4db41d152fe6ed11eb6ff69c Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Tue, 9 Oct 2018 06:26:07 -0700 Subject: [PATCH] [2.1.x] Capitalized "Python" in docs and comments. Backport of e90af8bad44341cf8ebd469dac57b61a95667c1d from master. --- django/contrib/gis/utils/ogrinspect.py | 2 +- django/core/files/storage.py | 2 +- django/db/migrations/loader.py | 2 +- django/db/migrations/questioner.py | 2 +- django/dispatch/dispatcher.py | 2 +- django/test/runner.py | 2 +- docs/ref/contrib/postgres/fields.txt | 2 +- docs/releases/1.5.txt | 2 +- docs/topics/logging.txt | 2 +- scripts/manage_translations.py | 2 +- tests/file_storage/tests.py | 2 +- tests/i18n/test_percents.py | 2 +- tests/inspectdb/tests.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/django/contrib/gis/utils/ogrinspect.py b/django/contrib/gis/utils/ogrinspect.py index 9a091602fce..f04974f80dd 100644 --- a/django/contrib/gis/utils/ogrinspect.py +++ b/django/contrib/gis/utils/ogrinspect.py @@ -60,7 +60,7 @@ def ogrinspect(*args, **kwargs): ...will print model definition to stout - or put this in a python script and use to redirect the output to a new + or put this in a Python script and use to redirect the output to a new model like: $ python generate_model.py > myapp/models.py diff --git a/django/core/files/storage.py b/django/core/files/storage.py index 30788d6d750..47642ff2f2c 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -35,7 +35,7 @@ class Storage: def save(self, name, content, max_length=None): """ Save new content to the file specified by name. The content should be - a proper File object or any python file-like object, ready to be read + a proper File object or any Python file-like object, ready to be read from the beginning. """ # Get the proper name for the file, as it will actually be saved. diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index 518212b6d04..9d0b4a41b4f 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -24,7 +24,7 @@ class MigrationLoader: but will probably follow the 1234_name.py convention. On initialization, this class will scan those directories, and open and - read the python files, looking for a class called Migration, which should + read the Python files, looking for a class called Migration, which should inherit from django.db.migrations.Migration. See django.db.migrations.migration for what that looks like. diff --git a/django/db/migrations/questioner.py b/django/db/migrations/questioner.py index d482de63882..7af35c8f605 100644 --- a/django/db/migrations/questioner.py +++ b/django/db/migrations/questioner.py @@ -28,7 +28,7 @@ class MigrationQuestioner: return True # Otherwise, we look to see if it has a migrations module # without any Python files in it, apart from __init__.py. - # Apps from the new app template will have these; the python + # Apps from the new app template will have these; the Python # file check will ensure we skip South ones. try: app_config = apps.get_app_config(app_label) diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py index cefc00aad79..910024371b2 100644 --- a/django/dispatch/dispatcher.py +++ b/django/dispatch/dispatcher.py @@ -182,7 +182,7 @@ class Signal: Arguments: sender - The sender of the signal. Can be any python object (normally one + The sender of the signal. Can be any Python object (normally one registered with a connect if you actually want something to occur). diff --git a/django/test/runner.py b/django/test/runner.py index 9bd9f2b506e..c3201b2393f 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -611,7 +611,7 @@ class DiscoverRunner: def is_discoverable(label): """ - Check if a test label points to a python package or file directory. + Check if a test label points to a Python package or file directory. Relative labels like "." and ".." are seen as directories. """ diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index 0cac299f8d9..256a441f164 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -621,7 +621,7 @@ start and end timestamps of an event, or the range of ages an activity is suitable for. All of the range fields translate to :ref:`psycopg2 Range objects -` in python, but also accept tuples as input if no bounds +` in Python, but also accept tuples as input if no bounds information is necessary. The default is lower bound included, upper bound excluded; that is, ``[)``. diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt index 57f14d606ab..ed1990e30d9 100644 --- a/docs/releases/1.5.txt +++ b/docs/releases/1.5.txt @@ -668,7 +668,7 @@ Miscellaneous * :func:`~django.utils.http.int_to_base36` properly raises a :exc:`TypeError` instead of :exc:`ValueError` for non-integer inputs. -* The ``slugify`` template filter is now available as a standard python +* The ``slugify`` template filter is now available as a standard Python function at :func:`django.utils.text.slugify`. Similarly, ``remove_tags`` is available at ``django.utils.html.remove_tags()``. diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index 0e0700c618b..6badc175689 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -148,7 +148,7 @@ by a name. This name is used to identify the logger for configuration purposes. By convention, the logger name is usually ``__name__``, the name of -the python module that contains the logger. This allows you to filter +the Python module that contains the logger. This allows you to filter and handle logging calls on a per-module basis. However, if you have some other way of organizing your logging messages, you can provide any dot-separated name to identify your logger:: diff --git a/scripts/manage_translations.py b/scripts/manage_translations.py index 5397d35bae6..064f0359936 100644 --- a/scripts/manage_translations.py +++ b/scripts/manage_translations.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# This python file contains utility scripts to manage Django translations. +# This Python file contains utility scripts to manage Django translations. # It has to be run inside the django git root directory. # # The following commands are available: diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py index 33dc699ab48..16548b86cb5 100644 --- a/tests/file_storage/tests.py +++ b/tests/file_storage/tests.py @@ -781,7 +781,7 @@ class FileFieldStorageTests(TestCase): # Create sample file temp_storage.save('tests/example.txt', ContentFile('some content')) - # Load it as python file object + # Load it as Python file object with open(temp_storage.path('tests/example.txt')) as file_obj: # Save it using storage and read its content temp_storage.save('tests/file_obj', file_obj) diff --git a/tests/i18n/test_percents.py b/tests/i18n/test_percents.py index 5ab146a4c2e..e17d0410202 100644 --- a/tests/i18n/test_percents.py +++ b/tests/i18n/test_percents.py @@ -33,7 +33,7 @@ class ExtractingStringsWithPercentSigns(POFileAssertionMixin, FrenchTestCase): Percent signs are python formatted. These tests should all have an analogous translation tests below, ensuring - the python formatting does not persist through to a rendered template. + the Python formatting does not persist through to a rendered template. """ def setUp(self): diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index e994b2cb74e..9ab8b01122a 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -138,7 +138,7 @@ class InspectDBTestCase(TestCase): out = StringIO() call_command('inspectdb', table_name_filter=inspectdb_tables_only, stdout=out) output = out.getvalue() - error_message = "inspectdb generated an attribute name which is a python keyword" + error_message = "inspectdb generated an attribute name which is a Python keyword" # Recursive foreign keys should be set to 'self' self.assertIn("parent = models.ForeignKey('self', models.DO_NOTHING)", output) self.assertNotIn(