| Age | Commit message (Collapse) | Author |
|
Accept-Language.
The parsed values of Accept-Language headers are cached in order to
avoid repetitive parsing. This leads to a potential denial-of-service
vector via excessive memory usage if the raw value of Accept-Language
headers is very large.
Accept-Language headers are now limited to a maximum length in order
to avoid this issue.
|
|
length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
|
|
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
|
|
Regression in f434f5b84f7fcea9a76a551621ecce70786e2899.
Backport of 8806e8809e023017e6958b9fa0bbd960938e0a91 from main
|
|
Backport of 36d54b7a142689e0f882338159bca879d8b6d783 from main
|
|
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick
Pope, and Paul Ganssle for reviews.
|
|
Regression in ecf87ad513fd8af6e4a6093ed918723a7d88d5ca.
Thanks Collin Anderson for the report.
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
This improves performance of import_string() by avoiding multiple
imports for the same path.
Thanks Andrew Godwin and Keryn Knight for the implementation idea.
|
|
Regression in 10d126198434810529e0220b0c6896ed64ca0e88.
|
|
AP Stylebook: Saving not savings, no hyphen, and lowercase.
|
|
django.utils.translation.template.
|
|
AP styleguide: Virtually none of the words ending with -wards end with
an s.
|
|
appropriate.
|
|
The "data in self.children" branch was causing data.__eq__ to be
called for each entries in "self.children" which resulted in a huge
slowdown during queryset construction.
It's purpose was to prevent queries of the form
Model.objects.filter(foo='bar').filter(foo='bar')
from resulting in
WHERE foo='bar' AND foo='bar'
but it's not covered by the suite and has arguable performance benefits
since it's not very common and SQL engines are usually very good at
folding/optimizing these.
See also #32632 for prior discussion around comparing data to the
Node's children.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
|
|
Unused since its introduction in d3f00bd5706b35961390d3814dd7e322ead3a9a3.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
|
|
Unused since 0d8b523422fda71baa10807d5aebefd34bad7962.
|
|
|
|
This removes unnecessary format('O') call, remove unnecessary method
calls for simple cases in TimeFormat, and simplifies time zone handling
in TimeFormat.
|
|
Thanks Keryn Knight for the report.
|
|
urlize().
|
|
fromisoformat().
|
|
Completed a first step in moving reference and how-to material out of
the topic document.
|
|
|
|
|
|
Pre-calculate use_l10n for get_format() calls.
|
|
|
|
|
|
packages with "python -m" in autoreloader.
|
|
have __spec__ attribute.
Regression in ec6d2531c59466924b645f314ac33f54470d7ac3.
Thanks JonathanNickelson for the report.
|
|
Address a long standing bug in a Where.add optimization to discard
equal nodes that was surfaced by implementing equality for Lookup
instances in bbf141bcdc31f1324048af9233583a523ac54c94.
Thanks Shaheed Haque for the report.
|
|
|
|
|
|
django.utils.datetime_safe.time().
Unused since c72dde41e603093ab0bb12fa24fa69cfda0d35f9.
|
|
- Replaced datetime.utcnow() with datetime.now().
- Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp().
- Replaced datetime.utctimetuple() with datetime.timetuple().
- Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
|
|
|
|
|
|
Thanks Claude Paroz and Nick Pope for reviews.
|
|
Thread.setDaemon() was deprecated in Python 3.10 and will be removed in
Python 3.12.
|
|
Using asyncio.get_event_loop() when there is no running event loop was
deprecated in Python 3.10, see https://bugs.python.org/issue39529.
|
|
|
|
|
|
|
|
|
|
The distutils package was formally deprecated in Python 3.10 and will
be removed in Python 3.12.
|
|
Deferred accessing the module-global variable __file__ because the
Python import API does not guarantee it always exists—in particular, it
does not exist in certain "frozen" environments. The following changes
advanced this goal.
Thanks to Carlton Gibson, Tom Forbes, Mariusz Felisiak, and Shreyas
Ravi for review and feedback.
|
|
shell=True is required on Windows. Unfortunately passing a sequence to
subprocess.run() behaves differently on Linux, i.e. the first item
specifies the command string, and any additional items are treated as
additional arguments to the shell itself.
https://docs.python.org/3.9/library/subprocess.html#subprocess.Popen
https://docs.python.org/3.9/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows
Regression in a44d80f88e22eda24dacef48e368895ebea96635.
|
|
_NamespacePath supports indexing in Python 3.8+.
|
|
Unconditionally coercing to str type twice is expensive.
|
|
Thanks Alexandr Artemyev for the report, and Simon Charette for the
original patch.
|