Commit Graph

4354 Commits

Author SHA1 Message Date
Aymeric Augustin f0c7649b16 Fixed #21198 -- Prevented invalid use of @python_2_unicode_compatible.
Thanks jpic for the report and chmodas for working on a patch.

Reverts 2ea80b94. Refs #19362.

Conflicts:
	tests/utils_tests/test_encoding.py
2013-10-13 18:25:21 +02:00
Aymeric Augustin ddff6522fa [1.6.x] Fixed #19560 -- Identified field in warning for naive datetime.
Thanks gcc for the report and vajrasky for the patch.

Backport of 570d9c2678 from master.
2013-10-13 11:58:12 +02:00
Russell Keith-Magee 1bf95803f3 [1.6.x] Fixed #21243 -- Corrected exception message in multiple database tests.
Thanks to vajrasky for the report and patch.

Backport of a971d19 from trunk.
2013-10-09 09:06:59 +08:00
Russell Keith-Magee 7f0fdffd07 [1.6.x] Refs #21197 -- Clarified upgrade check message.
Thanks to Carl and Shai for the discussion.

Backport of 8ff4303 from master.
2013-10-08 10:02:08 +08:00
Ramiro Morales 5252885494 [1.6.x] Fixed #21165 -- Fix test for syndication feed timestamp field on Windows.
Thanks Michael Manfre for the report, Raphaël Barrois for the patch and
Claude Paroz, Aymeric Augustin for the reviews.

Refs #7936

62dfd79f8b from master.
2013-10-03 22:50:51 -03:00
Kevin Christopher Henry 02c7dbd255 [1.6.x] Fixed #21122 -- Improved clean up of test temp directory on Windows
- Fixed test that didn't close the files it opened
- Caught and handled exception when temp directory cannot be removed

Backport of 978e1351a6 of master
2013-10-02 19:13:20 -04:00
Tim Graham dc26f3fc9b [1.6.x] Fixed Python 2.6 compatability for 3ec368014d. 2013-10-02 10:01:48 -04:00
tschilling e5b0f5b95d [1.6.x] Fixed #21129 -- Prevented admin filter params modifications from throwing an exception.
Thanks Tuttle for the report.

Backport of 5381317fe3 from master
2013-10-02 09:13:59 -04:00
Ramiro Morales 4290cc1d6e [1.6.x] Made test for issue 19552 compatible with Windows.
Take in account platform path separator. Refs #19552.

651bed0918 from master.
2013-10-02 07:35:00 -03:00
Ramiro Morales 3ec368014d [1.6.x] Made skipping of symlink-related makemessages test smarter.
os.symlink() is available starting with Windows Vista but can fail at
runtime.

0f46ec315e from master.
2013-10-02 07:33:52 -03:00
Ramiro Morales 65950805eb [1.6.x] Fixed tests breakage from last commit. 2013-10-01 21:04:28 -03:00
Ramiro Morales d16753eecd [1.6.x] Fixed #21209 -- .po file path comments on Windows.
Literals from source files with Django template language syntax don't
have a '.py' suffix anymore.

Also, the '.\' prefix is preserved to respect GNU gettext behavior on
that platform.

Refs #16903.

4b715fc05a from master.
2013-10-01 20:42:13 -03:00
Anssi Kääriäinen 9972a101e6 [1.6.x] Fixed #21203 -- resolve_columns fields misalignment
In queries using .defer() together with .select_related() the values
and fields arguments didn't align properly for resolve_columns().

Backpatch of bf13c75c0d from master.
2013-10-01 20:47:28 +03:00
Claude Paroz 5b97b99a01 [1.6.x] Factorized requires_tz_support decorator in test utils
Thanks Aymeric Augustin for the suggestion. Refs #21165.
Backport of c1c44b2506 from master.
2013-10-01 13:28:24 +02:00
Aymeric Augustin 0d74bdaf0c Fixed #21134 -- Prevented queries in broken transactions.
Backport of 728548e4 from master.

