diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 7ab3bc8d0d..60d0e12124 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -1,7 +1,7 @@ """ MySQL database backend for Django. -Requires mysqlclient: https://pypi.python.org/pypi/mysqlclient/ +Requires mysqlclient: https://pypi.org/project/mysqlclient/ """ import re diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py index d14da97cce..265e03d20a 100644 --- a/django/db/models/fields/files.py +++ b/django/db/models/fields/files.py @@ -374,7 +374,7 @@ class ImageField(FileField): return [ checks.Error( 'Cannot use ImageField because Pillow is not installed.', - hint=('Get Pillow at https://pypi.python.org/pypi/Pillow ' + hint=('Get Pillow at https://pypi.org/project/Pillow/ ' 'or run command "pip install Pillow".'), obj=self, id='fields.E210', diff --git a/django/dispatch/__init__.py b/django/dispatch/__init__.py index be3baa30e1..a615f9905a 100644 --- a/django/dispatch/__init__.py +++ b/django/dispatch/__init__.py @@ -1,6 +1,6 @@ """Multi-consumer multi-producer dispatching mechanism -Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 +Originally based on pydispatch (BSD) https://pypi.org/project/PyDispatcher/2.0.1/ See license.txt for original license. Heavily modified for Django's purposes. diff --git a/django/utils/archive.py b/django/utils/archive.py index 879f3c49f7..5b9998f89c 100644 --- a/django/utils/archive.py +++ b/django/utils/archive.py @@ -1,5 +1,5 @@ """ -Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ +Based on "python-archive" -- https://pypi.org/project/python-archive/ Copyright (c) 2010 Gary Wilson Jr. and contributors. diff --git a/docs/howto/outputting-pdf.txt b/docs/howto/outputting-pdf.txt index 7f1b9d1b1a..1aee096493 100644 --- a/docs/howto/outputting-pdf.txt +++ b/docs/howto/outputting-pdf.txt @@ -34,7 +34,7 @@ Test your installation by importing it in the Python interactive interpreter:: If that command doesn't raise any errors, the installation worked. -.. _available on PyPI: https://pypi.python.org/pypi/reportlab +.. _available on PyPI: https://pypi.org/project/reportlab/ .. _user guide: https://www.reportlab.com/docs/reportlab-userguide.pdf Write your view diff --git a/docs/howto/windows.txt b/docs/howto/windows.txt index 536db09ffb..c37c23eb49 100644 --- a/docs/howto/windows.txt +++ b/docs/howto/windows.txt @@ -40,7 +40,7 @@ To install pip on your machine, go to https://pip.pypa.io/en/latest/installing/, and follow the ``Installing with get-pip.py`` instructions. -.. _pip: https://pypi.python.org/pypi/pip +.. _pip: https://pypi.org/project/pip/ Install ``virtualenv`` and ``virtualenvwrapper`` ================================================ @@ -62,8 +62,8 @@ command prompt, you'll need to activate the environment again using:: workon myproject -.. _virtualenv: https://pypi.python.org/pypi/virtualenv -.. _virtualenvwrapper: https://pypi.python.org/pypi/virtualenvwrapper-win +.. _virtualenv: https://pypi.org/project/virtualenv/ +.. _virtualenvwrapper: https://pypi.org/project/virtualenvwrapper-win/ Install Django ============== diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index 1924e39e1d..e76e3a3e29 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -332,4 +332,4 @@ For details about the JavaScript code style used by Django, see :doc:`javascript`. .. _editorconfig: http://editorconfig.org/ -.. _flake8: https://pypi.python.org/pypi/flake8 +.. _flake8: https://pypi.org/project/flake8/ diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index ce5e42d5a4..7ce2da08ef 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -258,20 +258,20 @@ and install the Geospatial libraries`. Each of these dependencies is optional. If you're missing any of them, the associated tests will be skipped. -.. _argon2-cffi: https://pypi.python.org/pypi/argon2_cffi -.. _bcrypt: https://pypi.python.org/pypi/bcrypt -.. _docutils: https://pypi.python.org/pypi/docutils -.. _geoip2: https://pypi.python.org/pypi/geoip2 -.. _jinja2: https://pypi.python.org/pypi/jinja2 -.. _numpy: https://pypi.python.org/pypi/numpy -.. _Pillow: https://pypi.python.org/pypi/Pillow/ +.. _argon2-cffi: https://pypi.org/project/argon2_cffi/ +.. _bcrypt: https://pypi.org/project/bcrypt/ +.. _docutils: https://pypi.org/project/docutils/ +.. _geoip2: https://pypi.org/project/geoip2/ +.. _jinja2: https://pypi.org/project/jinja2/ +.. _numpy: https://pypi.org/project/numpy/ +.. _Pillow: https://pypi.org/project/Pillow/ .. _PyYAML: https://pyyaml.org/wiki/PyYAML -.. _pytz: https://pypi.python.org/pypi/pytz/ -.. _setuptools: https://pypi.python.org/pypi/setuptools/ +.. _pytz: https://pypi.org/project/pytz/ +.. _setuptools: https://pypi.org/project/setuptools/ .. _memcached: https://memcached.org/ .. _gettext: https://www.gnu.org/software/gettext/manual/gettext.html -.. _selenium: https://pypi.python.org/pypi/selenium -.. _sqlparse: https://pypi.python.org/pypi/sqlparse +.. _selenium: https://pypi.org/project/selenium/ +.. _sqlparse: https://pypi.org/project/sqlparse/ .. _pip requirements files: https://pip.pypa.io/en/latest/user_guide/#requirements-files Code coverage diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt index 8a3bc4b16a..1877bc19de 100644 --- a/docs/internals/contributing/writing-documentation.txt +++ b/docs/internals/contributing/writing-documentation.txt @@ -424,11 +424,11 @@ Spelling check Before you commit your docs, it's a good idea to run the spelling checker. You'll need to install a couple packages first: -* `pyenchant `_ (which requires +* `pyenchant `_ (which requires `enchant `_) * `sphinxcontrib-spelling - `_ + `_ Then from the ``docs`` directory, run ``make spelling``. Wrong words (if any) along with the file and line number where they occur will be saved to diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 12859b182e..ca929414a7 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -617,9 +617,6 @@ details on these changes. * Support for the Python Imaging Library (PIL) module will be removed, as it no longer appears to be actively maintained & does not work on Python 3. - You are advised to install `Pillow`_, which should be used instead. - - .. _`Pillow`: https://pypi.python.org/pypi/Pillow * The following private APIs will be removed: diff --git a/docs/internals/howto-release-django.txt b/docs/internals/howto-release-django.txt index 495b7217b5..6d31b17797 100644 --- a/docs/internals/howto-release-django.txt +++ b/docs/internals/howto-release-django.txt @@ -309,7 +309,7 @@ Now you're ready to actually put the release out there. To do this: This just tests that the tarballs are available (i.e. redirects are up) and that they install correctly, but it'll catch silly mistakes. - __ https://pypi.python.org/pypi/virtualenvwrapper + __ https://pypi.org/project/virtualenvwrapper/ #. Ask a few people on IRC to verify the checksums by visiting the checksums file (e.g. https://www.djangoproject.com/m/pgp/Django-1.5b1.checksum.txt) diff --git a/docs/internals/security.txt b/docs/internals/security.txt index d81206dde0..d293ffb343 100644 --- a/docs/internals/security.txt +++ b/docs/internals/security.txt @@ -132,7 +132,7 @@ On the day of disclosure, we will take the following steps: 4. Post a notice to the |django-announce| and oss-security@lists.openwall.com mailing lists that links to the blog post. -.. _the Python Package Index: https://pypi.python.org/pypi +.. _the Python Package Index: https://pypi.org/ .. _the official Django development blog: https://www.djangoproject.com/weblog/ If a reported issue is believed to be particularly time-sensitive -- diff --git a/docs/intro/reusable-apps.txt b/docs/intro/reusable-apps.txt index 5a5038f3a0..8b71b523a4 100644 --- a/docs/intro/reusable-apps.txt +++ b/docs/intro/reusable-apps.txt @@ -17,12 +17,12 @@ Python and Django projects share common problems. Wouldn't it be great if we could save some of this repeated work? Reusability is the way of life in Python. `The Python Package Index (PyPI) -`_ has a vast range of packages you can use in -your own Python programs. Check out `Django Packages -`_ for existing reusable apps you could incorporate -in your project. Django itself is also just a Python package. This means that -you can take existing Python packages or Django apps and compose them into your -own web project. You only need to write the parts that make your project unique. +`_ has a vast range of packages you can use in your own +Python programs. Check out `Django Packages `_ for +existing reusable apps you could incorporate in your project. Django itself is +also just a Python package. This means that you can take existing Python +packages or Django apps and compose them into your own web project. You only +need to write the parts that make your project unique. Let's say you were starting a new project that needed a polls app like the one we've been working on. How do you make this app reusable? Luckily, you're well @@ -110,8 +110,8 @@ two packages now. If you need help, you can refer to :ref:`how to install Django with pip`. You can install ``setuptools`` the same way. -.. _setuptools: https://pypi.python.org/pypi/setuptools -.. _pip: https://pypi.python.org/pypi/pip +.. _setuptools: https://pypi.org/project/setuptools/ +.. _pip: https://pypi.org/project/pip/ Packaging your app ================== @@ -288,8 +288,6 @@ working. We'll now fix this by installing our new ``django-polls`` package. pip uninstall django-polls -.. _pip: https://pypi.python.org/pypi/pip - Publishing your app =================== diff --git a/docs/ref/contrib/gis/geoip2.txt b/docs/ref/contrib/gis/geoip2.txt index b01cd5d69e..20fc720cf7 100644 --- a/docs/ref/contrib/gis/geoip2.txt +++ b/docs/ref/contrib/gis/geoip2.txt @@ -18,7 +18,7 @@ Additionally, it is recommended to install the `libmaxminddb C library`__, so that ``geoip2`` can leverage the C library's faster speed. __ https://geoip2.readthedocs.io/ -__ https://pypi.python.org/pypi/geoip2 +__ https://pypi.org/project/geoip2/ __ https://dev.maxmind.com/geoip/geoip2/geolite2/ __ https://github.com/maxmind/libmaxminddb diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 34ed4e3e9a..9f1deb96d1 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -343,7 +343,7 @@ MySQL has a couple drivers that implement the Python Database API described in require the MySQL client library or any Python modules outside the standard library. -.. _mysqlclient: https://pypi.python.org/pypi/mysqlclient +.. _mysqlclient: https://pypi.org/project/mysqlclient/ .. _MySQL Connector/Python: https://dev.mysql.com/downloads/connector/python These drivers are thread-safe and provide connection pooling. @@ -943,7 +943,7 @@ unofficial backends, along with any support queries, should be directed to the support channels provided by each 3rd party project. .. _SAP SQL Anywhere: https://github.com/sqlanywhere/sqlany-django -.. _IBM DB2: https://pypi.python.org/pypi/ibm_db/ +.. _IBM DB2: https://pypi.org/project/ibm_db/ .. _Microsoft SQL Server: https://django-mssql.readthedocs.io/en/latest/ .. _Firebird: https://github.com/maxirobaina/django-firebird .. _ODBC: https://github.com/lionheart/django-pyodbc/ diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 20f6445834..50164e5e09 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -851,7 +851,7 @@ second). This offers better scaling to large projects, reduction in response time to code modification, more robust change detection, and battery usage reduction. -.. _pyinotify: https://pypi.python.org/pypi/pyinotify/ +.. _pyinotify: https://pypi.org/project/pyinotify/ When you start the server, and each time you change Python code while the server is running, the system check framework will check your entire Django diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index a977317a80..a5e2e7bb3b 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -279,7 +279,7 @@ be removed (elided) when :ref:`squashing migrations `. want the operation not to do anything in the given direction. This is especially useful in making the operation reversible. -.. _sqlparse: https://pypi.python.org/pypi/sqlparse +.. _sqlparse: https://pypi.org/project/sqlparse/ ``RunPython`` ------------- diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index ed53d08be5..636f9cd331 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -672,7 +672,7 @@ escaping HTML. the return value will be ``"Joel is a slug"``. If you are looking for a more robust solution, take a look at the `bleach - `_ Python library. + `_ Python library. .. function:: html_safe() diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt index ddcfaafa3a..7bcf97a175 100644 --- a/docs/releases/1.11.txt +++ b/docs/releases/1.11.txt @@ -576,7 +576,7 @@ It's automatically installed along with Django. Support for ``settings.TIME_ZONE = None`` is removed as the behavior isn't commonly used and is questionably useful. If you want to automatically detect the timezone based on the system timezone, you can use `tzlocal -`_:: +`_:: from tzlocal import get_localzone diff --git a/docs/releases/1.3.txt b/docs/releases/1.3.txt index 88c83ecd27..a9376cc182 100644 --- a/docs/releases/1.3.txt +++ b/docs/releases/1.3.txt @@ -133,7 +133,7 @@ wherever you would have historically used:: If you want to continue to use the base unittest library, you can -- you just won't get any of the nice new unittest2 features. -.. _unittest2: https://pypi.python.org/pypi/unittest2 +.. _unittest2: https://pypi.org/project/unittest2/ Transaction context managers ---------------------------- diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index c3dd9acf4b..bd8944ff40 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -261,8 +261,8 @@ Minor features `PIL`_ is pending deprecation (support to be removed in Django 1.8). To upgrade, you should **first** uninstall PIL, **then** install Pillow. -.. _`Pillow`: https://pypi.python.org/pypi/Pillow -.. _`PIL`: https://pypi.python.org/pypi/PIL +.. _`Pillow`: https://pypi.org/project/Pillow/ +.. _`PIL`: https://pypi.org/project/PIL/ * :class:`~django.forms.ModelForm` accepts several new ``Meta`` options. diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 6da941bc99..b229b4ac22 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -715,7 +715,7 @@ Management Commands filesystem for changes every second. That caused a small delay before reloads and reduced battery life on laptops. - .. _pyinotify: https://pypi.python.org/pypi/pyinotify + .. _pyinotify: https://pypi.org/project/pyinotify/ * In addition, the development server automatically reloads when a translation file is updated, i.e. after running @@ -737,7 +737,7 @@ Management Commands :class:`~django.db.migrations.operations.RunSQL` operation of migrations, which benefits from the improved behavior. -.. _sqlparse: https://pypi.python.org/pypi/sqlparse +.. _sqlparse: https://pypi.org/project/sqlparse/ Models ~~~~~~ @@ -1202,7 +1202,7 @@ a :exc:`ValueError` when encountering them, you will have to install pytz_. You may be affected by this problem if you use Django's time zone-related date formats or :mod:`django.contrib.syndication`. -.. _pytz: https://pypi.python.org/pypi/pytz/ +.. _pytz: https://pypi.org/project/pytz/ ``remove()`` and ``clear()`` methods of related managers -------------------------------------------------------- diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index d6ae31ef9b..a122b52666 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -72,7 +72,7 @@ provides several security enhancements to the request/response cycle. The new :option:`check --deploy` option allows you to check your production settings file for ways to increase the security of your site. -.. _django-secure: https://pypi.python.org/pypi/django-secure +.. _django-secure: https://pypi.org/project/django-secure/ New PostgreSQL specific functionality ------------------------------------- @@ -1493,7 +1493,7 @@ in Django 1.10. The functionality it provided (validating checksum using the Luhn algorithm) was undocumented and not used in Django. The module has been moved to the `django-localflavor`_ package (version 1.1+). -.. _django-localflavor: https://pypi.python.org/pypi/django-localflavor +.. _django-localflavor: https://pypi.org/project/django-localflavor/ ``InlineAdminForm.original_content_type_id`` -------------------------------------------- diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt index 2b012191cd..e6b6171cbc 100644 --- a/docs/releases/1.9.txt +++ b/docs/releases/1.9.txt @@ -40,7 +40,7 @@ invalidating caches. This functionality from the `django-transaction-hooks`_ package has been integrated into Django. -.. _django-transaction-hooks: https://pypi.python.org/pypi/django-transaction-hooks +.. _django-transaction-hooks: https://pypi.org/project/django-transaction-hooks/ Password validation ------------------- diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt index 6ae7f3d58e..64984c6621 100644 --- a/docs/topics/auth/passwords.txt +++ b/docs/topics/auth/passwords.txt @@ -349,8 +349,8 @@ Include any other hashers that your site uses in this list. .. _pbkdf2: https://en.wikipedia.org/wiki/PBKDF2 .. _nist: https://dx.doi.org/10.6028/NIST.SP.800-132 .. _bcrypt: https://en.wikipedia.org/wiki/Bcrypt -.. _`bcrypt library`: https://pypi.python.org/pypi/bcrypt/ -.. _`argon2-cffi library`: https://pypi.python.org/pypi/argon2_cffi/ +.. _`bcrypt library`: https://pypi.org/project/bcrypt/ +.. _`argon2-cffi library`: https://pypi.org/project/argon2_cffi/ .. _argon2: https://en.wikipedia.org/wiki/Argon2 .. _`Password Hashing Competition`: https://password-hashing.net diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index 9ea63f7270..27d563b319 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -79,8 +79,8 @@ After installing Memcached itself, you'll need to install a Memcached binding. There are several Python Memcached bindings available; the two most common are `python-memcached`_ and `pylibmc`_. -.. _`python-memcached`: https://pypi.python.org/pypi/python-memcached -.. _`pylibmc`: https://pypi.python.org/pypi/pylibmc +.. _`python-memcached`: https://pypi.org/project/python-memcached/ +.. _`pylibmc`: https://pypi.org/project/pylibmc/ To use Memcached with Django: diff --git a/docs/topics/external-packages.txt b/docs/topics/external-packages.txt index 0234264c2d..175fee8979 100644 --- a/docs/topics/external-packages.txt +++ b/docs/topics/external-packages.txt @@ -14,7 +14,7 @@ and cultures. * `GitHub `__ * `Documentation `__ -* `PyPI `__ +* `PyPI `__ Comments ======== @@ -26,7 +26,7 @@ product like Disqus. * `GitHub `__ * `Documentation `__ -* `PyPI `__ +* `PyPI `__ Formtools ========= @@ -35,4 +35,4 @@ Formtools * `GitHub `__ * `Documentation `__ -* `PyPI `__ +* `PyPI `__ diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 4dbbb21d08..c49f83f83f 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -421,7 +421,7 @@ Working with lazy translation objects The result of a ``gettext_lazy()`` call can be used wherever you would use a string (a :class:`str` object) in other Django code, but it may not work with arbitrary Python code. For example, the following won't work because the -`requests `_ library doesn't handle +`requests `_ library doesn't handle ``gettext_lazy`` objects:: body = gettext_lazy("I \u2764 Django") # (unicode :heart:) diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index 26054cd2f9..86d8c9838b 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -651,7 +651,7 @@ Python logging module. subclass the :class:`~django.utils.log.AdminEmailHandler` class and override this method. -.. _Sentry: https://pypi.python.org/pypi/sentry +.. _Sentry: https://pypi.org/project/sentry/ Filters ------- diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index b728f51024..2ba8879bd9 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -741,4 +741,4 @@ For more options like annotated HTML listings detailing missed lines, see the `coverage.py`_ docs. .. _coverage.py: https://coverage.readthedocs.io/ -.. _install coverage.py: https://pypi.python.org/pypi/coverage +.. _install coverage.py: https://pypi.org/project/coverage/ diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 15ee12efcc..cceca8883f 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -918,7 +918,7 @@ example above is just a tiny fraction of what the Selenium client can do; check out the `full reference`_ for more details. .. _Selenium: http://seleniumhq.org/ -.. _selenium package: https://pypi.python.org/pypi/selenium +.. _selenium package: https://pypi.org/project/selenium/ .. _full reference: https://selenium-python.readthedocs.io/api.html .. _Firefox: https://www.mozilla.com/firefox/ diff --git a/tests/invalid_models_tests/test_ordinary_fields.py b/tests/invalid_models_tests/test_ordinary_fields.py index d06f6dd689..0a7eb3ffd1 100644 --- a/tests/invalid_models_tests/test_ordinary_fields.py +++ b/tests/invalid_models_tests/test_ordinary_fields.py @@ -524,7 +524,7 @@ class ImageFieldTests(SimpleTestCase): expected = [] if pillow_installed else [ Error( 'Cannot use ImageField because Pillow is not installed.', - hint=('Get Pillow at https://pypi.python.org/pypi/Pillow ' + hint=('Get Pillow at https://pypi.org/project/Pillow/ ' 'or run command "pip install Pillow".'), obj=field, id='fields.E210',