diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-06-27 13:44:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-28 16:02:15 +0100 |
commit | d74bcbeaf241a67871d62b7e2c17900ae900642e (patch) | |
tree | bd0bf6037a0de26e7668f146ec6ff4afde07e54f /bitbake/lib/toaster/bldcontrol | |
parent | c3058ec4a4f2f4c57116816a5bede1e61a5a4cc4 (diff) | |
download | poky-d74bcbeaf241a67871d62b7e2c17900ae900642e.tar.gz |
bitbake: toaster: address Django-1.10 API deprecations
There are four main API deprecations in Django-1.10:
(a) String view arguments to url() must be replaced by
the explicit class reference
(b) New TEMPLATES stucture in settings.py consolidates
TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS,
TEMPLATE_LOADERS, TEMPLATE_STRING_IF_INVALID, and
TEMPLATE_DEBUG
(c) patterns() wrapper in url() is removed, with
urlpatterns now a simple list
(d) NoArgsCommand in commands() must be replace by
BaseCommand, and handle_noargs() changed to
handle()
Also, the Django version checker must be updated to accept
two digit sub-version numbers (e.g. "1.8" < "1.10")
[YOCTO #11684]
(Bitbake rev: e4c7a94fac7a53fc146387a57e5a09b9ec3caca0)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py index 2ed994f61f..d11166ef53 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py | |||
@@ -1,4 +1,4 @@ | |||
1 | from django.core.management.base import NoArgsCommand, CommandError | 1 | from django.core.management.base import BaseCommand, CommandError |
2 | from django.db import transaction | 2 | from django.db import transaction |
3 | 3 | ||
4 | from django.core.management import call_command | 4 | from django.core.management import call_command |
@@ -18,7 +18,7 @@ def DN(path): | |||
18 | return os.path.dirname(path) | 18 | return os.path.dirname(path) |
19 | 19 | ||
20 | 20 | ||
21 | class Command(NoArgsCommand): | 21 | class Command(BaseCommand): |
22 | args = "" | 22 | args = "" |
23 | help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings." | 23 | help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings." |
24 | 24 | ||
@@ -152,7 +152,7 @@ class Command(NoArgsCommand): | |||
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | def handle_noargs(self, **options): | 155 | def handle(self, **options): |
156 | retval = 0 | 156 | retval = 0 |
157 | retval += self._verify_build_environment() | 157 | retval += self._verify_build_environment() |
158 | retval += self._verify_default_settings() | 158 | retval += self._verify_default_settings() |
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index df11f9d162..8eacb5e896 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -1,4 +1,4 @@ | |||
1 | from django.core.management.base import NoArgsCommand | 1 | from django.core.management.base import BaseCommand |
2 | from django.db import transaction | 2 | from django.db import transaction |
3 | from django.db.models import Q | 3 | from django.db.models import Q |
4 | 4 | ||
@@ -16,7 +16,7 @@ import os | |||
16 | logger = logging.getLogger("toaster") | 16 | logger = logging.getLogger("toaster") |
17 | 17 | ||
18 | 18 | ||
19 | class Command(NoArgsCommand): | 19 | class Command(BaseCommand): |
20 | args = "" | 20 | args = "" |
21 | help = "Schedules and executes build requests as possible. "\ | 21 | help = "Schedules and executes build requests as possible. "\ |
22 | "Does not return (interrupt with Ctrl-C)" | 22 | "Does not return (interrupt with Ctrl-C)" |
@@ -168,7 +168,7 @@ class Command(NoArgsCommand): | |||
168 | except Exception as e: | 168 | except Exception as e: |
169 | logger.warn("runbuilds: schedule exception %s" % str(e)) | 169 | logger.warn("runbuilds: schedule exception %s" % str(e)) |
170 | 170 | ||
171 | def handle_noargs(self, **options): | 171 | def handle(self, **options): |
172 | pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."), | 172 | pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."), |
173 | ".runbuilds.pid") | 173 | ".runbuilds.pid") |
174 | 174 | ||