Squashed commit of the following:

commit 63ddb271a44df389b2c302e421fc17b7f0529755
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 29 22:51:00 2013 +0200

    Clarified interactions between atomic and exceptions.

commit 2899ec299228217c876ba3aa4024e523a41c8504
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:45:32 2013 +0200

    Fixed TransactionManagementError in tests.

    Previous commit introduced an additional check to prevent running
    queries in transactions that will be rolled back, which triggered a few
    failures in the tests. In practice using transaction.atomic instead of
    the low-level savepoint APIs was enough to fix the problems.

commit 4a639b059ea80aeb78f7f160a7d4b9f609b9c238
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Sep 24 22:24:17 2013 +0200

    Allowed nesting constraint_checks_disabled inside atomic.

    Since MySQL handles transactions loosely, this isn't a problem.

commit 2a4ab1cb6e83391ff7e25d08479e230ca564bfef
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Sep 21 18:43:12 2013 +0200

    Prevented running queries in transactions that will be rolled back.

    This avoids a counter-intuitive behavior in an edge case on databases
    with non-atomic transaction semantics.

    It prevents using savepoint_rollback() inside an atomic block without
    calling set_rollback(False) first, which is backwards-incompatible in
    tests.

    Refs #21134.

commit 8e3db393853c7ac64a445b66e57f3620a3fde7b0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:14:17 2013 +0200

    Replaced manual savepoints by atomic blocks.

    This ensures the rollback flag is handled consistently in internal APIs.
2013-09-30 10:14:22 +02:00
Ramiro Morales c4468e0619 [1.6.x] Modified test added in 3afb5916b2 so it doesn't fail on Windows.
Refs #18091.

12ca312e1b from master.
2013-09-29 22:57:04 -03:00
Michael Manfre 5d72ce061f [1.6.x] Fixed #21167 - Improved queries.tests.SubqueryTests
Improve tests to cover slicing scenarios that could be handled in unique
ways by 3rd party database backends.

Backport of b0e06c3662 from master
2013-09-29 17:37:45 +03:00
Baptiste Mispelon c2a35d40db [1.6.x] Fixed #21186: Fixed regression when using date fields in the admin's list_filter.
Thanks to onlygoldi2201 for the report and to ramiro and apollo13
for the reviews.

Backport of 8f51ba669a from master.
2013-09-28 00:46:37 +02:00
Baptiste Mispelon 15bdc85117 [1.6.x] Fix #21185: Added tests for unescape_entities.
Also fixed a py3 incompatibility.
Thanks to brutasse for the report.

Backport of 3754f4ad41 from master.
2013-09-27 18:06:28 +02:00
Anssi Kääriäinen d7ae0bc372 [1.6.x] Fixed #21126 -- QuerySet value conversion failure
A .annotate().select_related() query resulted in misaligned rows vs
columns for compiler.resolve_columns() method.

Report & patch by Michael Manfre.

Backpatch of 83554b018e from master.
2013-09-25 20:50:48 +03:00
Anssi Kääriäinen 1a922870ea [1.6.x] Fixed #21150 -- Improved Query.add_fields() join promotion logic
Thanks to Eivind Fonn for the report and test case.
2013-09-24 19:04:42 +03:00
Florian Apolloner eb32de2614 [1.6.x] Stopped a test from executing queries at the module level.
Currently module level queries are executed against the real database
(specified in NAME) instead of the test database; since it is to late
to fix this for 1.6, we at least ensures stable builds. Refs #21443.

Backport of 4fcc1e4ad8 from master.
2013-09-22 23:05:16 +02:00
Florian Apolloner 56201fe5a8 [1.6.x] Fixed "Address already in use" from liveserver.
Our WSGIServer rewrapped the socket errors from server_bind into
WSGIServerExceptions, which is used later on to provide nicer
error messages in runserver and used by the liveserver to see if
the port is already in use. But wrapping server_bind isn't enough since
it only binds to the socket, socket.listen (which is called from
server_activate) could also raise "Address already in use".

