From b4dd76c315ff06e4897fd380e0ad0eaf88db8a9d Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 24 Jun 2024 20:34:43 +0200 Subject: [5.1.x] Migrated setuptools configuration to pyproject.toml. This branch migrates setuptools configuration from setup.py/setup.cfg to pyproject.toml. In order to ensure that the generated binary files have consistent casing (both the tarball and the wheel), setuptools version is limited to ">=61.0.0,<69.3.0". Configuration for flake8 was moved to a dedicated .flake8 file since it cannot be configured via pyproject.toml. Also, __pycache__ exclusion was removed from MANIFEST and the extras/Makefile was replaced with a simpler build command. Co-authored-by: Nick Pope Backport of 4686541691dbe986f58ac87630c3b7a04db4ff93 from main. --- docs/internals/contributing/writing-code/coding-style.txt | 2 +- docs/internals/howto-release-django.txt | 15 ++++++++------- docs/topics/auth/passwords.txt | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'docs') diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index 7f825da90a..73c120f71e 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -46,7 +46,7 @@ Python style * Unless otherwise specified, follow :pep:`8`. Use :pypi:`flake8` to check for problems in this area. Note that our - ``setup.cfg`` file contains some excluded files (deprecated modules we don't + ``.flake8`` file contains some excluded files (deprecated modules we don't care about cleaning up and some third-party code that Django vendors) as well as some excluded errors that we don't consider as gross violations. Remember that :pep:`8` is only a guide, so respect the style of the surrounding code diff --git a/docs/internals/howto-release-django.txt b/docs/internals/howto-release-django.txt index 4fb0df4c73..c0a8ab8ab1 100644 --- a/docs/internals/howto-release-django.txt +++ b/docs/internals/howto-release-django.txt @@ -83,7 +83,7 @@ permissions. .. code-block:: shell - $ python -m pip install wheel twine + $ python -m pip install build twine * Access to `Django's project on PyPI `_ to upload binaries, ideally with extra permissions to `yank a release @@ -345,10 +345,11 @@ issuing **multiple releases**, repeat these steps for each release. <2719a7f8c161233f45d34b624a9df9392c86cc1b>`). #. If this is a pre-release package also update the "Development Status" - trove classifier in ``setup.cfg`` to reflect this. An ``rc`` pre-release - should not change the trove classifier (:commit:`example commit for alpha - release `, :commit:`example - commit for beta release <25fec8940b24107e21314ab6616e18ce8dec1c1c>`). + trove classifier in ``pyproject.toml`` to reflect this. An ``rc`` + pre-release should not change the trove classifier (:commit:`example + commit for alpha release `, + :commit:`example commit for beta release + <25fec8940b24107e21314ab6616e18ce8dec1c1c>`). #. Otherwise, make sure the classifier is set to ``Development Status :: 5 - Production/Stable``. @@ -370,8 +371,8 @@ issuing **multiple releases**, repeat these steps for each release. #. Make sure you have an absolutely clean tree by running ``git clean -dfx``. -#. Run ``make -f extras/Makefile`` to generate the release packages. This will - create the release packages in a ``dist/`` directory. +#. Run ``python -m build`` to generate the release packages. This will create + the release packages in a ``dist/`` directory. #. Generate the hashes of the release packages: diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt index 54a5e069d0..947d637fc4 100644 --- a/docs/topics/auth/passwords.txt +++ b/docs/topics/auth/passwords.txt @@ -97,7 +97,7 @@ To use Argon2id as your default storage algorithm, do the following: #. Install the :pypi:`argon2-cffi` package. This can be done by running ``python -m pip install django[argon2]``, which is equivalent to ``python -m pip install argon2-cffi`` (along with any version requirement - from Django's ``setup.cfg``). + from Django's ``pyproject.toml``). #. Modify :setting:`PASSWORD_HASHERS` to list ``Argon2PasswordHasher`` first. That is, in your settings file, you'd put:: @@ -128,7 +128,7 @@ To use Bcrypt as your default storage algorithm, do the following: #. Install the :pypi:`bcrypt` package. This can be done by running ``python -m pip install django[bcrypt]``, which is equivalent to ``python -m pip install bcrypt`` (along with any version requirement from - Django's ``setup.cfg``). + Django's ``pyproject.toml``). #. Modify :setting:`PASSWORD_HASHERS` to list ``BCryptSHA256PasswordHasher`` first. That is, in your settings file, you'd put:: -- cgit v1.3