Commit Graph

10787 Commits

Author SHA1 Message Date
Moayad Mardini 214d1e1b0f Fixed #22454 - Changed compatibility warning hint
The warning hint of `_check_test_runner` of 1.6 compatibility had a link
to a general release note. The link should be edited to refer the
relevant "Backwards incompatible changes in 1.6" section that documents
the cause and the possible solutions and workarounds of the warning.
2014-04-17 20:41:25 -04:00
Tim Graham 11e30b684d Fixed a KeyError on login with legacy sessions; refs #21649.
Thanks Loic for the report.
2014-04-17 19:57:20 -04:00
Donald Stufft ecff136f69 Merge pull request #2582 from alex/stdlib-pbkdf2hmac
Use the stdlib's PBKDF2 implementation when available.
2014-04-17 16:01:17 -04:00
Claude Paroz c082f3c74c Fixed #22456 -- Replaced 900913 EPSG code by 3857 in some tests
3857 is now the official EPSG code for the Google spherical mercator
projection and some recent versions of GDAL do not recognize 900913
any longer.
Thanks Tim Graham for the report and initial patch.
2014-04-17 21:18:07 +02:00
Alex Gaynor 7283c21173 For another day 2014-04-17 11:07:19 -07:00
Alex Gaynor 21a1fddcc4 Typo fix 2014-04-17 11:04:57 -07:00
Alex Gaynor cb68eb3e6d Use the stdlib's PBKDF2 implementation when available.
This is a bit faster than ours, which is good, because it lets you increase
the iteration counts.

This will be used on Python 3.4+, and, pending the acceptance of PEP466, on
newer Python 2.7s.
2014-04-17 11:02:42 -07:00
Andrew Gorcester 00e3b9a2a9 Fixed #22397 -- Issues removing M2M field with explicit through model.
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).

Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
2014-04-17 12:54:35 -04:00
Tim Graham 47927eb786 Revert "Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse."
This reverts commit 071c933775.

This introduced a regression on MySQL and custom SQL is deprecated.
2014-04-16 21:03:22 -04:00
Justin Hamade a13df671a5 Fixed #22434 -- Retain ordering on related sliced subqueries.
Thanks maciej.pawlisz for the report, and charettes for the review.
2014-04-16 17:57:11 -04:00
Simon Charette 79f05616fb Fixed flake8 warnings introduced in recent commits. 2014-04-16 16:49:37 -04:00
Motiejus Jakštys 0e45669fa9 Fixed #22460 -- Explicity remove constraints when dropping a related field. 2014-04-16 15:38:31 -04:00
Marc Egli 0bcc92c691 Fixed #22356 -- Added a check to make sure unique_together fields are local. 2014-04-14 16:49:40 -04:00
Jacob R. Rothenbuhler 17c1884456 Fixed #22369 -- Added count parameter to assertTemplateUsed 2014-04-14 15:55:10 -04:00
Simon Charette 72d3889db4 Fixed #22350 -- Consistently serialize bytes and text in migrations.
Thanks to @treyhunner and Loïc for their suggestions and review.
2014-04-13 18:22:26 -04:00
valtron d3b71b976d Fixed #21760 -- prefetch_related used an inefficient query for reverse FK.
Regression introduced by commit 9777442. Refs #21410.
2014-04-13 00:34:16 +07:00
Claude Paroz 3417ba0309 Also allowed a non-overridden setting to be deleted
Refs #20032, #18824. Thanks ztorstri at gmail.com for the report.
2014-04-12 15:33:22 +02:00
Claude Paroz 3e3a7372f5 Fixed #22102 -- Made SimpleTestCase tests run before unittest.TestCase ones
Thanks aptiko for the reporti and Tim Graham for the review.
2014-04-12 11:42:06 +02:00
Aymeric Augustin 476db08b16 Improved a comment. Thanks intgr for the report. 2014-04-11 23:01:00 +02:00
Aymeric Augustin ee837b9a22 Increased robustness of 58161e4e. Refs #22291. 2014-04-10 21:22:47 +02:00
Aymeric Augustin 8176150850 Fixed #21202 -- Maintained atomicity when the server disconnects.
Thanks intgr for the report.

This commit doesn't include a test because I don't know how to emulate a
database disconnection in a cross-database compatible way.