Instead of overriding server_activate too I chose to just catch socket
errors, which seems to make more sense anyways and should be more robust
against changes in wsgiref.

Backport of 2ca00faa91 from master.
2013-09-22 22:04:50 +02:00
Aymeric Augustin e76dd4cd1a [1.6.x] Fixed #21074 -- Added tests for localized datetime fields.
Fields must render values in the current time zone.

This commit only contains tests because this ticket was just a symptom of
a regression from #18777 that was fixed separately.

Backport of 5444a9c from master.
2013-09-21 23:11:04 +02:00
Tim Graham 091ae7f172 Removed accidentally added pyc file.
Thanks Simon Charette for the report.
2013-09-18 20:27:07 -04:00
Tim Graham 778d4da9cc [1.6.x] Fixed #21098 -- Applied sensitive_post_parameters to MultiValueDict
Thanks simonpercivall for the report and bmispelon for the review.

Backport of 2daada800f from master
2013-09-18 09:56:01 -04:00
Tim Graham dbad65ded7 [1.6.x] Fixed bad backport in last commit; refs #21118 2013-09-18 09:52:29 -04:00
Tim Graham 14e139ecdf [1.6.x] Fixed #21118 -- Isolated a test that uses the database.
Thanks rmboggs for the report.

Backport of 4f40b97d97 from master
2013-09-18 09:43:10 -04:00
Tim Graham 275497c570 [1.6.x] Fixed #15625 -- Made message in MultiValueDictKeyError less verbose.
Thanks margieroginski for the suggestion.

Backport of 893198509e from master
2013-09-18 06:49:59 -04:00
Anssi Kääriäinen 4c4954a3c1 [1.6.x] Added tests for double-pickling a QuerySet
Refs #21102.

Backpatch of 74b91b3888
2013-09-14 10:36:48 +03:00
Tim Graham 536cc64240 [1.6.x] Prevented arbitrary file inclusion with {% ssi %} tag and relative paths.
Thanks Rainer Koirikivi for the report and draft patch.

This is a security fix; disclosure to follow shortly.

Backport of 7fe5b656c9 from master
2013-09-10 21:03:51 -04:00
Aymeric Augustin f9f792eb04 [1.6.x] Took advantage of django.utils.six.moves.urllib.*.
Backport of 6a6428a36 from master.
2013-09-10 21:29:31 +02:00
Aymeric Augustin b085e7c303 [1.6.x] Further hardening. Refs #18766.
Backport of c687bf0 from master.
2013-09-08 20:43:33 +02:00
Aymeric Augustin 0035a0ce2e [1.6.x] Hardened the test introduced in ded11aa6. Refs #18766.
Inputs acceptable to time.mktime are platform-dependent.

Backport of 1a1e1478 from master.
2013-09-08 19:41:34 +02:00
Aymeric Augustin 7c31e195db [1.6.x] Fixed #18766 -- Pointed to pytz when LocalTimezone fails.
Thanks void for the report.

Backport of ded11aa6 from master.
2013-09-08 09:17:03 +02:00
Tim Graham be9930d7be [1.6.x] Fixed deprecation warning on Python 3
Backport of b7451b72 from master.
2013-09-07 13:15:13 -05:00
Aymeric Augustin 7fcd6aa669 [1.6.x] Fixed #20530 -- Properly decoded non-ASCII query strings on Python 3.
Thanks mitsuhiko for the report.

Backport of 65b6eff3 and adaptation of 8aaca65 from master.
2013-09-07 12:06:38 -05:00
Aymeric Augustin fac5735a3d [1.6.x] Fixed #20557 -- Properly decoded non-ASCII cookies on Python 3.
Thanks mitsuhiko for the report.

Non-ASCII values are supported. Non-ASCII keys still aren't, because the
current parser mangles them. That's another bug.

