Commit Graph

32225 Commits

Author SHA1 Message Date
Nick Pope fb9216382a Refs #34986 -- Moved garbage_collect() helper to django.test.utils. 2023-12-06 09:26:11 +01:00
Nick Pope 1c3614e306 Refs #34986 -- Avoided implementation-specific unpickleable types.
The implementation of some core types differ between CPython and PyPy
and this may affect the way that pickling works such that errors are
raised in differing locations in the interpreter or not at all.

Use our own custom non-pickleable type instead to avoid these quirks.
2023-12-06 09:23:35 +01:00
Nick Pope 2c6e4a29b0 Fixed typo in tests/backends/postgresql/test_server_side_cursors.py. 2023-12-06 09:17:49 +01:00
Nick Pope 0ee2b8c326 Changed django.contrib.gis.geoip2 package to a module. 2023-12-05 14:01:59 +01:00
Nick Pope 60c7cb90f8 Inlined django.contrib.gis.geoip2.resources module. 2023-12-05 14:01:59 +01:00
Nick Pope 07f9f9960c Deprecated django.contrib.gis.geoip2.GeoIP2.open(). 2023-12-05 08:21:19 +01:00
Mariusz Felisiak 464af0975c Added stub release notes for 4.2.9. 2023-12-05 06:07:51 +01:00
Mariusz Felisiak 689306c745 Updated expected release date for 5.0.1. 2023-12-05 06:02:36 +01:00
Natalia 14884b6be8 Added stub release notes for 5.0.1. 2023-12-04 10:21:37 -03:00
Natalia 5076bb41d0 Updated translations from Transifex.
Forwardport of 8e1b820fa1 from stable/5.0.x.
2023-12-04 09:57:14 -03:00
Natalia 1994a26438 Finalized release notes for Django 5.0. 2023-12-04 09:25:23 -03:00
yushanfans2233 14b0132e5e Fixed #34830 -- Added request to bad_request/csrf_failure view template contexts. 2023-12-04 10:52:06 +01:00
Mariusz Felisiak 8fcb9f1f10 Added release date for 4.2.8. 2023-12-04 09:24:31 +01:00
Tom Carrick 94d495f960
Removed unused CSS rules for related widget in RTL. 2023-12-03 14:20:57 +01:00
Peter Thomassen 54cb1a7e16 Fixed #35002 -- Made UniqueConstraints with fields respect nulls_distinct.
Regression in 595a2abb58.
2023-12-03 12:30:45 +01:00
Tom Carrick dec8aa68f6
Fixed #35001 -- Fixed position of related widget action icons in admin for some screen sizes. 2023-12-01 10:03:04 -03:00
Nick Pope 0f83133a35
Made GeoIP2.__del__() close all databases. 2023-12-01 13:55:45 +01:00
Adrien 79099a7ba4 Improved wording in auth.models.User field docs.
Co-authored-by: Lily Foote <code@lilyf.org>
2023-12-01 10:44:58 +01:00
Mariusz Felisiak dafbed9af5
Refs #35004 -- Restored the direction of arrows in admin selector boxes for RTL languages on mobile screens.
Regression in 57c1dd466f.
2023-12-01 09:45:57 +01:00
Nick Pope b925fefd7d Deprecated django.contrib.gis.geoip2.GeoIP2.coords().
The `ordering` argument is undocumented and of limited use, so this is
effectively the same as `GeoIP2.lon_lat()`.
2023-12-01 08:38:42 +01:00
Nick Pope 1311f82a6a Simplified coordinate retrieval routines for GeoIP2.
Also removed dead code checking for ``None`` as ``GeoIP2.city()` cannot
return ``None``.
2023-12-01 08:23:52 +01:00
Tom Carrick be06c39abe
Refs #35003 -- Corrected "wide" form margins in admin for LTR languages. 2023-12-01 06:07:32 +01:00
Tom Carrick 999ba9db6d Fixed #34995 -- Improved position of related widget's add link on admin pages on small screens.
Regression in 1699f8b52a.

Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
2023-11-30 14:21:44 -03:00
Sarah Boyce af2fd36815 Refs #34995 -- Made Selenium tests more robust for admin_views and admin_widgets suites.
Depending on screen sizes, the selenium tests that would "click" or interact
with an element outside the scope of the visible window would produce test
failures (raising ElementNotInteractableException in CI runs).

This branch switches those to using ActionChains, which ensures that the click
(or other interaction) is performed only after successfully completing the
move to the relevant element.

Co-authored-by: Tom Carrick <tom@carrick.eu>
2023-11-30 10:39:10 -03:00
Tom Carrick b34a4771a3
Fixed #35003 -- Corrected margins in admin for RTL languages. 2023-11-30 11:27:45 +01:00
Mariusz Felisiak 37fc832a54
Fixed #35006 -- Fixed migrations crash when altering Meta.db_table_comment on SQLite.
Thanks Юрий for the report.

Regression in 78f163a4fb.
2023-11-30 10:10:27 +01:00
Mariusz Felisiak 57c1dd466f
Fixed #35004 -- Corrected the direction of arrows in admin selector boxes for RTL languages on small screens.
Follow up to 12617fbd85.
2023-11-30 09:39:05 +01:00
Mark Walker 6ab0f8ae52 Improved structure of Contributing Guide start page. 2023-11-30 08:33:29 +01:00
Nick Pope 06c5cb1284 Refs #34986 -- Removed redundant CustomChoicesTests.test_timezone_unsupported().
This test relied on the behavior of subclassing `datetime.timezone`
which is not permitted by the C-extension version of CPython's
`datetime` module. This restriction isn't enforced by the pure
Python version, nor by PyPy.

See https://github.com/python/cpython/issues/112451

It's not critical, and doesn't test any Django behavior, so just
remove it.
2023-11-29 21:12:53 +01:00
Nick Pope f5f55b41af
Removed unused GeoIP2.info property. 2023-11-29 21:03:35 +01:00
KimSia Sim c9ce764f59 Updated conditions to retrieve primary keys in bulk_create() docs. 2023-11-29 11:57:53 +01:00
Adam Johnson 272ceb9584 Refs #25778 -- Updated some links and references to HTTPS. 2023-11-29 11:21:22 +01:00
nessita 134cde8415
Removed hard-coded expected results in SeleniumTests.test_select_multiple test.
This ensures that both tests, test_select() and test_select_multiple(),
use analogous calculations for the expected amount of results, and for
the iteration when pressing "arrow down" and waiting for the ajax call
to complete.
2023-11-28 23:06:17 +01:00
Adam Johnson 9e7ac58901
Removed link to lawrence.com in contrib.sites docs.
lawrence.com has since become a redirect to LJWorld.com,
making the link pointless.
2023-11-28 20:11:30 +01:00
Mariusz Felisiak a4931cd75a
Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional setting.
This allows early adoption of the new default "https".
2023-11-28 20:04:21 +01:00
Nick Pope 5f9e5c1b0d Refs #34822, Refs #34986 -- Fixed migrations serializer support for functools.lru_cache().
It turns out that `functools._lru_cache_wrapper` is only a class when
CPython's _functools C module provides it, otherwise it is a function.
PyPy also provides it as a function.
2023-11-28 13:47:35 +01:00
David Smith 76280b4f4d Refs #21442 -- Increased test coverage of requests. 2023-11-28 09:33:59 +01:00
Nick Pope baf705f34a Refs #34986 -- Fixed some test assertions for PyPy.
These failures were due to minor inconsistencies or implementation
differences between CPython and PyPy.
2023-11-28 06:19:38 +01:00
Nick Pope 051dbb5388 Refs #34986 -- Added PyPy support to django.utils.autoreload.get_child_arguments().
It seems that `sys._xoptions` is also supported on PyPy.
2023-11-28 06:19:38 +01:00
Nick Pope 6089230d3e Refs #34986 -- Fixed mocking in utils_tests.test_http.HttpDateProcessingTests.test_parsing_rfc850.
Mocking in the `datetime` module can be tricky. In CPython the datetime
C module is used, but PyPy uses a pure Python implementation. This
caused issues with the prior approach to mocking `datetime.datetime`.

See https://docs.python.org/3/library/unittest.mock-examples.html#partial-mocking
2023-11-28 06:19:38 +01:00
Aman Pandey 0fcd72bc48 Fixed #34633 -- Made create() method of reverse many-to-one managers clear prefetch_related() cache. 2023-11-28 05:46:04 +01:00
Tom Carrick 729266c6f2 Fixed #34982 -- Fixed admin's read-only password widget and help texts alignment for tablet screen size.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2023-11-27 14:42:25 -03:00
Mariusz Felisiak a652f07596 Fixed #34978, Refs #31331 -- Added backward incompatibility note about raw aggregations on MySQL.
Thanks Matthew Somerville for the report.
2023-11-27 11:57:07 +01:00
Nick Pope 9baaf89eed Refs #34986 -- Added django.utils.version.PYPY. 2023-11-27 10:37:29 +01:00
Nick Pope 174369a990 Refs #34986 -- Avoided pickling error in DjangoUnicodeDecodeError.
By using the existing object reference instead of a custom one, pickling
related issues when running the test suite in parallel can be avoided.
2023-11-27 10:37:29 +01:00
Nathaniel Conroy 0257426fe1 Fixed #34992 -- Fixed DatabaseFeatures.allows_group_by_selected_pks on MariaDB with ONLY_FULL_GROUP_BY sql mode.
Regression in 041551d716.
2023-11-27 09:20:10 +01:00
Adam Johnson 0203771b62 Refs #34380 -- Improved docs for forms.URLField.assume_scheme. 2023-11-25 17:08:50 +01:00
Simon Charette 978680db22
Refs #34925 -- Avoided altering passed by reference refresh_from_db(fields).
Follow up to b0ec87b857.
2023-11-25 17:01:14 +01:00
trontelj b0ec87b857 Fixed #34925 -- Prevented Model.refresh_from_db() from mutating list of fields. 2023-11-24 13:42:40 +01:00
Standa Opichal 1c6e8ec4ed Fixed #34968 -- Made multipart parsing of headers raise an error on too long headers.
This also allow customizing the maximum size of headers via
MAX_TOTAL_HEADER_SIZE.
2023-11-24 12:06:54 +01:00