Also simplified a 'backends' test that was constrained by this problem.
2014-04-10 21:22:47 +02:00
Aymeric Augustin 25860096f9 Fixed #21239 -- Maintained atomicity when closing the connection.
Refs #15802 -- Reverted #7c657b24 as BaseDatabaseWrapper.close() now
has a proper "finally" clause that may need to preserve self.connection.
2014-04-10 20:57:43 +02:00
Aymeric Augustin 3becac8484 Fixed #22321 -- Wrapped exceptions in _set_autocommit.
Refs #21202.
2014-04-10 20:16:12 +02:00
John Paulett b5a9166f7e Fixed #22364 -- Sanitized getpass input in changepassword.
Python 2 getpass on Windows does not accept unicode, even
when containing on ASCII characters. Related #190807.
2014-04-10 13:15:37 -04:00
Tomasz Wysocki ea5a984704 Refactored some code in SelectDateWidget. 2014-04-10 13:03:23 -04:00
Tim Graham 395d75ea6b Fixed #22194 -- Added --list-tags option to check command.
Thanks Elvard for the patch.
2014-04-10 09:43:55 -04:00
Tim Graham b513fa5fc6 Fixed #22195 -- Used constants to define built-in tags for check framework.
Thanks Elvard for the patch.
2014-04-10 08:45:48 -04:00
Shai Berger f095356ba2 Fixed #22343 -- Disallowed select_for_update in autocommit mode
The ticket was originally about two failing tests, which are
fixed by putting their queries in transactions.

Thanks Tim Graham for the report, Aymeric Augustin for the fix,
and Simon Charette, Tim Graham & Loïc Bistuer for review.
2014-04-10 03:04:51 +03:00
julien 'pouete' Godin 071c933775 Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse. 2014-04-09 19:25:07 -04:00
Aymeric Augustin 5f2f47fdfc Fixed #21553 -- Ensured unusable database connections get closed. 2014-04-09 22:41:33 +02:00
Aymeric Augustin 2791fbf59d Used more specific test assertions. 2014-04-09 22:20:22 +02:00
e0ne 2aaa045c61 Fixed #13408 -- Deprecated silent unpacking exception passing in for template tag.
Thanks peterbe for the suggestion.
2014-04-08 13:55:17 -04:00
Tim Graham 3cba90f22a Fixed #21084 -- Used proxy model's content type for admin log entries.
(the previous commit included only the test)
2014-04-07 09:04:49 -04:00
Tomasz Wysocki 78623d253b Removed casting to bool just before negation. 2014-04-07 08:30:05 -04:00
Anubhav Joshi cd914e31c9 Fixed #21977 -- Deprecated SimpleTestCase.urls 2014-04-06 17:33:43 -04:00
Claude Paroz 0a65da941c Fixed #22236 -- Removed inappropriate usage of signals
Thanks Aymeric Augustin for the report and Tim Graham for the review.
2014-04-05 21:00:31 +02:00
Tim Graham fd23c06023 Fixed #21649 -- Added optional invalidation of sessions when user password changes.
Thanks Paul McMillan, Aymeric Augustin, and Erik Romijn for reviews.
2014-04-05 12:50:51 -04:00
Tomasz Wysocki c28beb4291 Refactored and commented strip_tags utility 2014-04-03 21:24:29 +02:00
Simon Charette 074d3183d9 Fixed #22363 -- Correctly serialize `django.utils.datetime_safe` objects.
Thanks to linovia for the report.
2014-04-03 14:54:16 -04:00
Tim Graham 0f6ea69e27 Cleaned up string detection for a deprecation warning by using six.string_types. 2014-04-03 11:03:31 -04:00
Vishal Lal a8e2ec0e82 Fixed #22372 -- Improved description of WizardView.get_context_data().
Thanks simon29 for the report.
2014-04-03 08:25:11 -04:00
Tim Graham d73d0e071c Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Alex Gaynor 608e6eb295 Added an explanatory comment. Refs #22017 2014-04-02 09:47:18 -07:00
Alex Gaynor 666990a2a0 Revert "Merge pull request #2508 from tomwys/patch-1"
This reverts commit c45607e939, reversing
changes made to 9769337ca8.
2014-04-02 09:45:42 -07:00
Alex Gaynor 66cbd81456 Merge pull request #2509 from tomwys/patch-2
Refactor. Stop using memory for list copies.
2014-04-02 08:35:42 -07:00
Tomasz Wysocki cb9704fc4f Refactor. Stop using memory for list copies. 2014-04-02 17:32:51 +02:00
Tomasz Wysocki 6eb891f57a Don't copy list for iteration. 2014-04-02 17:28:09 +02:00
Daniel Neuhäuser 4aa80149e7 Fixed #22327 -- Turned BaseEmailBackend into a context manager
Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.
2014-03-31 14:08:51 -04:00
Tim Graham 246face209 Fixed #22362 -- Improved AuthenticationMiddleware assertion message.
Thanks Keryn Knight.
2014-03-31 08:10:59 -04:00
Tim Graham 981b864fbd Replaced urllib/urlparse imports with from django.utils.six.moves. 2014-03-31 07:54:22 -04:00
Loic Bistuer 4339e9a92d Fixed #21795 -- Made add_preserved_filters account for url prefixes.
Thanks to trac username honyczek for the report. Refs #6903.
2014-03-31 07:19:59 -04:00
Tim Graham 029d77eaaa Fixed typo in docstring. 2014-03-31 07:01:13 -04:00
Loic Bistuer 0fd51cf0bd Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies. 2014-03-31 06:50:38 -04:00
Loic Bistuer a449e7feec Fixed #22359 -- Changing M2M field to blank=True failed on sqlite. 2014-03-31 06:13:19 -04:00
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Loic Bistuer 20399083f4 Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.
Since assignments on M2M or reverse FK descriptors is composed of a `clear()`,
followed by an `add()`, `clear()` could potentially affect the value of the
assigned queryset before the `add()` step; pre-evaluating it solves the problem.

