| Age | Commit message (Collapse) | Author |
|
functools.lru_cache in migrations.
`@functools.cache` and `@functools.lru_cache` return an object of type
`functools._lru_cache_wrapper` which prevented the migrations serializer from
working. Simply using the existing `FunctionTypeSerializer` for this additional
type works as expected.
|
|
|
|
- use @enum.property
https://docs.python.org/3/library/enum.html#enum.property
- use @enum.nonmember
Using @property on an enum class does not yield the expected result.
do_not_call_in_templates attribute works because a @property instance
is truthy. We can make this a literal True value as expected by using
@enum.nonmember in Python 3.11+.
https://docs.python.org/3/library/enum.html#enum.nonmember
- used enum.IntEnum/StrEnum
Python 3.11+ has ReprEnum which uses int.__str__() and str.__str__()
for __str__() in the `IntEnum` and `StrEnum` subclasses. We can emulate
that for Python < 3.11.
https://docs.python.org/3/library/enum.html#enum.ReprEnum
https://docs.python.org/3/library/enum.html#enum.IntEnum
https://docs.python.org/3/library/enum.html#enum.StrEnum
|
|
Now that Python 3.10 is the minimum supported version, we can decorate
_generate_next_value_() with @staticmethod. It wasn't possible before
as Python < 3.10 does not support calling static methods direct from
the class body.
https://docs.python.org/3/library/enum.html#enum.Enum._generate_next_value_
|
|
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
|
|
In Python 3.12 it is possible to check containment using member values,
not just the members themselves.
https://docs.python.org/3/library/enum.html#enum.EnumType.__contains__
|
|
|
|
from mutating the main STORAGES.
Regression in 6b965c600054f970bdf94017ecf2e0e6e0a4326b.
|
|
ForeignObject.from_fields/to_fields is not a tuple.
|
|
|
|
|
|
primary keys with different types.
|
|
Changed the cache name used for singly related objects to be the
to_attr parameter passed to a Prefetch object. This fixes issues with
checking if values have already been fetched in cases where the Field
already has some prefetched value, but not for the same model attr.
|
|
Thanks Adam Johnson and Paolo Melchiorre for reviews.
Co-Authored-By: Lily Foote <code@lilyf.org>
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
django.contrib.messages.test.MessagesTestMixin.assertMessages().
|
|
Some third-party applications, e.g. `django-filter`, already define
their own `ChoiceIterator`, so renaming this `BaseChoiceIterator` will
be a better fit and avoid any potential confusion.
See https://github.com/carltongibson/django-filter/pull/1607.
|
|
django.utils.encoding.uri_to_iri().
Thanks MProgrammer (https://hackerone.com/mprogrammer) for the report.
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
|
|
|
|
|
|
|
|
OuterRef annotations.
Thanks Pierre-Nicolas Rigal for the report.
Regression in c67ea79aa981ae82595d89f8018a41fcd842e7c9.
|
|
choices.
Thanks Collin Anderson for the report.
Regression in 500e01073adda32d5149624ee9a5cb7aa3d3583f.
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
|
|
|
|
|
|
ChoiceField's choices.
|
|
|
|
|
|
Formating rules sourced from
- https://www.btb.termiumplus.gc.ca/tpv2guides/guides/clefsfp/index-fra.html?lang=fra&lettr=indx_catlog_d&page=9lcOojjUrxt8.html
- https://vitrinelinguistique.oqlf.gouv.qc.ca/21241/la-typographie/nombres/ecriture-des-dates-et-des-heures-dans-certains-contextes-techniques
- https://en.wikipedia.org/wiki/Date_and_time_notation_in_Canada
- https://metacpan.org/dist/DateTime-Locale/view/lib/DateTime/Locale/fr_CA.pod
|
|
|
|
Windows.
|
|
application/x-www-form-urlencoded content type.
Thanks Eki Xu for the report.
|
|
|
|
|
|
|
|
All AsyncRequestFactory methods are still synchronous callables.
|
|
dict_keys.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
|
|
|
|
on SQLite.
Empty string should be considered an in-memory SQLite database.
|
|
without natural keys during serialization.
By using `select_related(None)` instead of `select_related()`, the
unnecessary joins are completely avoided. Note that the current tests
already covers the change, when the field is not `null=True`.
Regression in f9936deed1ff13b20e18bd9ca2b0750b52706b6c.
|
|
settings with STORAGES.
Thanks Petr Dlouhý for the report.
Bug in 32940d390a00a30a6409282d314d617667892841.
|
|
|
|
Thanks zhu for the report and Simon Charette for reviews.
|
|
Thanks Nwawel A Iroume for the report.
|
|
|
|
|
|
This bumps minimum supported versions of cx_Oracle to the first release
to support Python 3.10.
|
|
renderer.
|