Mariusz Felisiak
0250340e37
Refs #32074 -- Used Enum.repr() format proposed for Python 3.10.
...
The Python's Steering Council decided to revert changes in the Enum
module (see https://bugs.python.org/issue44559 ) and moved them to
Python 3.11.
Follow up to 5d9b065d3f
.
Thanks Nick Pope for the review.
2021-07-12 11:46:37 +02:00
Daniele Procida
013a1824d3
Refs #32880 -- Created a new logging how-to document.
...
Moved how-to material from topic document into a new document, and
added new material. Introduced minor improvements to logging
reference document.
2021-07-12 09:04:25 +02:00
Chris Jerdonek
5848b3a1d7
Fixed #32914 -- Prevented test --shuffle from skipping test methods.
...
"test --shuffle" skipped test methods when test classes were mixed.
This changes runner.py's reorder_tests() to group by TestCase class.
Regression in 90ba716bf0
.
2021-07-12 06:36:12 +02:00
Wille Marcel
6f60fa97b0
Fixed typo in docs/ref/contrib/gis/tutorial.txt.
2021-07-09 20:17:16 +02:00
Ian Foote
f42ccdd835
Fixed #27021 -- Allowed lookup expressions in annotations, aggregations, and QuerySet.filter().
...
Thanks Hannes Ljungberg and Simon Charette for reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-09 11:43:06 +02:00
Chris Jerdonek
f5dccbafb9
Refs #24522 -- Fixed code comment about seeds in Shuffler.__init__().
2021-07-09 08:20:16 +02:00
Mariusz Felisiak
ae32e337e0
Fixed isolation of NonAutocommitTests.test_orm_query_after_error_and_rollback().
2021-07-09 07:38:31 +02:00
Mariusz Felisiak
7bb0605a8c
Fixed isolation of GenericRelationTests.test_filter_targets_related_pk().
2021-07-08 13:13:40 +02:00
Chris Jerdonek
90ba716bf0
Fixed #24522 -- Added a --shuffle option to DiscoverRunner.
2021-07-08 07:29:04 +02:00
Mariusz Felisiak
77b88fe621
Fixed #32908 -- Allowed select_for_update(skip_locked) on MariaDB 10.6+.
2021-07-08 06:51:10 +02:00
Keryn Knight
5013798fe9
Fixed #32840 -- Optimized Field.get_col().
...
get_col() used "self" as "output_field" when it was not given, and
unnecessarily compared "self" to "self".
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-07 20:32:57 +02:00
Mariusz Felisiak
355ecd1416
Fixed inspectdb and schema tests on MariaDB 10.6+.
...
The utf8 character set (and related collations) is by default an alias
for utf8mb3 on MariaDB 10.6+.
2021-07-07 17:02:20 +02:00
abhiabhi94
cf6774a53b
Fixed #32904 -- Made parse_time() more strict.
...
Thanks Keryn Knight for the report.
2021-07-07 12:08:43 +02:00
Shipeng Feng
68cc04887b
Fixed #32866 -- Fixed trimming trailing punctuation from escaped string in urlize().
2021-07-07 11:19:33 +02:00
Mads Jensen
c51bf80d56
Used more specific unittest assertions in tests.
2021-07-07 10:51:38 +02:00
Claude Paroz
7309393c3a
Documented in_bulk behavior with nonexistent id_list items.
...
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2021-07-07 10:13:32 +02:00
abhiabhi94
6a5ef557f8
Added test for errors when saving timezone-aware times if not supported.
2021-07-06 10:44:06 +02:00
Keryn Knight
f35ab74752
Fixed #32892 -- Optimized django.utils.dateparse functions by using fromisoformat().
2021-07-06 08:57:17 +02:00
Keryn Knight
857320e9e0
Added more tests for parse_time().
2021-07-06 08:45:23 +02:00
Adam Johnson
14518ccf75
Bumped versions in pre-commit configuration.
2021-07-06 08:19:46 +02:00
Hannes Ljungberg
a06b977a91
Fixed #32776 -- Added support for Array subqueries on PostgreSQL.
2021-07-06 07:36:52 +02:00
Mariusz Felisiak
49ca6bbc44
Fixed isolation of RouterTestCase.test_m2m_cross_database_protection().
...
Hardcoded pks are necessary for this test case, however we need to set
them for all new rows because the sequence will not increment
automatically. It works when the sequence is incremented by other
test cases.
2021-07-05 15:22:08 +02:00
Chris Jerdonek
edde2a0699
Fixed #32901 -- Optimized BaseForm.__getitem__().
2021-07-05 15:21:23 +02:00
Mateo Radman
2231429991
Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".
2021-07-05 13:31:03 +02:00
Mariusz Felisiak
1ff0ea6e9b
Fixed isolation of test_filename_traversal_upload().
...
shutil.rmtree(MEDIA_ROOT) is already called as a class cleanup.
2021-07-05 12:05:13 +02:00
Wu Haotian
aba9c2de66
Fixed #32226 -- Fixed JSON format of QuerySet.explain() on PostgreSQL.
2021-07-05 09:08:39 +02:00
Wu Haotian
b3b04ad211
Refs #28574 -- Added test for XML format output to Queryset.explain().
2021-07-05 09:01:54 +02:00
Eduardo Aldair Ahumada Garcia Jurado
e4da365436
Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.
...
Thanks tlebrize for the initial patch.
2021-07-05 08:15:58 +02:00
Nick Pope
fa35c8bdbc
Fixed #30934 -- Included database alias in django.db.backends log messages.
...
This is useful when working with database routing as you want to know
where each query is being executed.
Co-authored-by: David Winterbottom <david.winterbottom@gmail.com>
2021-07-02 15:36:53 +02:00
cammil
313c3d1aa1
Fixed #28935 -- Fixed display of errors in extended blocks.
...
Get the template that caused the exception and get the
exception info from that template, using the node that
caused the exception.
2021-07-02 11:38:15 +02:00
Simon Charette
9f3cce172f
Refs #26430 -- Re-introduced empty aggregation optimization.
...
The introduction of the Expression.empty_aggregate_value interface
allows the compilation stage to enable the EmptyResultSet optimization
if all the aggregates expressions implement it.
This also removes unnecessary RegrCount/Count.convert_value() methods.
Disabling the empty result set aggregation optimization when it wasn't
appropriate prevented None returned for a Count aggregation value.
Thanks Nick Pope for the review.
2021-07-02 07:25:42 +02:00
Simon Charette
f3112fde98
Fixed #26430 -- Fixed coalesced aggregation of empty result sets.
...
Disable the EmptyResultSet optimization when performing aggregation as
it might interfere with coalescence.
2021-07-02 06:40:54 +02:00
abhiabhi94
fde6fb2898
Fixed #32893 -- Fixed serialization of models.Model class in migrations.
...
Migrations assumed that an import of the models.Model class must
already be included when it's serialized, but for models with only
custom fields this was not necessarily the case.
Thanks Jaap Joris Vens for the report.
2021-07-01 12:42:32 +02:00
Allan Feldman
36fa071d6e
Fixed #32889 -- Allowed per-request sync_to_async context in ASGIHandler .
...
By using a asgiref's ThreadSensitiveContext context manager, requests
will be able to execute independently of other requests when sync work
is involved.
Prior to this commit, a single global thread was used to execute any
sync work independent of the request from which that work was scheduled.
This could result in contention for the global sync thread in the case
of a slow sync function.
Requests are now isolated to their own sync thread.
2021-07-01 12:13:19 +02:00
Carlton Gibson
4af162d4de
Refs #32144 -- Made makemessages remove temporary files on preprocessing error.
...
Co-authored-by: Anders Hovmöller <anders.hovmoller@dryft.se>
2021-07-01 10:11:10 +02:00
Carlton Gibson
dfa7781033
Fixed #32144 -- Made makemessages remove temporary files when locale path doesn't exist.
2021-07-01 10:11:10 +02:00
Mariusz Felisiak
8feb2a49fa
Added CVE-2021-35042 to security archive.
2021-07-01 09:57:08 +02:00
Mariusz Felisiak
bcea1a3193
Added stub release notes for Django 3.2.6.
2021-07-01 09:43:15 +02:00
Mariusz Felisiak
dae83a2451
Forwardported release notes for CVE-2021-35042.
2021-07-01 09:42:54 +02:00
Daniele Procida
62988afbea
Refs #32880 -- Renamed/reordered logging topic sections.
...
Moved sections so that how-to type material is all together, and
renamed headings so it's clearer what those sections are about, in
anticipation of creating a separate how-to document and expanding
the material.
2021-07-01 07:30:53 +02:00
Daniele Procida
261ca6ce2e
Removed trailing whitespace in logging topic.
2021-07-01 07:12:56 +02:00
Mariusz Felisiak
8e97698d7b
Added stub release notes for 3.1.13 and release date for 3.2.5.
2021-07-01 06:52:41 +02:00
Thomas Guettler
775f7506d7
Fixed #32850 -- Doc'd Sitemap.paginator.
2021-06-30 20:11:49 +02:00
Hannes Ljungberg
d8c90d4c22
Fixed #32786 -- Moved subquery ordering clearing optimization to the _in lookup.
...
Co-Authored-By: Simon Charette <charette.s@gmail.com>
2021-06-30 10:08:55 +02:00
Hannes Ljungberg
053141d31f
Refs #32786 -- Made Query.clear_ordering() not to cause side effects by default.
2021-06-30 08:52:27 +02:00
Chris Jerdonek
43d1ea6e2f
Refs #32885 -- Used _read_csrf_cookie()/_set_csrf_cookie() in more CSRF tests.
2021-06-30 07:48:15 +02:00
Chris Jerdonek
abc8795632
Fixed #32885 -- Removed cookie-based token specific logic from CsrfViewMiddlewareTestMixin.
2021-06-30 07:48:15 +02:00
Daniele Procida
e3d55eeb14
Refs #32880 -- Moved logging reference to new document.
...
Completed a first step in moving reference and how-to material out of
the topic document.
2021-06-30 07:21:52 +02:00
Chris Jerdonek
8bca838f4a
Refs #32655 -- Improved error if iter_test_cases() is passed a string.
2021-06-29 20:41:40 +02:00
Mariusz Felisiak
5371ad1d14
Refs #26430 -- Added tests for PostgreSQL-specific aggregates on EmptyQuerySets and used subTest().
2021-06-29 20:23:59 +02:00