Commit Graph

2041 Commits

Author SHA1 Message Date
Loic Bistuer d1799233f4 Fixed clash caused by the newly introduced -e shorthand for makemessages --exclude.
This fixes a regression caused by 0707b82. Refs #22328.
2014-05-02 23:07:17 +07:00
Andrew Godwin e049c88603 Cleanup failing test w/contenttypes and remove useless graph load 2014-04-30 15:11:52 -07:00
Andrew Godwin 8f6dff372b Fixed #22485: Include all unmigrated apps in project state by default. 2014-04-30 12:25:12 -07:00
Tim Graham d9c272b22f Removed unused import. 2014-04-30 07:23:39 -04:00
Bruno Ribeiro da Silva 83413c53d2 Fixed #22511 -- Added args to migrations management commands. 2014-04-30 07:15:03 -04:00
Ramiro Morales 2df7238512 Removed bogus, ineffective 'U' flag from codecs.open() call. 2014-04-29 07:46:54 -03:00
Aymeric Augustin 8b5b199e20 Fixed #3214 -- Stopped parsing SQL with regex.
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.

Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.

sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.

Many people contributed to both tickets, thank you all, and especially
Claude for the review.

Refs #22401.
2014-04-26 17:46:23 +02:00
Ana Krivokapic 0707b824fe Fixed #22328 -- Added --exclude option to compilemessages and makemessages. 2014-04-26 17:07:44 +07:00
Kevin Christopher Henry 91afc00513 Fixed #21157 -- Fixed problems with ResolverMatch
- Fixed bug in get_callable() that caused resolve() to put a string
  in ResolverMatch.func.
- Made ResolverMatch.url_name match the actual url name (or None).
- Updated tests that used the string value in ResolverMatch.func, and
  added regression tests for this bug.
- Corrected test urls whose dummy view paths caused failures (behavior
  that was previously masked by this bug).
2014-04-23 20:12:34 -04:00
Claude Paroz 3a435a057c Set compile messages options as class variable
Refs #18714. Same logic as options for makemessages commands.
2014-04-23 15:15:03 +02:00
Malcolm Box af5f688392 Fixed #22495 -- Locmem cache.add() failed with infinite timeouts
cache.add() incorrectly succeeded when there was an existing key
with an infinite (None) timeout.
2014-04-23 14:49:46 +02:00
Preston Timmons 3c06b2f2a3 Fixed #22486 -- Restored the ability to reverse views created using functools.partial.
Regression in 8b93b31487.

Thanks rcoup for the report.
2014-04-23 07:27:52 -04:00
Tim Graham 8b93b31487 Fixed a remote code execution vulnerabilty in URL reversing.
Thanks Benjamin Bach for the report and initial patch.

This is a security fix; disclosure to follow shortly.
2014-04-21 18:11:26 -04:00
Florian Apolloner 405b13fe83 Fixed migrate when called inside a transaction.
This is useful for tests manually calling migrate inside a testcase,
for normal usage this should make no difference, since there is no
surrounding transaction after all. If there is one we still try to
leave the transaction in a useable state (for postgres at least).

If this commit turns out to be causing issues, settings savepoint=False
is probably the right fix :)
2014-04-21 15:37:12 +02:00
Aymeric Augustin 428c0bbe1b Appeased flake8 2.1.0. 2014-04-21 12:27:34 +02:00
Claude Paroz 275811a93c Adapted fixture read mode to file type
Binary mode added in ed532a6a1e is not supported by ZipFile.
Refs #22399.
2014-04-18 18:54:46 +02:00
Claude Paroz ed532a6a1e Fixed #22399 -- Forced fixture reading in binary mode
This might help on systems where default encoding is not UTF-8 (and
on Python 3).
Thanks bacilla for the report.
2014-04-18 17:55:35 +02:00
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 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
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
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
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
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Zbigniew Siciarz 3cdb0baa45 Fixed #22335 -- Fixed popen_wrapper error on non-English Windows systems. 2014-03-26 00:42:19 +01: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
Tim Graham e3c4205b79 flake8 and doc fixes for refs #22257. 2014-03-25 09:44:59 -04:00
Anubhav Joshi f34e8fc890 Fixed #22257 -- Added file output option to dumpdata command. 2014-03-25 13:47:03 +05:30
Baptiste Mispelon 96fc3908ad Fixed a failing test introduced in 918a16bc4c.
Refs #22307.
2014-03-22 18:05:56 +01:00
Patrick Michaud acee46fc95 Fixed #22256 -- Replaced bad fallback for missing PATH
Thanks Baptiste Mispelon for the review.
2014-03-22 16:52:05 +01:00
Aymeric Augustin 6877a9d415 Avoided transactional truncates on amateur databases.
Fixed a test failure that appeared after 753a22a6, although the bug
existed before that commit.