This patch fixes the issue for ForeignRelatedObjectsDescriptor,
ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor.
It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
2014-03-30 15:36:45 +07:00
Loic Bistuer bc9be72bdc Fixed transaction handling for a number of operations on related objects.
Thanks Anssi and Aymeric for the reviews. Refs #21174.
2014-03-30 12:13:00 +07:00
Aymeric Augustin f356b6ecc3 Increased memoization cache size for language codes.
There may be more than 100 (default maxsize) commonly seen xx-yy values
on some sites. The additional memory consumption isn't significant.

Also added a comment explaining why this cache must have a maxsize.
2014-03-29 19:47:15 +01:00
Claude Paroz e819a3cd62 Skipped PostGIS version tests when psycopg2 not installed
Refs #22334. Thanks Tim Graham for spotting the issue.
2014-03-29 19:25:57 +01:00
Rémy Sanchez 88f1e3d93d Unit testing Postgis version check
Refs #22334.
2014-03-29 15:37:40 +01:00
Tim Graham ed4c2e1c0d Fixed #22329 -- Used label_tag() in some admin auth templates.
refs #17922.
2014-03-29 08:54:56 -04:00
Tim Graham 2cc8840397 Removed unused imports. 2014-03-29 08:54:30 -04:00
Claude Paroz 41903d025a Dropped support for GDAL 1.6 2014-03-29 11:08:52 +01:00
Claude Paroz c5d1df70a4 Dropped support for GEOS 3.1 2014-03-29 11:08:52 +01:00
Claude Paroz e62dea9ad5 Confirmed Spatialite 4 support 2014-03-29 11:08:52 +01:00
Claude Paroz 0f1f12c564 Confirmed GEOS 3.4 support 2014-03-29 11:08:52 +01:00
Anssi Kääriäinen 21f208e66e Fixed #22250 -- regression in gis compiler for non-concrete fields
Thanks to gwahl@fusionbox.com for the report.
2014-03-29 07:58:25 +02:00
Maxime Turcotte 5e4e0b6fe9 Fixed #22306 -- Deprecated future versions of cycle and firstof template tags. 2014-03-28 18:55:06 -04:00
Tim Graham 12e9adcd71 Corrected deprecation warnings. 2014-03-27 17:48:12 -04:00
Tim Graham dadf2ee75f Fixed a deprecation warning with the HTMLParser safe argument.
refs 6ca6c36f82
2014-03-27 09:17:49 -04:00
Chris Beaven b077ba7ac1 Add a useful stacklevel to some RemovedInDjango19Warnings 2014-03-27 15:44:52 +13:00
Claude Paroz d320863878 Fixed #22114 -- Stopped adding trailing slashes in URLField.to_python
Thanks coredumperror at gmail.com for the report and Tim Graham
for the review.
2014-03-26 18:10:58 +01:00
Simon Charette b9e50e4774 Fixed the PostGIS circular imports caused by 1506c71a95.
Thanks to @loic for the help and @timgraham for the review.

