From ad9a28ee38e3352b16cc6c9ae7f55f90c64710cc Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 22 Sep 2018 18:30:38 -0700 Subject: [PATCH] Refs #29784 -- Normalized Python docs links to omit the version. --- django/conf/global_settings.py | 4 ++-- django/contrib/admin/models.py | 2 +- django/contrib/gis/db/backends/postgis/const.py | 2 +- django/http/response.py | 2 +- django/template/defaultfilters.py | 2 +- docs/ref/utils.txt | 2 +- docs/topics/db/queries.txt | 2 +- tests/test_runner_apps/sample/doctests.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index befade160fd..b603cc9a159 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -304,12 +304,12 @@ DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 FILE_UPLOAD_TEMP_DIR = None # The numeric mode to set newly-uploaded files to. The value should be a mode -# you'd pass directly to os.chmod; see https://docs.python.org/3/library/os.html#files-and-directories. +# you'd pass directly to os.chmod; see https://docs.python.org/library/os.html#files-and-directories. FILE_UPLOAD_PERMISSIONS = None # The numeric mode to assign to newly-created directories, when uploading files. # The value should be a mode as you'd pass to os.chmod; -# see https://docs.python.org/3/library/os.html#files-and-directories. +# see https://docs.python.org/library/os.html#files-and-directories. FILE_UPLOAD_DIRECTORY_PERMISSIONS = None # Python module path where user will place custom format definition. diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py index c7bac4061e5..f0138435cad 100644 --- a/django/contrib/admin/models.py +++ b/django/contrib/admin/models.py @@ -54,7 +54,7 @@ class LogEntry(models.Model): blank=True, null=True, ) object_id = models.TextField(_('object id'), blank=True, null=True) - # Translators: 'repr' means representation (https://docs.python.org/3/library/functions.html#repr) + # Translators: 'repr' means representation (https://docs.python.org/library/functions.html#repr) object_repr = models.CharField(_('object repr'), max_length=200) action_flag = models.PositiveSmallIntegerField(_('action flag'), choices=ACTION_FLAG_CHOICES) # change_message is either a string or a JSON structure diff --git a/django/contrib/gis/db/backends/postgis/const.py b/django/contrib/gis/db/backends/postgis/const.py index 0d6d809ec3b..4b511eb149f 100644 --- a/django/contrib/gis/db/backends/postgis/const.py +++ b/django/contrib/gis/db/backends/postgis/const.py @@ -27,7 +27,7 @@ GDAL_TO_STRUCT = [ # Size of the packed value in bytes for different numerical types. # This is needed to cut chunks of band data out of PostGIS raster strings # when decomposing them into GDALRasters. -# See https://docs.python.org/3/library/struct.html#format-characters +# See https://docs.python.org/library/struct.html#format-characters STRUCT_SIZE = { 'b': 1, # Signed char 'B': 1, # Unsigned char diff --git a/django/http/response.py b/django/http/response.py index 266c6efb738..f303852a40b 100644 --- a/django/http/response.py +++ b/django/http/response.py @@ -238,7 +238,7 @@ class HttpResponseBase: return str(value).encode(self.charset) # These methods partially implement the file-like object interface. - # See https://docs.python.org/3/library/io.html#io.IOBase + # See https://docs.python.org/library/io.html#io.IOBase # The WSGI server must call this method upon completion of the request. # See http://blog.dscpl.com.au/2012/10/obligations-for-calling-close-on.html diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index 1479da8788f..ae76910a37d 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -225,7 +225,7 @@ def stringformat(value, arg): This specifier uses Python string formatting syntax, with the exception that the leading "%" is dropped. - See https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting + See https://docs.python.org/library/stdtypes.html#printf-style-string-formatting for documentation of Python string formatting. """ if isinstance(value, tuple): diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 1c885fa4724..f196a9b8463 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -515,7 +515,7 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004 __friends = cached_property(get_friends, name='_Person__friends') - __ https://docs.python.org/3/faq/programming.html#i-try-to-use-spam-and-i-get-an-error-about-someclassname-spam + __ https://docs.python.org/faq/programming.html#i-try-to-use-spam-and-i-get-an-error-about-someclassname-spam .. function:: keep_lazy(func, *resultclasses) diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index 01bb0de7dae..bb8b755297d 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -1087,7 +1087,7 @@ For example, a ``Blog`` object ``b`` has access to a list of all related All examples in this section use the sample ``Blog``, ``Author`` and ``Entry`` models defined at the top of this page. -.. _descriptors: https://docs.python.org/3/howto/descriptor.html +.. _descriptors: https://docs.python.org/howto/descriptor.html One-to-many relationships ------------------------- diff --git a/tests/test_runner_apps/sample/doctests.py b/tests/test_runner_apps/sample/doctests.py index 6d9403442c6..8707ecaf860 100644 --- a/tests/test_runner_apps/sample/doctests.py +++ b/tests/test_runner_apps/sample/doctests.py @@ -1,6 +1,6 @@ """ Doctest example from the official Python documentation. -https://docs.python.org/3/library/doctest.html +https://docs.python.org/library/doctest.html """