Refs #22308.
2014-03-22 14:39:27 +01:00
Aymeric Augustin 0757e0f30d Avoided transactional DDL on castrated databases.
Fixed a test failure that appeared after 753a22a6, although the bug
existed before that commit.

Refs #22308.
2014-03-22 11:05:14 +01:00
Hans Lawrenz 918a16bc4c Fixed #22307 -- Fixed SpooledTemporaryFile bug in File class.
Added condition to prevent checking the existence of a file name of a
file like object when the name attribute is None. This is necessary
because a SpooledTemporaryFile won't exist on the file system or have a
name until it has reached its max_size. Also added tests.
2014-03-21 22:34:47 +01:00
Aymeric Augustin 753a22a635 Fixed transaction handling in two management commands.
Previously, when createcachetable and flush operated on non-default
databases, they weren't atomic.
2014-03-21 21:29:51 +01:00
Aymeric Augustin 0f9560855e Removed legacy transaction management per the deprecation timeline. 2014-03-21 21:06:50 +01:00
Tim Graham 4965a77407 Removed PIL compatability layer per deprecation timeline.
refs #19934.
2014-03-21 10:54:53 -04:00
Dejan Noveski 4d0c5f6142 Fixed #22255 -- Added support for specifying re flags in RegexValidator 2014-03-21 11:12:36 +01:00
smallcode 61fdb8d487 Fixed regression in file locking on some platforms.
Some platforms with os.name == 'posix' do not have the
fcntl module, e.g. AppEngine.

refs #19373.
2014-03-18 10:35:22 -04:00
Daniel Hahler fc167c9b5e Mentioned that ``dumpdata --natural`` is deprecated. 2014-03-18 07:25:37 -04:00
Andrew Godwin 28779abb75 Fix bad conflict detection during makemigrations 2014-03-08 13:53:20 -08:00
Claude Paroz 210d0489c5 Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Claude Paroz 06efeae598 Added --previous flag to msgmerge command used by makemessages
Also took the opportunity to slightly refactor gettext options
so as to ease customization by subclassing the command.
Thanks Michal Čihař for the report and initial patch.
2014-03-06 10:20:01 +01:00
Athena 5d568bcfa6 Fixed #7571 -- Fixed parameter matching in include()'d urlpattern
Fixed URL resolving in the case where an outer regex includes an inner
regex and both regexes use positional parameters instead of named
groups, causing the outer regex's parameters to override the inner
regex's.

Modified the regex url resolver so that it will concatenates and then
normalizes, instead of normalizing and then concatenating.
2014-03-05 00:35:03 +01:00
zedr 6fe22b30e0 Fixed #22085 -- Added a feature for setting non-expiring keys as the default.
This feature allows the default `TIMEOUT` Cache argument to be set to `None`,
so that cache instances can set a non-expiring key as the default,
instead of using the default value of 5 minutes.

Previously, this was possible only by passing `None` as an argument to
the set() method of objects of type `BaseCache` (and subtypes).
2014-03-04 21:16:35 +01:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Russell Keith-Magee 6b63742ce5 Corrected expected test output to allow for cleanups in signal and compatibility checks. 2014-03-03 19:29:50 +08:00
Russell Keith-Magee c41335fa27 Added backwards compatibliity checks to reference documentation. 2014-03-03 19:20:48 +08:00
Russell Keith-Magee 21d8175242 Fixed #22193 -- Made hint a truly optional arugment on check messages.
Thanks to Thomas Güttler for the suggestion.
2014-03-03 19:16:19 +08:00
Russell Keith-Magee 82ac389486 Edited model and field checks for grammar and consistency. 2014-03-03 18:18:39 +08:00
Erik Romijn 98f13762d7 Fixed #22123 -- EmailValidator now also accepts IPv6 literals in addresses 2014-02-22 17:45:33 +01:00