diff --git a/django/apps/registry.py b/django/apps/registry.py index c5ba3a307d..4abf828ca1 100644 --- a/django/apps/registry.py +++ b/django/apps/registry.py @@ -18,7 +18,7 @@ class Apps: """ def __init__(self, installed_apps=()): - # installed_apps is set to None when creating the master registry + # installed_apps is set to None when creating the main registry # because it cannot be populated at that point. Other registries must # provide a list of installed apps and are populated immediately. if installed_apps is None and hasattr(sys.modules[__name__], "apps"): @@ -54,7 +54,7 @@ class Apps: # `lazy_model_operation()` and `do_pending_operations()` methods. self._pending_operations = defaultdict(list) - # Populate apps and models, unless it's the master registry. + # Populate apps and models, unless it's the main registry. if installed_apps is not None: self.populate(installed_apps) diff --git a/django/test/client.py b/django/test/client.py index a38e7dae13..60f4c37c3f 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -785,7 +785,7 @@ class Client(ClientMixin, RequestFactory): def request(self, **request): """ - The master request method. Compose the environment dictionary and pass + Make a generic request. Compose the environment dictionary and pass to the handler, return the result of the handler. Assume defaults for the query environment, which can be overridden using the arguments to the request. @@ -1041,7 +1041,7 @@ class AsyncClient(ClientMixin, AsyncRequestFactory): async def request(self, **request): """ - The master request method. Compose the scope dictionary and pass to the + Make a generic request. Compose the scope dictionary and pass to the handler, return the result of the handler. Assume defaults for the query environment, which can be overridden using the arguments to the request. diff --git a/docs/conf.py b/docs/conf.py index 2711eb9c89..578bb62627 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -94,8 +94,8 @@ source_suffix = ".txt" # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "contents" +# The root document. +root_doc = "contents" # General substitutions. project = "Django" @@ -347,7 +347,7 @@ man_pages = [ # description, category, toctree_only) texinfo_documents = [ ( - master_doc, + root_doc, "django", "", "", diff --git a/docs/man/django-admin.1 b/docs/man/django-admin.1 index 616eb780ae..74a03c872b 100644 --- a/docs/man/django-admin.1 +++ b/docs/man/django-admin.1 @@ -870,9 +870,9 @@ If you\(aqre in a multi\-database setup, you might have fixture data that you want to load onto one database, but not onto another. In this situation, you can add a database identifier into the names of your fixtures. .sp -For example, if your \fBDATABASES\fP setting has a \(aqmaster\(aq database -defined, name the fixture \fBmydata.master.json\fP or -\fBmydata.master.json.gz\fP and the fixture will only be loaded when you +For example, if your \fBDATABASES\fP setting has a \(aqusers\(aq database +defined, name the fixture \fBmydata.users.json\fP or +\fBmydata.users.json.gz\fP and the fixture will only be loaded when you specify you want to load data into the \fBmaster\fP database. .SS Loading fixtures from \fBstdin\fP .sp @@ -1815,7 +1815,7 @@ zip files, you can use a URL like: .sp .nf .ft C -django\-admin startapp \-\-template=https://github.com/githubuser/django\-app\-template/archive/master.zip myapp +django\-admin startapp \-\-template=https://github.com/githubuser/django\-app\-template/archive/main.zip myapp .ft P .fi .UNINDENT diff --git a/docs/ref/class-based-views/base.txt b/docs/ref/class-based-views/base.txt index 324a28fcd3..5c2eb712c1 100644 --- a/docs/ref/class-based-views/base.txt +++ b/docs/ref/class-based-views/base.txt @@ -18,9 +18,9 @@ MRO is an acronym for Method Resolution Order. .. class:: django.views.generic.base.View - The master class-based base view. All other class-based views inherit from - this base class. It isn't strictly a generic view and thus can also be - imported from ``django.views``. + The base view class. All other class-based views inherit from this base + class. It isn't strictly a generic view and thus can also be imported from + ``django.views``. **Method Flowchart** diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 326611d786..fc1f6b7257 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -632,10 +632,10 @@ If you're in a multi-database setup, you might have fixture data that you want to load onto one database, but not onto another. In this situation, you can add a database identifier into the names of your fixtures. -For example, if your :setting:`DATABASES` setting has a 'master' database -defined, name the fixture ``mydata.master.json`` or -``mydata.master.json.gz`` and the fixture will only be loaded when you -specify you want to load data into the ``master`` database. +For example, if your :setting:`DATABASES` setting has a 'users' database +defined, name the fixture ``mydata.users.json`` or +``mydata.users.json.gz`` and the fixture will only be loaded when you +specify you want to load data into the ``users`` database. .. _loading-fixtures-stdin: @@ -1311,7 +1311,7 @@ fly. For example, taking advantage of GitHub's feature to expose repositories as zip files, you can use a URL like:: - django-admin startapp --template=https://github.com/githubuser/django-app-template/archive/master.zip myapp + django-admin startapp --template=https://github.com/githubuser/django-app-template/archive/main.zip myapp .. django-admin-option:: --extension EXTENSIONS, -e EXTENSIONS diff --git a/docs/requirements.txt b/docs/requirements.txt index 6ea1372680..408a6d7d44 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ pyenchant -Sphinx>=3.1.0 +Sphinx>=4.0.0 sphinxcontrib-spelling diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt index cf7d6fef4f..6a5314603c 100644 --- a/docs/topics/db/multi-db.txt +++ b/docs/topics/db/multi-db.txt @@ -233,18 +233,18 @@ Using routers Database routers are installed using the :setting:`DATABASE_ROUTERS` setting. This setting defines a list of class names, each specifying a -router that should be used by the master router +router that should be used by the base router (``django.db.router``). -The master router is used by Django's database operations to allocate +The base router is used by Django's database operations to allocate database usage. Whenever a query needs to know which database to use, -it calls the master router, providing a model and a hint (if -available). Django then tries each router in turn until a database -suggestion can be found. If no suggestion can be found, it tries the -current :attr:`instance._state.db ` of the hint -instance. If a hint instance wasn't provided, or :attr:`instance._state.db -` is ``None``, the master router will allocate -the ``default`` database. +it calls the base router, providing a model and a hint (if +available). The base router tries each router class in turn until one returns +a database suggestion. If no routers return a suggestion, the base router tries +the current :attr:`instance._state.db +` of the hint instance. If no hint instance +was provided, or :attr:`instance._state.db ` is +``None``, the base router will allocate the ``default`` database. An example ---------- diff --git a/tests/apps/tests.py b/tests/apps/tests.py index 278caa3584..9f989c5d9a 100644 --- a/tests/apps/tests.py +++ b/tests/apps/tests.py @@ -33,20 +33,20 @@ HERE = os.path.dirname(__file__) class AppsTests(SimpleTestCase): - def test_singleton_master(self): + def test_singleton_main(self): """ - Only one master registry can exist. + Only one main registry can exist. """ with self.assertRaises(RuntimeError): Apps(installed_apps=None) def test_ready(self): """ - Tests the ready property of the master registry. + Tests the ready property of the main registry. """ - # The master app registry is always ready when the tests run. + # The main app registry is always ready when the tests run. self.assertIs(apps.ready, True) - # Non-master app registries are populated in __init__. + # Non-main app registries are populated in __init__. self.assertIs(Apps().ready, True) # The condition is set when apps are ready self.assertIs(apps.ready_event.is_set(), True) diff --git a/tests/servers/tests.py b/tests/servers/tests.py index 6aaa8dbada..720719ff17 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -173,7 +173,7 @@ class LiveServerViews(LiveServerBase): we can detect a content length from the response. This should be doable for all simple views and streaming responses where an iterable with length of one is passed. The latter follows as result of `set_content_length` - from https://github.com/python/cpython/blob/master/Lib/wsgiref/handlers.py. + from https://github.com/python/cpython/blob/main/Lib/wsgiref/handlers.py. If we cannot detect a content length we explicitly set the `Connection` header to `close` to notify the client that we do not actually support diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index caaf13ddd0..2dfcdd6804 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -1778,7 +1778,7 @@ class OverrideSettingsTests(SimpleTestCase): def test_override_database_routers(self): """ - Overriding DATABASE_ROUTERS should update the master router. + Overriding DATABASE_ROUTERS should update the base router. """ test_routers = [object()] with self.settings(DATABASE_ROUTERS=test_routers):