Simplified backport of 8aaca651 and f5add47 from master.
2013-09-07 10:45:24 -05:00
Aymeric Augustin f855058c35 [1.6.x] Fixed #11811 -- Data-loss bug in queryset.update.
It's now forbidden to call queryset.update(field=instance) when instance
hasn't been saved to the database ie. instance.pk is None.

Conflicts:
	tests/queries/tests.py

Backport of b4cd8169 from master.
2013-09-06 21:59:28 -05:00
Russell Keith-Magee 2a2ac5c140 Merge pull request #1566 from adamsc64/ticket_11857
Fixed #11857 -- Added missing 'closed' property on TemporaryFile class.

Backport of 926bc42 from trunk.
2013-09-06 19:44:25 -05:00
Russell Keith-Magee 3df9647ad9 [1.6.x] Merge pull request #1582 from rca/12756-missing-yaml-module-serializer-error-message
Fixed #12756: Improved error message when yaml module is missing.

Backport of 4f5faa1916 from master.
2013-09-06 19:01:24 -05:00
Russell Keith-Magee 99952bab30 [1.6.x] Merge pull request #1580 from ianawilson/ticket_16502
Fixed #16502 -- Fixed a TemplateDoesNotExist error that should be an ImproperlyConfigured.

Assistance on the patch from #jambronrose.

Backport of 9b2dc12b83 from master.
2013-09-06 17:39:16 -05:00
Russell Keith-Magee b917458f47 Merge pull request #1579 from ianawilson/ticket_21058
[1.6.x] Fixed #21058 -- Fixed debug view blowing up when no template is provided to the template rendering functions.

Assistance on this commit from @jambonrose.

Backport of 122020fdb9 from master.
2013-09-06 17:11:07 -05:00
Eric Boersma 180b9955cc [1.6.x] Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.

Backport of 4d13cc56de from master
2013-09-05 20:16:14 -04:00
Tim Graham 77cf0d6519 [1.6.x] Fixed #21041 -- Removed a duplicate form in tests.
Thanks tuxcanfly.

Backport of bab039d74c from master
2013-09-05 06:32:26 -04:00
Aymeric Augustin 115318051c [1.6.x] Replaced "not PY3" by "PY2", new in six 1.4.0.
Conflicts:
	django/db/backends/oracle/base.py
	django/db/backends/sqlite3/base.py
	django/db/models/base.py

Backport of 365c3e8b from master.
2013-09-03 07:34:45 -05:00
Carl Meyer 21a3efcf48 [1.6.x] Fixed #20999 - Allow overriding formfield class with choices, without subclass restrictions.
Refs #18162. Thanks claudep and mjtamlyn for review.

Backport of 7211741fc5 from master.
2013-08-30 17:45:14 -06:00
Anssi Kääriäinen 76e38a2177 [1.6.x] Fixed #20988 -- Added model meta option select_on_save
The option can be used to force pre 1.6 style SELECT on save behaviour.
This is needed in case the database returns zero updated rows even if
there is a matching row in the DB. One such case is PostgreSQL update
trigger that returns NULL.

Reviewed by Tim Graham.

Refs #16649

Backport of e973ee6a98 from master

Conflicts:
	django/db/models/options.py
	tests/basic/tests.py
2013-08-30 09:47:34 +03:00
Tim Graham 10d15f79e5 [1.6.x] Fixed #14786 -- Fixed get_db_prep_lookup calling get_prep_value twice if prepared is False.
Thanks homm for the report and Aramgutang and lrekucki for work on
the patch.

Backport of f19a3669b8 from master
2013-08-29 12:14:40 -04:00
Tim Graham ef1259342b [1.6.x] Fixed #16433 -- Fixed a help_text/read only field interaction that caused an admin crash.
Thanks chris at cogdon.org for the report and admackin for the patch.

Backport of af953c45cc from master
2013-08-29 09:45:02 -04:00