refs #12030.
2014-03-26 12:57:57 -04:00
Tim Graham 45ef4baf5c Fixed Python 3.4 test failure. 2014-03-26 09:57:00 -04:00
Zbigniew Siciarz 3cdb0baa45 Fixed #22335 -- Fixed popen_wrapper error on non-English Windows systems. 2014-03-26 00:42:19 +01:00
Simon Charette ff874f363c Fixed field deconstruction tests failures introduced by 1506c71a95.
refs #12030.
2014-03-25 18:54:52 -04:00
Tim Graham 42336c84a0 Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.
This commit reverts 69d4b1c and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
2014-03-25 18:30:58 -04:00
Simon Charette 1506c71a95 Fixed #12030 -- Validate integer field range at the model level.
Thanks to @timgraham for the review.
2014-03-25 14:31:20 -04:00
Tim Graham 9b7ba8af1b Fixed #22322 -- Fixed incorrect explanation of what managed=False does.
refs #14305.

Thanks Adrian Klaver for the report.
2014-03-25 14:01:37 -04:00
Loic Bistuer 69d4b1c3ea Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models. 2014-03-25 10:33:44 -04:00
David Evans 86dcac4634 Fixed #22315 -- str/bytes mismatch in staticfiles
Previously, `ManifestFilesMixin.read_manifest` failed in Python 3
because `json.loads` accepts `str` not `bytes`.
2014-03-25 09:53:24 -04:00
Tim Graham e3c4205b79 flake8 and doc fixes for refs #22257. 2014-03-25 09:44:59 -04:00
Ben Davis 16afffffe8 Fixed #22087 -- Made AdminReadonlyField respect ModelForm Meta overrides. 2014-03-25 09:33:13 -04:00
Stephen Burrows 35ed792cf2 Fixed #22300 -- Fixed crash in migrations when changing non-relational field to relational. 2014-03-25 07:46:15 -04:00
Marc Tamlyn 09ab447d08 Merge pull request #2465 from coder9042/ticket_22258
Fixed #22257 -- Added file output option to dumpdata command.
2014-03-25 11:42:03 +00:00
Anubhav Joshi f34e8fc890 Fixed #22257 -- Added file output option to dumpdata command. 2014-03-25 13:47:03 +05:30
Daniel Hahler 1edfa155e3 Fixed #22293 -- Avoided renaming many-to-many tables to themselves.
Fixed this for both implementations of _alter_many_to_many, instead of
in `alter_db_table` itself (more implementations).
2014-03-24 13:24:52 -04:00
Jannis d81a9c50d8 Fixed typo in error message in django.contrib.sitemaps. 2014-03-24 13:06:06 -04:00
Anubhav Joshi 416a858023 Fixed #17922 -- Added required_css_class to form label.
Thanks hanson2010 for the suggestion.
2014-03-24 08:11:54 -04:00
Tim Graham 2ec82c7387 Updated six to 1.6.1. 2014-03-24 07:33:55 -04:00
Loic Bistuer 7ac8380799 Fixed #22318 -- Added Form.has_error() to easily check if a given error has happened. 2014-03-24 07:21:32 -04:00
Aymeric Augustin 58161e4e93 Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.
Thanks err for the report.
2014-03-23 20:45:22 +01:00
Simon Charette a6fc18594e Fixed PostGIS test failures. 2014-03-22 18:12:52 -04:00
Simon Charette fa8b473528 Fixed #22299 -- Cleanup wizard temp files when possible.
Thanks to @erikr for the review.
2014-03-22 17:48:12 -04:00
Aymeric Augustin 232181d1c5 Advanced deprecation warnings for 1.8. 2014-03-22 21:12:58 +01:00
Claude Paroz 74b3467646 Removed GeoRSSSitemap
Refs #18531.
2014-03-22 19:58:50 +01:00
Ramiro Morales 491419b5ff Made m2m fields form help_text munging specific to admin widgets.
Refs #9321 and follow-up to e80de93af6.
2014-03-22 15:43:17 -03:00
Loic Bistuer e61d99d96d Fixed #20684 -- Added support for HTML5 boolean attributes to form widgets. 2014-03-22 14:28:12 -04:00
Alex Gaynor 684e8a941b Removed an unused variable. 2014-03-22 10:11:39 -07:00
Baptiste Mispelon 96fc3908ad Fixed a failing test introduced in 918a16bc4c.
Refs #22307.
2014-03-22 18:05:56 +01:00