summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Refs #32339 -- Fixed super() call in deprecated renderers.HEADmainCarlton Gibson2023-05-171-1/+9
| | | | | | | Missing function call `()` leads to: TypeError: descriptor '__init__' of 'super' object needs an argument Regression in b209518089131c6b4afd18b1d9c320ba3521c5ab.
* Fixed #34568 -- Made makemigrations --update respect --name option.Mariusz Felisiak2023-05-171-0/+26
| | | Thanks David Sanders for the report.
* Fixed #34570 -- Silenced noop deferral of many-to-many and GFK.Simon Charette2023-05-171-0/+6
| | | | | | | | | While deferring many-to-many and GFK has no effect, the previous implementation of QuerySet.defer() ignore them instead of crashing. Regression in b3db6c8dcb5145f7d45eff517bcd96460475c879. Thanks Paco Martínez for the report.
* Fixed #34539 -- Restored get_prep_value() call when adapting JSONFields.Julie Rymer2023-05-161-0/+23
| | | | Regression in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318.
* Fixed #470 -- Added support for database defaults on fields.Ian Foote2023-05-129-7/+737
| | | | | | | | Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
* Fixed #34558 -- Fixed QuerySet.bulk_create() crash with Now() on Oracle.Mariusz Felisiak2023-05-111-1/+14
|
* Fixed #34553 -- Fixed improper % escaping of literal in constraints.Simon Charette2023-05-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Proper escaping of % in string literals used when defining constaints was attempted (a8b3f96f6) by overriding quote_value of Postgres and Oracle schema editor. The same approach was used when adding support for constraints to the MySQL/MariaDB backend (1fc2c70). Later on it was discovered that this approach was not appropriate and that a preferable one was to pass params=None when executing the constraint creation DDL to avoid any form of interpolation in the first place (42e8cf47). When the second patch was applied the corrective of the first were not removed which caused % literals to be unnecessary doubled. This flew under the radar because the existings test were crafted in a way that consecutive %% didn't catch regressions. This commit introduces an extra test for __exact lookups which highlights more adequately % doubling problems but also adjust a previous __endswith test to cover % doubling problems (%\% -> %%\%%). Thanks Thomas Kolar for the report. Refs #32369, #30408, #30593.
* Refs #34553 -- Split constraint escaping test in subtests.Simon Charette2023-05-101-41/+38
| | | | | | | | | | This ensures that constraint violations are tested in isolation from each other as an IntegrityError only ensures a least one constraint is violated. For example, the assertion added in 42e8cf4 break both the name_constraint_rhs and the rebate_constraint constraints and thus doesn't constitute a proper regression test. Refs #32369.
* Fixed #34554 -- Fixed Reverse(Value(…)) crash on Oracle.Mariusz Felisiak2023-05-101-6/+9
|
* Refs #34534 -- Reduced Add/RemoveConstraint and Add/RenameIndex operations ↵Akash Kumar Sen2023-05-091-0/+51
| | | | when optimizing migrations.
* Fixed #34544 -- Avoided DBMS_LOB.SUBSTR() wrapping with IS NULL condition on ↵Mariusz Felisiak2023-05-082-12/+9
| | | | | | | | | Oracle. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca. Thanks Michael Smith for the report. This also reverts commit 1e4da439556cdd69eb9f91e07f99cf77997e70d2.
* Fixed MultipleFileFieldTest.test_file_multiple_validation() test if Pillow ↵Mariusz Felisiak2023-05-041-0/+9
| | | | | isn't installed. Follow up to fb4c55d9ec4bb812a7fb91fa20510d91645e411b.
* Fixed #34535 -- Fixed SQLite dbshell crash on pathlib.Path when handling ↵Jan Pieter Waagmeester2023-05-041-0/+19
| | | | | | CommandError. Regression in 5b884d45ac5b76234eca614d90c83b347294c332.
* Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of ↵Mariusz Felisiak2023-05-033-1/+116
| | | | | | | | | validation when uploading multiple files using one form field. Thanks Moataz Al-Sharida and nawaik for reports. Co-authored-by: Shai Berger <shai@platonix.com> Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
* Fixed #34529, Refs #34525 -- Reduced index operations with ↵Mariusz Felisiak2023-05-032-67/+254
| | | | | | | | Meta.indexes/index_together when optimizing migrations. This makes squashing migrations an available path for changing Meta.index_together, which is deprecated, to Meta.indexes. Follow up to f81032572107846922745b68d5b7191058fdd5f5.
* Fixed #34517 -- Avoided connection post_init signal to ImageField without ↵Orhan Hirsch2023-05-031-0/+8
| | | | width/height fields.
* Refs #31369 -- Improved hint message in NullBooleanField's deprecation warning.Paul Brown2023-05-021-1/+1
|
* Fixed #34513 -- Added system check for relational fields in ↵Bakdolot2023-05-021-0/+24
| | | | ModelAdmin.list_display.
* Fixed #34515 -- Made LocaleMiddleware prefer language from paths when i18n ↵Mariusz Felisiak2023-05-023-17/+28
| | | | | | | | | | | | | | patterns are used. Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81. This reverts commit 94e7f471c4edef845a4fe5e3160132997b4cca81 (refs #34069) and partly reverts commit 3b4728310a7a64f8fcc548163b0aa5f98a5c78f5. Thanks Anthony Baillard for the report. Co-Authored-By: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
* Fixed #34528 -- Reduced Add/RemoveIndex operations when optimizing migrations.Mariusz Felisiak2023-05-011-0/+14
|
* Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin2023-05-011-8/+13
| | | | self-referential subqueries if supported.
* Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.Coen van der Kamp2023-04-286-15/+94
| | | | This also deprecates "http" as the default scheme.
* Restored multiprocessing concurrency on coverage.py settingsMarc Gibbons2023-04-271-0/+2
| | | | | | | | | | | | | * Revert "Reverted "Fixed #33213 -- Doc'd testing code coverage in parallel and used it."" This reverts commit 78da5ca0c1f2ab3201f8f6cd629e80d805ea023d. * Restored coverage multiprocess concurrency with threads Investigating https://github.com/nedbat/coveragepy/issues/1585 revealed that thread tracing gets disabled when passing `concurrency = multiprocessing`. Adding `thread` restores it, and ensures that the `auser()` is reported as covered since the test suite uses `AsyncToSync` to execute this middleware (which spawns threads).
* Avoided creating default form fields in fields_for_model() when declared on ↵Mariusz Felisiak2023-04-271-0/+9
| | | | form.
* Fixed #34518 -- Fixed crash of random() template filter with an empty list.David Sanders2023-04-261-0/+5
|
* Fixed #34512 -- Restored breadcrumbs on admin app index view.Mariusz Felisiak2023-04-261-0/+4
| | | | | Thanks Adam (ataylor32) for the report. Regression in 872b61193b013a700ff88cf50f0eb2cf2c266ff7.
* Replaced docutils link by PyPI reference.Claude Paroz2023-04-251-1/+1
|
* Refs #31949 -- Made @never_cache and @cache_control() decorators to work ↵Ben Lomax2023-04-251-0/+103
| | | | | | with async functions. Thanks Carlton Gibson and Mariusz Felisiak for reviews.
* Added more tests for @cache_control decorator.Ben Lomax2023-04-251-0/+19
|
* Fixed #34481 -- Added system check for reverse related fields in ↵Bakdolot2023-04-241-1/+14
| | | | ModelAdmin.list_display.
* Fixed #33766 -- Resolved FilteredRelation.condition at referencing time.Simon Charette2023-04-241-0/+41
| | | | | | | | | | | The previous implementation resolved condition at Join compilation time which required introducing a specialized expression resolving mode to alter the join reuse logic solely during that phase. FilteredRelation.condition is now resolved when the relation is first referenced which maintains the existing behavior while allowing the removal of the specialized resolving mode and address an issue where conditions couldn't spawn new joins.
* Fixed #34505 -- Skipped varchar_pattern_ops/text_pattern_ops index creation ↵Petter Friberg2023-04-211-0/+36
| | | | when db_collation is set in related field.
* Added SchemaTests._add_ci_collation() hook.Mariusz Felisiak2023-04-211-24/+17
|
* Fixed #34488 -- Made ClearableFileInput preserve "Clear" checked attribute ↵Marcelo Galigniana2023-04-212-31/+72
| | | | when form is invalid.
* Fixed #34496 -- Fixed handling source maps with data URI in ↵Hielke Walinga2023-04-213-0/+28
| | | | | | ManifestStaticFilesStorage. Regression in 781b44240a06f0c868254f40f36ce46c927f56d1.
* Refs #16055 -- Deprecated ↵David Wobrock2023-04-181-0/+47
| | | | get_joining_columns()/get_reverse_joining_columns() methods.
* Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock2023-04-185-2/+63
| | | | relation on PostgreSQL.
* Fixed #22569 -- Made ModelAdmin.lookup_allowed() respect get_list_filter().sarahboyce2023-04-171-7/+89
| | | | Thank you Simon Meers for the initial patch.
* Refs #34483 -- Fixed timesince()/timeuntil() with timezone-aware dates on ↵Mariusz Felisiak2023-04-141-0/+18
| | | | | | different days and interval less than 1 day. Follow up to 813015d67e2557fa859a07930a9becec4e5f64a0. Regression in 8d67e16493c903adc9d049141028bc0fff43f8c8.
* Fixed #34486 -- Fixed DatabaseOperations.compose_sql() crash with no ↵Scott Macpherson2023-04-141-0/+10
| | | | | | existing database connection on PostgreSQL. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
* Fixed #34483 -- Fixed timesince()/timeuntil() with timezone-aware dates and ↵nessita2023-04-131-0/+17
| | | | | | | interval less than 1 day. Regression in 8d67e16493c903adc9d049141028bc0fff43f8c8. Thanks Lorenzo Peña for the report.
* Refs #34482 -- Reverted "Fixed #32969 -- Fixed pickling HttpResponse and ↵Mariusz Felisiak2023-04-121-9/+13
| | | | | | | | subclasses." This reverts commit d7f5bfd241666c0a76e90208da1e9ef81aec44db. Thanks Márton Salomváry for the report.
* Fixed #34484, Refs #34482 -- Reverted "Fixed #29186 -- Fixed pickling ↵Mariusz Felisiak2023-04-121-13/+16
| | | | | | | | HttpRequest and subclasses." This reverts commit 6220c445c40a6a7f4d442de8bde2628346153963. Thanks Adam Johnson and Márton Salomváry for reports.
* Fixed #27505 -- Allowed customizing Paginator's error messages.Marcelo Galigniana2023-04-121-0/+28
|
* Fixed #34394 -- Added FORCE_SCRIPT_NAME handling to ASGIRequest.sarahboyce2023-04-121-0/+7
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #34480 -- Fixed crash of annotations with Chr().Jacob Walls2023-04-111-1/+11
|
* Fixed #34455 -- Restored i18n_patterns() respect of prefix_default_language ↵sarahboyce2023-04-101-0/+6
| | | | | | | | argument when fallback language is used. Regression in 94e7f471c4edef845a4fe5e3160132997b4cca81. Thanks Oussama Jarrousse for the report.
* Refs #34118 -- Fixed CustomChoicesTests.test_uuid_unsupported on Python 3.11.4+.Mariusz Felisiak2023-04-071-6/+1
| | | | | https://github.com/python/cpython/commit/5342f5e713e0cc45b6f226d2d053a8cde1b4d68e Follow up to 38e63c9e61152682f3ff982c85a73793ab6d3267.
* Fixed #34470 -- Enforced UTF-8 encoding on PostgreSQL.Mariusz Felisiak2023-04-071-0/+12
| | | Regression in 6a2165816394ab4bb259f6171e82417e098e97a6.
* Fixed #34466 -- Reallowed setting cursor_factory in DATABASES["options"] on ↵Anders Kaseorg2023-04-071-0/+18
| | | | | | PostgreSQL. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.