Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.
This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.
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 <nick@nickpope.me.uk>
FieldCacheMixin is used by related fields to track their cached values.
This work migrates get_cache_name() to be a cached property to optimize
performance by reducing unnecessary function calls when working with
related fields, given that its value remains constant.
Co-authored-by: Simon Charette <charette.s@gmail.com>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
This work follows a comprehensive review conducted during the DjangoCon US 2023
sprints. Changes include:
- Updated the title of the main page for better alignment with the content.
- Removed emojis to enhance accessibility and avoid cultural specificity.
- Improved the layout and navigation of contributing documentation.
- Unified sections for communication channels and community links.
- Grouped resources according to the Diátaxis systematic approach.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Daniele Procida <daniele@vurt.org>
This trims and clearly delineates the how to guide from the subsequent
explanation with additional subheadings.
These changes have been discussed with Daniele Procida
at the DjangoCon US 2023 sprints.
This also uses enum.EnumType for Python 3.11+ as Python 3.11 renamed
EnumMeta to EnumType. While the former is still available as an alias
of the latter for now, let's prefer the canonical name for this.
Check out https://docs.python.org/3/library/enum.html#enum.EnumType