Hi Anssi,
Open question: how to handle the transition?
Jacob has suggested that back-compat breaks in test-running are not as
serious as in production code, and that we should just switch to the new
test runner by default in Django 1.6. This is what the pull request
currently does. This will mean that some people's test suites will
likely be broken when they upgrade to 1.6. They would have two options,
both documented in the release notes: they can update their test suite
to be discovery-compatible immediately, or they can just set TEST_RUNNER
to point to the old runner and get back the old behavior, which they can
keep using until Django 1.8 (or longer, if they package the old runner
externally).
The alternative would be to keep the old test runner as the default in
global_settings.py until it is removed in 1.8, and add the new runner as
the TEST_RUNNER in the startproject-generated settings.py. This would
provide a gentler transition for upgrading projects. On the other hand,
we just recently got the startproject settings.py all cleaned-up,
slimmed-down, and newbie-friendly, so it would make me sad to start
polluting it again with stuff that new projects generally shouldn't care
about, for solely legacy reasons.
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
I'd prefer something much simpler:* On syncdb/validate, check for a marker somewhere in user space.* If the marker isn't present, do a check for likely problems. In this case, look for the value of TEST_RUNNER; if it's set to the new default value, display a warning about the change in test discovery format. Add similar checks for other setting changes, or warnings about features that have been fully deprecated (e.g., the final transition of the {% url %} behavior)* Provide a management command to set marker.* On the next syncdb/validate, the marker is present, so the install is verified as being "updated", and no warnings are displayed.This leaves the question of where to put the marker. Some initial ideas:- a file on disk (e.g., an .updated file next to the settings file)- a new setting (VERIFIED_VERSION = "1.5")- a key-value table in a database used only for Django administriviaEssentially, this would give us a place to put the "NO REALLY, READ THIS" warnings that we need in release notes, and make those messages slightly targeted.
Thanks
Yo-yo
Hi Carl,
before I read all the tickets etc; why does runtests.py not use the TEST_RUNNER from settings.py (see https://github.com/django/django/commit/9012833af857e081b515ce760685b157638efcef#L60L149)? We'd need that for jenkins to produce xml files as output.
No good reason, just an oversight I think. If that's all that's needed to make the CI happy, feel free to change it, should be a simple fix.