summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2017-01-12 15:38:59 -0800
committerBrian Dolbec <dolsen@gentoo.org>2017-01-12 15:59:10 -0800
commit3fdb5fb3659bcd5f8cc440413706aabfb5febf80 (patch)
treee528e6a0eabb9c2456326465283d05580338ebb7 /dev-util
parentnet-irc/redirbot: Update twisted deps (diff)
downloadgentoo-3fdb5fb3659bcd5f8cc440413706aabfb5febf80.tar.gz
gentoo-3fdb5fb3659bcd5f8cc440413706aabfb5febf80.tar.bz2
gentoo-3fdb5fb3659bcd5f8cc440413706aabfb5febf80.zip
dev-util/buildbot: Version bump, update 9999, clean old release
Package-Manager: Portage-2.3.3_p23, Repoman-2.3.1_p16
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/buildbot/Manifest2
-rw-r--r--dev-util/buildbot/buildbot-0.9.3.ebuild (renamed from dev-util/buildbot/buildbot-0.9.0_p1.ebuild)18
-rw-r--r--dev-util/buildbot/buildbot-9999.ebuild10
-rw-r--r--dev-util/buildbot/files/buildbot-0.9.3-json-import.patch1000
4 files changed, 1023 insertions, 7 deletions
diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
index 623b6d01cd46..8a6793728dc9 100644
--- a/dev-util/buildbot/Manifest
+++ b/dev-util/buildbot/Manifest
@@ -1,6 +1,6 @@
DIST buildbot-0.8.10.tar.gz 4822307 SHA256 c4964d2ebd81cb80a14cb058fb2aab0572a1d8d86672d514e775b42deb08a5f4 SHA512 e148a1670a56837587d858d1697fe117661cbbfedab42bf7be905f9e8e4266e4ff0170b0cd81aed61234d30497a05427061c3084033f09811d0bc306b200661b WHIRLPOOL 26397b6f914266201aba4feb4df7353facad4fd0f51bdf7e35cf25205c45eadcf83f24c265e540b13d327750ce9561362be6a5aa237152cf1298d970c504f76c
DIST buildbot-0.8.12.tar.gz 4834352 SHA256 c6b66976dff712268566574d57131ec15e5682f6d4390cd5c8559bab0980c4d6 SHA512 18c5144132fb033f3581d3c494d5e8ff35d3e8b1548764452ce9ae543d710e58a2c6e3e8e46a0ef237804f9a6a45485890ae4616ab655fb00d4ccf328d6f6645 WHIRLPOOL 5754b7c0278fb5e7da8a7dd66253f6f4d12f54c125f6a78aa9018a2b6b22fd88a27e79e6821ab05e4cd9e87bf0dd08c3c73c7914d4c499ac13c48ca232ed21c8
-DIST buildbot-0.9.0.post1.tar.gz 3013406 SHA256 afd8229c9fd33daa6d8227cd665c75b1b25c47ffcc4046ab5fd5b290ccd536a3 SHA512 0b171ca6ed15b15b4df23d0618cb7d98f6ae922efaa1e35a9458efaaf676b80a6ff3be36231b8ca31cadf89c3968425c560a0bff3630e8792d179462eba0da67 WHIRLPOOL e440826e4a027b42d28c0f3a0afca3c46ec5dc0b4d629fcef75de4b3350cffa2208e0024983f0ffebd1df38a5d860c6bd541fc1c3e28f8b6669ee93a4d4be8b4
DIST buildbot-0.9.1.tar.gz 3051975 SHA256 a9f385f66f5cc3021f4cbfce92496673ebf9171578fa9e5ae4f66732276d64ce SHA512 c3b845a3607c5eaa0a5076755bc0e285ba7c6809f9d7934fab7c6cf8299610e921034656cf3792113961176a821138c6d069122d4d1f1698f16badf3ef9a0dea WHIRLPOOL 6767878665f09ff7b6219ddcda73487b441f3e33ce580fc2df2f16d430217d4ac38b93e22a3f3abd9c8380ac6e6c93de6767faec1aa5615f82fbe8d8e20759e1
DIST buildbot-0.9.2.tar.gz 3026977 SHA256 d33ec059941cf830c8f7b7f336a76e32e7122e2690a27b784efeddc6dbf4564a SHA512 a1c6345bcceb5c8f4ed600542625eee81e59af00a1b12054fe77e3b4ed5536b7004fcbd07cfc96baa3061193eb79e4290e056cf7157b71831370654c057a2c57 WHIRLPOOL 075a00d85df5321180345348a02ac12cc8a1bea36d6e60617ebe54de71ce5a989fcf009822834dad1994a6f83ebb5c6132f350902fd31d5b279c5c13014bb4b9
+DIST buildbot-0.9.3.tar.gz 3031033 SHA256 c2bc6a8139b0f97d304bfa047a4c414e42ea12ba94e34d82ae7cb356a69d87fb SHA512 a6f18e88c33fe1eafe0b9b154fb77f0d93db71145faab527ecd5ce53fcbbff48b915de4a02461da87eefbd58a649a56d3a9b16ba759d978e70a70898a15681b7 WHIRLPOOL b62fd5bea0b647b703674024e50731e7713e9488dec570d8e42beabaa2135a81349b955164cf01898b12ab0123d9a8f3b76e3364f65003b8af85a54755b6ad22
DIST buildbot-test_templates.tar.xz 304 SHA256 3d581b74c21f88119f7e5f93f381f2004662ca7219aae9a05f0bd3f8cae48317 SHA512 87ba914896d86f70e2e4b24a51248c475bf24fad4c02e3a99d6d7fa41b5a57f369865b20a7c30dafa3162ba50ccb04de1809b0cf9d53e45537738e4821229866 WHIRLPOOL 151dc42ceed8e90c96cdd0b6e937f13019c0d6cd5e2e878ee971cbc69ce4ea56b240b58fa743766bd0d71cafa38279e37be077324eb5ece7b99df46eaf566dfe
diff --git a/dev-util/buildbot/buildbot-0.9.0_p1.ebuild b/dev-util/buildbot/buildbot-0.9.3.ebuild
index c6c4f434678e..915e721730da 100644
--- a/dev-util/buildbot/buildbot-0.9.0_p1.ebuild
+++ b/dev-util/buildbot/buildbot-0.9.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -11,8 +11,8 @@ EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
[[ ${PV} == *9999 ]] && inherit git-r3
inherit readme.gentoo-r1 user systemd distutils-r1
-MY_V="0.9.0.post1"
-MY_P="${PN}-${MY_V}"
+MY_PV="${PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
DESCRIPTION="BuildBot build automation system"
HOMEPAGE="http://trac.buildbot.net/ https://github.com/buildbot/buildbot http://pypi.python.org/pypi/buildbot"
@@ -66,7 +66,7 @@ DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}] )
test? (
>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
+ >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|| (
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
(
@@ -102,6 +102,10 @@ pkg_setup() {
The scripts can run as a different user if desired."
}
+src_prepare() {
+ epatch "${FILESDIR}"/buildbot-0.9.3-json-import.patch
+ }
+
src_compile() {
distutils-r1_src_compile
@@ -138,6 +142,12 @@ src_install() {
readme.gentoo_create_doc
}
+python_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
pkg_postinst() {
readme.gentoo_print_elog
diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-9999.ebuild
index 9bf2d9d13b69..2183d7106a41 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -66,7 +66,7 @@ DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}] )
test? (
>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
+ >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|| (
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
(
@@ -138,6 +138,12 @@ src_install() {
readme.gentoo_create_doc
}
+python_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
pkg_postinst() {
readme.gentoo_print_elog
diff --git a/dev-util/buildbot/files/buildbot-0.9.3-json-import.patch b/dev-util/buildbot/files/buildbot-0.9.3-json-import.patch
new file mode 100644
index 000000000000..6c3cb14ed583
--- /dev/null
+++ b/dev-util/buildbot/files/buildbot-0.9.3-json-import.patch
@@ -0,0 +1,1000 @@
+From 9e7a734c260b4f473eee11ff7a08b5064ff34e22 Mon Sep 17 00:00:00 2001
+From: Tom Prince <tom.prince@twistedmatrix.com>
+Date: Thu, 12 Jan 2017 11:54:19 -0700
+Subject: [PATCH] Import `json` directly.
+
+Emit deprecation warning.
+Update documentation.
+Fix tests.
+Lint fix.
+---
+ master/buildbot/changes/bitbucket.py | 3 +-
+ master/buildbot/changes/gerritchangesource.py | 2 +-
+ master/buildbot/clients/tryclient.py | 3 +-
+ master/buildbot/data/types.py | 2 +-
+ master/buildbot/db/builds.py | 4 ++-
+ master/buildbot/db/buildsets.py | 3 +-
+ master/buildbot/db/changes.py | 3 +-
+ master/buildbot/db/state.py | 4 ++-
+ master/buildbot/db/steps.py | 4 ++-
+ master/buildbot/db/types/json.py | 7 +++--
+ master/buildbot/newsfragments/json.removal | 1 +
+ master/buildbot/process/properties.py | 2 +-
+ master/buildbot/schedulers/trysched.py | 3 +-
+ master/buildbot/scripts/dataspec.py | 3 +-
+ master/buildbot/scripts/processwwwindex.py | 2 +-
+ master/buildbot/steps/transfer.py | 3 +-
+ master/buildbot/test/fake/fakedata.py | 3 +-
+ master/buildbot/test/fake/fakedb.py | 2 +-
+ master/buildbot/test/integration/test_www.py | 4 ++-
+ .../test/unit/test_changes_gerritchangesource.py | 2 +-
+ .../buildbot/test/unit/test_clients_tryclient.py | 4 ++-
+ master/buildbot/test/unit/test_db_buildsets.py | 3 +-
+ master/buildbot/test/unit/test_mq_wamp.py | 3 +-
+ .../test/unit/test_schedulers_forcesched.py | 3 +-
+ .../buildbot/test/unit/test_schedulers_trysched.py | 3 +-
+ .../test/unit/test_scripts_processwwwindex.py | 3 +-
+ master/buildbot/test/unit/test_steps_transfer.py | 3 +-
+ master/buildbot/test/unit/test_www_oauth.py | 4 +--
+ master/buildbot/test/unit/test_www_rest.py | 2 +-
+ master/buildbot/test/unit/test_www_sse.py | 2 +-
+ master/buildbot/test/unit/test_www_ws.py | 4 ++-
+ master/buildbot/test/util/validation.py | 2 +-
+ master/buildbot/test/util/www.py | 2 +-
+ master/buildbot/util/__init__.py | 32 ++++++++--------------
+ master/buildbot/worker/docker.py | 2 +-
+ master/buildbot/www/config.py | 3 +-
+ master/buildbot/www/hooks/base.py | 3 +-
+ master/buildbot/www/hooks/gitlab.py | 4 +--
+ master/buildbot/www/hooks/googlecode.py | 4 +--
+ master/buildbot/www/oauth2.py | 2 +-
+ master/buildbot/www/rest.py | 2 +-
+ master/buildbot/www/sse.py | 3 +-
+ master/buildbot/www/ws.py | 3 +-
+ master/docs/developer/utils.rst | 12 --------
+ 44 files changed, 91 insertions(+), 77 deletions(-)
+ create mode 100644 master/buildbot/newsfragments/json.removal
+
+diff --git a/master/buildbot/changes/bitbucket.py b/master/buildbot/changes/bitbucket.py
+index 746d85398..3d5b57380 100644
+--- a/master/buildbot/changes/bitbucket.py
++++ b/master/buildbot/changes/bitbucket.py
+@@ -12,6 +12,8 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import time
+ from datetime import datetime
+
+@@ -25,7 +27,6 @@ from buildbot.util import ascii2unicode
+ from buildbot.util import datetime2epoch
+ from buildbot.util import deferredLocked
+ from buildbot.util import epoch2datetime
+-from buildbot.util import json
+
+
+ class BitbucketPullrequestPoller(base.PollingChangeSource):
+diff --git a/master/buildbot/changes/gerritchangesource.py b/master/buildbot/changes/gerritchangesource.py
+index 036071bbf..5e1dd0e58 100644
+--- a/master/buildbot/changes/gerritchangesource.py
++++ b/master/buildbot/changes/gerritchangesource.py
+@@ -15,6 +15,7 @@
+ from future.utils import iteritems
+
+ import datetime
++import json
+
+ from twisted.internet import defer
+ from twisted.internet import reactor
+@@ -26,7 +27,6 @@ from buildbot import util
+ from buildbot.changes import base
+ from buildbot.changes.filter import ChangeFilter
+ from buildbot.util import httpclientservice
+-from buildbot.util import json
+
+
+ class GerritChangeFilter(ChangeFilter):
+diff --git a/master/buildbot/clients/tryclient.py b/master/buildbot/clients/tryclient.py
+index bee4f3462..3f59a3cd6 100644
+--- a/master/buildbot/clients/tryclient.py
++++ b/master/buildbot/clients/tryclient.py
+@@ -12,6 +12,8 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import os
+ import random
+ import re
+@@ -32,7 +34,6 @@ from twisted.python.procutils import which
+ from twisted.spread import pb
+
+ from buildbot.status import builder
+-from buildbot.util import json
+ from buildbot.util import now
+ from buildbot.util.eventual import fireEventually
+
+diff --git a/master/buildbot/data/types.py b/master/buildbot/data/types.py
+index 6372303cd..c0dfc3587 100644
+--- a/master/buildbot/data/types.py
++++ b/master/buildbot/data/types.py
+@@ -19,10 +19,10 @@ from future.utils import iteritems
+ from future.utils import text_type
+
+ import datetime
++import json
+ import re
+
+ from buildbot import util
+-from buildbot.util import json
+
+
+ class Type(object):
+diff --git a/master/buildbot/db/builds.py b/master/buildbot/db/builds.py
+index a716cb603..cd9dabc5d 100644
+--- a/master/buildbot/db/builds.py
++++ b/master/buildbot/db/builds.py
+@@ -12,6 +12,9 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
++
+ import sqlalchemy as sa
+
+ from twisted.internet import defer
+@@ -20,7 +23,6 @@ from twisted.internet import reactor
+ from buildbot.db import NULL
+ from buildbot.db import base
+ from buildbot.util import epoch2datetime
+-from buildbot.util import json
+
+
+ class BuildsConnectorComponent(base.DBConnectorComponent):
+diff --git a/master/buildbot/db/buildsets.py b/master/buildbot/db/buildsets.py
+index 4bac6da5c..1288b57f4 100644
+--- a/master/buildbot/db/buildsets.py
++++ b/master/buildbot/db/buildsets.py
+@@ -18,6 +18,8 @@ Support for buildsets in the database
+ from future.utils import integer_types
+ from future.utils import iteritems
+
++import json
++
+ import sqlalchemy as sa
+
+ from twisted.internet import defer
+@@ -27,7 +29,6 @@ from buildbot.db import NULL
+ from buildbot.db import base
+ from buildbot.util import datetime2epoch
+ from buildbot.util import epoch2datetime
+-from buildbot.util import json
+
+
+ class BsDict(dict):
+diff --git a/master/buildbot/db/changes.py b/master/buildbot/db/changes.py
+index caa643fa7..004995753 100644
+--- a/master/buildbot/db/changes.py
++++ b/master/buildbot/db/changes.py
+@@ -19,6 +19,8 @@ Support for changes in the database
+ from future.utils import iteritems
+ from future.utils import itervalues
+
++import json
++
+ import sqlalchemy as sa
+
+ from twisted.internet import defer
+@@ -28,7 +30,6 @@ from twisted.python import log
+ from buildbot.db import base
+ from buildbot.util import datetime2epoch
+ from buildbot.util import epoch2datetime
+-from buildbot.util import json
+
+
+ class ChDict(dict):
+diff --git a/master/buildbot/db/state.py b/master/buildbot/db/state.py
+index 6ba143cfa..e572eab62 100644
+--- a/master/buildbot/db/state.py
++++ b/master/buildbot/db/state.py
+@@ -12,11 +12,13 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
++
+ import sqlalchemy as sa
+ import sqlalchemy.exc
+
+ from buildbot.db import base
+-from buildbot.util import json
+
+
+ class _IdNotFoundError(Exception):
+diff --git a/master/buildbot/db/steps.py b/master/buildbot/db/steps.py
+index f5e1c82bd..d0fbb52e3 100644
+--- a/master/buildbot/db/steps.py
++++ b/master/buildbot/db/steps.py
+@@ -12,6 +12,9 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
++
+ import sqlalchemy as sa
+
+ from twisted.internet import defer
+@@ -19,7 +22,6 @@ from twisted.internet import reactor
+
+ from buildbot.db import base
+ from buildbot.util import epoch2datetime
+-from buildbot.util import json
+
+
+ class StepsConnectorComponent(base.DBConnectorComponent):
+diff --git a/master/buildbot/db/types/json.py b/master/buildbot/db/types/json.py
+index ee105269d..932218135 100644
+--- a/master/buildbot/db/types/json.py
++++ b/master/buildbot/db/types/json.py
+@@ -12,11 +12,14 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++from __future__ import absolute_import
++
++import json
++
+ from sqlalchemy.types import Text
+ from sqlalchemy.types import TypeDecorator
+
+-from buildbot.util import json
+-
+
+ class JsonObject(TypeDecorator):
+
+diff --git a/master/buildbot/newsfragments/json.removal b/master/buildbot/newsfragments/json.removal
+new file mode 100644
+index 000000000..9fc57b91e
+--- /dev/null
++++ b/master/buildbot/newsfragments/json.removal
+@@ -0,0 +1 @@
++:py:data:`buildbot.util.json` has been deprecated in favor of the standard library :py:mod:`json`.
+diff --git a/master/buildbot/process/properties.py b/master/buildbot/process/properties.py
+index 82954a1cb..9b336c2d9 100644
+--- a/master/buildbot/process/properties.py
++++ b/master/buildbot/process/properties.py
+@@ -16,6 +16,7 @@ from future.builtins import range
+ from future.utils import iteritems
+
+ import collections
++import json
+ import re
+ import weakref
+
+@@ -28,7 +29,6 @@ from buildbot import util
+ from buildbot.interfaces import IProperties
+ from buildbot.interfaces import IRenderable
+ from buildbot.util import flatten
+-from buildbot.util import json
+ from buildbot.worker_transition import reportDeprecatedWorkerNameUsage
+
+
+diff --git a/master/buildbot/schedulers/trysched.py b/master/buildbot/schedulers/trysched.py
+index 3b700d871..60d17c269 100644
+--- a/master/buildbot/schedulers/trysched.py
++++ b/master/buildbot/schedulers/trysched.py
+@@ -12,8 +12,10 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ from future.utils import iteritems
+
++import json
+ import os
+
+ from twisted.internet import defer
+@@ -25,7 +27,6 @@ from buildbot import pbutil
+ from buildbot.process.properties import Properties
+ from buildbot.schedulers import base
+ from buildbot.util import ascii2unicode
+-from buildbot.util import json
+ from buildbot.util import netstrings
+ from buildbot.util.maildir import MaildirService
+
+diff --git a/master/buildbot/scripts/dataspec.py b/master/buildbot/scripts/dataspec.py
+index 047aa297e..a3017db82 100644
+--- a/master/buildbot/scripts/dataspec.py
++++ b/master/buildbot/scripts/dataspec.py
+@@ -12,6 +12,8 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import os
+ import sys
+
+@@ -20,7 +22,6 @@ from twisted.internet import defer
+ from buildbot.data import connector
+ from buildbot.test.fake import fakemaster
+ from buildbot.util import in_reactor
+-from buildbot.util import json
+
+
+ @in_reactor
+diff --git a/master/buildbot/scripts/processwwwindex.py b/master/buildbot/scripts/processwwwindex.py
+index 57db423c9..e7180f623 100644
+--- a/master/buildbot/scripts/processwwwindex.py
++++ b/master/buildbot/scripts/processwwwindex.py
+@@ -15,6 +15,7 @@
+ from __future__ import division
+ from __future__ import print_function
+
++import json
+ import os
+
+ import jinja2
+@@ -23,7 +24,6 @@ from twisted.internet import defer
+
+ from buildbot.test.fake import fakemaster
+ from buildbot.util import in_reactor
+-from buildbot.util import json
+ from buildbot.www import auth
+ from buildbot.www.config import IndexResource
+ from buildbot.www.service import WWWService
+diff --git a/master/buildbot/steps/transfer.py b/master/buildbot/steps/transfer.py
+index a3d423848..5dfb3b6a9 100644
+--- a/master/buildbot/steps/transfer.py
++++ b/master/buildbot/steps/transfer.py
+@@ -12,6 +12,8 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import os
+ import stat
+
+@@ -26,7 +28,6 @@ from buildbot.process.buildstep import FAILURE
+ from buildbot.process.buildstep import SKIPPED
+ from buildbot.process.buildstep import SUCCESS
+ from buildbot.process.buildstep import BuildStep
+-from buildbot.util import json
+ from buildbot.util.eventual import eventually
+ from buildbot.worker_transition import WorkerAPICompatMixin
+ from buildbot.worker_transition import reportDeprecatedWorkerNameUsage
+diff --git a/master/buildbot/test/fake/fakedata.py b/master/buildbot/test/fake/fakedata.py
+index b5a2ef58c..92bfd5c7b 100644
+--- a/master/buildbot/test/fake/fakedata.py
++++ b/master/buildbot/test/fake/fakedata.py
+@@ -16,6 +16,8 @@ from future.utils import iteritems
+ from future.utils import itervalues
+ from future.utils import text_type
+
++import json
++
+ from twisted.internet import defer
+ from twisted.internet import reactor
+ from twisted.python import failure
+@@ -23,7 +25,6 @@ from twisted.python import failure
+ from buildbot.data import connector
+ from buildbot.db.buildrequests import AlreadyClaimedError
+ from buildbot.test.util import validation
+-from buildbot.util import json
+ from buildbot.util import service
+
+
+diff --git a/master/buildbot/test/fake/fakedb.py b/master/buildbot/test/fake/fakedb.py
+index 740e6b1e3..47340ef63 100644
+--- a/master/buildbot/test/fake/fakedb.py
++++ b/master/buildbot/test/fake/fakedb.py
+@@ -25,6 +25,7 @@ from future.utils import text_type
+ import base64
+ import copy
+ import hashlib
++import json
+
+ from twisted.internet import defer
+ from twisted.internet import reactor
+@@ -35,7 +36,6 @@ from buildbot.db import changesources
+ from buildbot.db import schedulers
+ from buildbot.test.util import validation
+ from buildbot.util import datetime2epoch
+-from buildbot.util import json
+ from buildbot.util import service
+
+
+diff --git a/master/buildbot/test/integration/test_www.py b/master/buildbot/test/integration/test_www.py
+index de8805f35..fcfc6b549 100644
+--- a/master/buildbot/test/integration/test_www.py
++++ b/master/buildbot/test/integration/test_www.py
+@@ -12,6 +12,9 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
++
+ import mock
+
+ from twisted.internet import defer
+@@ -27,7 +30,6 @@ from buildbot.test.fake import fakedb
+ from buildbot.test.fake import fakemaster
+ from buildbot.test.util import db
+ from buildbot.test.util import www
+-from buildbot.util import json
+ from buildbot.www import service as wwwservice
+ from buildbot.www import auth
+ from buildbot.www import authz
+diff --git a/master/buildbot/test/unit/test_changes_gerritchangesource.py b/master/buildbot/test/unit/test_changes_gerritchangesource.py
+index fe00fcf58..b5c939065 100644
+--- a/master/buildbot/test/unit/test_changes_gerritchangesource.py
++++ b/master/buildbot/test/unit/test_changes_gerritchangesource.py
+@@ -15,6 +15,7 @@
+ from future.utils import iteritems
+
+ import datetime
++import json
+ import types
+
+ from twisted.internet import defer
+@@ -25,7 +26,6 @@ from buildbot.test.fake import httpclientservice as fakehttpclientservice
+ from buildbot.test.fake import fakedb
+ from buildbot.test.fake.change import Change
+ from buildbot.test.util import changesource
+-from buildbot.util import json
+
+
+ class TestGerritHelpers(unittest.TestCase):
+diff --git a/master/buildbot/test/unit/test_clients_tryclient.py b/master/buildbot/test/unit/test_clients_tryclient.py
+index 765d6444f..13adbf8cd 100644
+--- a/master/buildbot/test/unit/test_clients_tryclient.py
++++ b/master/buildbot/test/unit/test_clients_tryclient.py
+@@ -12,10 +12,12 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
++
+ from twisted.trial import unittest
+
+ from buildbot.clients import tryclient
+-from buildbot.util import json
+
+
+ class createJobfile(unittest.TestCase):
+diff --git a/master/buildbot/test/unit/test_db_buildsets.py b/master/buildbot/test/unit/test_db_buildsets.py
+index 5acea7a54..49c64790a 100644
+--- a/master/buildbot/test/unit/test_db_buildsets.py
++++ b/master/buildbot/test/unit/test_db_buildsets.py
+@@ -12,7 +12,9 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ import datetime
++import json
+
+ import mock
+
+@@ -30,7 +32,6 @@ from buildbot.test.util import validation
+ from buildbot.util import UTC
+ from buildbot.util import datetime2epoch
+ from buildbot.util import epoch2datetime
+-from buildbot.util import json
+
+
+ class Tests(interfaces.InterfaceTests):
+diff --git a/master/buildbot/test/unit/test_mq_wamp.py b/master/buildbot/test/unit/test_mq_wamp.py
+index 3ad41ae7d..55a9bf95f 100644
+--- a/master/buildbot/test/unit/test_mq_wamp.py
++++ b/master/buildbot/test/unit/test_mq_wamp.py
+@@ -12,8 +12,10 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ from future.builtins import range
+
++import json
+ import os
+ import textwrap
+
+@@ -26,7 +28,6 @@ from twisted.trial import unittest
+
+ from buildbot.mq import wamp
+ from buildbot.test.fake import fakemaster
+-from buildbot.util import json
+ from buildbot.wamp import connector
+
+
+diff --git a/master/buildbot/test/unit/test_schedulers_forcesched.py b/master/buildbot/test/unit/test_schedulers_forcesched.py
+index 72e19a830..22f3dea31 100644
+--- a/master/buildbot/test/unit/test_schedulers_forcesched.py
++++ b/master/buildbot/test/unit/test_schedulers_forcesched.py
+@@ -16,6 +16,8 @@ from __future__ import division
+ from __future__ import print_function
+ from future.utils import iteritems
+
++import json
++
+ from twisted.internet import defer
+ from twisted.trial import unittest
+
+@@ -36,7 +38,6 @@ from buildbot.schedulers.forcesched import oneCodebase
+ from buildbot.test.util import scheduler
+ from buildbot.test.util.config import ConfigErrorsMixin
+ from buildbot.test.util.warnings import assertProducesWarning
+-from buildbot.util import json
+ from buildbot.worker_transition import DeprecatedWorkerNameWarning
+
+
+diff --git a/master/buildbot/test/unit/test_schedulers_trysched.py b/master/buildbot/test/unit/test_schedulers_trysched.py
+index c5f9f347e..439ce5d2d 100644
+--- a/master/buildbot/test/unit/test_schedulers_trysched.py
++++ b/master/buildbot/test/unit/test_schedulers_trysched.py
+@@ -12,7 +12,9 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ import cStringIO as StringIO
++import json
+ import os
+ import shutil
+ import sys
+@@ -27,7 +29,6 @@ from twisted.trial import unittest
+ from buildbot.schedulers import trysched
+ from buildbot.test.util import dirs
+ from buildbot.test.util import scheduler
+-from buildbot.util import json
+
+
+ class TryBase(unittest.TestCase):
+diff --git a/master/buildbot/test/unit/test_scripts_processwwwindex.py b/master/buildbot/test/unit/test_scripts_processwwwindex.py
+index db01a5239..c265b8ab7 100644
+--- a/master/buildbot/test/unit/test_scripts_processwwwindex.py
++++ b/master/buildbot/test/unit/test_scripts_processwwwindex.py
+@@ -12,12 +12,13 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import tempfile
+
+ from twisted.trial import unittest
+
+ from buildbot.scripts import processwwwindex
+-from buildbot.util import json
+
+
+ class TestUsersClient(unittest.TestCase):
+diff --git a/master/buildbot/test/unit/test_steps_transfer.py b/master/buildbot/test/unit/test_steps_transfer.py
+index ee70af830..c91f0dfac 100644
+--- a/master/buildbot/test/unit/test_steps_transfer.py
++++ b/master/buildbot/test/unit/test_steps_transfer.py
+@@ -12,8 +12,10 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ from future.utils import iteritems
+
++import json
+ import os
+ import shutil
+ import stat
+@@ -38,7 +40,6 @@ from buildbot.test.fake.remotecommand import ExpectRemoteRef
+ from buildbot.test.util import steps
+ from buildbot.test.util.warnings import assertNotProducesWarnings
+ from buildbot.test.util.warnings import assertProducesWarning
+-from buildbot.util import json
+ from buildbot.worker_transition import DeprecatedWorkerAPIWarning
+ from buildbot.worker_transition import DeprecatedWorkerNameWarning
+
+diff --git a/master/buildbot/test/unit/test_www_oauth.py b/master/buildbot/test/unit/test_www_oauth.py
+index 177385cb0..ba7310bf8 100644
+--- a/master/buildbot/test/unit/test_www_oauth.py
++++ b/master/buildbot/test/unit/test_www_oauth.py
+@@ -12,6 +12,8 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import os
+ import webbrowser
+
+@@ -26,7 +28,6 @@ from twisted.web.resource import Resource
+ from twisted.web.server import Site
+
+ from buildbot.test.util import www
+-from buildbot.util import json
+
+ try:
+ import requests
+@@ -277,7 +278,6 @@ class OAuth2AuthGitHubE2E(www.WwwTestMixin, unittest.TestCase):
+ raise unittest.SkipTest(
+ "Need to pass OAUTHCONF path to json file via environ to run this e2e test")
+
+- import json
+ config = json.load(open(os.environ['OAUTHCONF']))[self.authClass]
+ from buildbot.www import oauth2
+ self.auth = self._instantiateAuth(
+diff --git a/master/buildbot/test/unit/test_www_rest.py b/master/buildbot/test/unit/test_www_rest.py
+index c0e1a2680..2b87e4d0d 100644
+--- a/master/buildbot/test/unit/test_www_rest.py
++++ b/master/buildbot/test/unit/test_www_rest.py
+@@ -18,6 +18,7 @@ from future.utils import itervalues
+ from future.utils import string_types
+ from future.utils import text_type
+
++import json
+ import re
+
+ import mock
+@@ -27,7 +28,6 @@ from twisted.trial import unittest
+
+ from buildbot.test.fake import endpoint
+ from buildbot.test.util import www
+-from buildbot.util import json
+ from buildbot.www import authz
+ from buildbot.www import rest
+ from buildbot.www.rest import JSONRPC_CODES
+diff --git a/master/buildbot/test/unit/test_www_sse.py b/master/buildbot/test/unit/test_www_sse.py
+index ba2a1f0a9..3eac07047 100644
+--- a/master/buildbot/test/unit/test_www_sse.py
++++ b/master/buildbot/test/unit/test_www_sse.py
+@@ -13,13 +13,13 @@
+ #
+ # Copyright Buildbot Team Members
+ import datetime
++import json
+
+ from twisted.trial import unittest
+
+ from buildbot.test.unit import test_data_changes
+ from buildbot.test.util import www
+ from buildbot.util import datetime2epoch
+-from buildbot.util import json
+ from buildbot.www import sse
+
+
+diff --git a/master/buildbot/test/unit/test_www_ws.py b/master/buildbot/test/unit/test_www_ws.py
+index a40393556..91051b21d 100644
+--- a/master/buildbot/test/unit/test_www_ws.py
++++ b/master/buildbot/test/unit/test_www_ws.py
+@@ -12,12 +12,14 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
++
+ from mock import Mock
+
+ from twisted.trial import unittest
+
+ from buildbot.test.util import www
+-from buildbot.util import json
+ from buildbot.www import ws
+
+
+diff --git a/master/buildbot/test/util/validation.py b/master/buildbot/test/util/validation.py
+index 13647a63b..292e72bee 100644
+--- a/master/buildbot/test/util/validation.py
++++ b/master/buildbot/test/util/validation.py
+@@ -19,10 +19,10 @@ from future.utils import iteritems
+ from future.utils import text_type
+
+ import datetime
++import json
+ import re
+
+ from buildbot.util import UTC
+-from buildbot.util import json
+
+ # Base class
+
+diff --git a/master/buildbot/test/util/www.py b/master/buildbot/test/util/www.py
+index 5fe38e268..d737327dd 100644
+--- a/master/buildbot/test/util/www.py
++++ b/master/buildbot/test/util/www.py
+@@ -17,6 +17,7 @@ from future.utils import integer_types
+ from future.utils import iteritems
+
+ import cgi
++import json
+ import os
+ import pkg_resources
+ from cStringIO import StringIO
+@@ -28,7 +29,6 @@ from twisted.internet import defer
+ from twisted.web import server
+
+ from buildbot.test.fake import fakemaster
+-from buildbot.util import json
+ from buildbot.www import auth
+ from buildbot.www import authz
+
+diff --git a/master/buildbot/util/__init__.py b/master/buildbot/util/__init__.py
+index ed78bf25f..3a9d55ca5 100644
+--- a/master/buildbot/util/__init__.py
++++ b/master/buildbot/util/__init__.py
+@@ -12,6 +12,7 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ from __future__ import division
+ from __future__ import print_function
+
+@@ -28,9 +29,12 @@ import locale
+ import re
+ import textwrap
+ import time
++import json
+
+ from future.utils import text_type
+ from twisted.python import reflect
++from twisted.python.versions import Version
++from twisted.python.deprecate import deprecatedModuleAttribute
+
+ from zope.interface import implementer
+
+@@ -181,26 +185,14 @@ def ascii2unicode(x):
+ return x
+ return text_type(x, 'ascii')
+
++_hush_pyflakes = [json]
+
+-# place a working json module at 'buildbot.util.json'. Code is adapted from
+-# Paul Wise <pabs@debian.org>:
+-# http://lists.debian.org/debian-python/2010/02/msg00016.html
+-# json doesn't exist as a standard module until python2.6
+-# However python2.6's json module is much slower than simplejson, so we prefer
+-# to use simplejson if available.
+-try:
+- import simplejson as json
+- assert json
+-except ImportError:
+- import json # python 2.6 or 2.7
+-try:
+- _tmp = json.loads
+-except AttributeError:
+- import warnings
+- import sys
+- warnings.warn("Use simplejson, not the old json module.")
+- sys.modules.pop('json') # get rid of the bad json module
+- import simplejson as json
++deprecatedModuleAttribute(
++ Version("buildbot", 0, 9, 4),
++ message="Use json from the standard library instead.",
++ moduleName="buildbot.util",
++ name="json",
++)
+
+
+ def toJson(obj):
+@@ -432,7 +424,7 @@ def dictionary_merge(a, b):
+
+
+ __all__ = [
+- 'naturalSort', 'now', 'formatInterval', 'ComparableMixin', 'json',
++ 'naturalSort', 'now', 'formatInterval', 'ComparableMixin',
+ 'safeTranslate', 'none_or_str',
+ 'NotABranch', 'deferredLocked', 'UTC',
+ 'diffSets', 'makeList', 'in_reactor', 'string2boolean',
+diff --git a/master/buildbot/worker/docker.py b/master/buildbot/worker/docker.py
+index f39132737..a91424f1a 100644
+--- a/master/buildbot/worker/docker.py
++++ b/master/buildbot/worker/docker.py
+@@ -19,6 +19,7 @@ from __future__ import division
+ from __future__ import print_function
+
+ import hashlib
++import json
+ import socket
+ from io import BytesIO
+
+@@ -28,7 +29,6 @@ from twisted.python import log
+
+ from buildbot import config
+ from buildbot.interfaces import LatentWorkerFailedToSubstantiate
+-from buildbot.util import json
+ from buildbot.worker import AbstractLatentWorker
+
+ try:
+diff --git a/master/buildbot/www/config.py b/master/buildbot/www/config.py
+index e3f6f6214..4030e8e73 100644
+--- a/master/buildbot/www/config.py
++++ b/master/buildbot/www/config.py
+@@ -12,6 +12,8 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import os
+ import posixpath
+
+@@ -22,7 +24,6 @@ from twisted.python import log
+ from twisted.web.error import Error
+
+ from buildbot.interfaces import IConfigured
+-from buildbot.util import json
+ from buildbot.www import resource
+
+
+diff --git a/master/buildbot/www/hooks/base.py b/master/buildbot/www/hooks/base.py
+index 149c3f925..9255be44a 100644
+--- a/master/buildbot/www/hooks/base.py
++++ b/master/buildbot/www/hooks/base.py
+@@ -17,7 +17,8 @@
+ # and inspired from code from the Chromium project
+ # otherwise, Andrew Melo <andrew.melo@gmail.com> wrote the rest
+ # but "the rest" is pretty minimal
+-from buildbot.util import json
++
++import json
+
+
+ def getChanges(request, options=None):
+diff --git a/master/buildbot/www/hooks/gitlab.py b/master/buildbot/www/hooks/gitlab.py
+index c7663a63a..ab1b65690 100644
+--- a/master/buildbot/www/hooks/gitlab.py
++++ b/master/buildbot/www/hooks/gitlab.py
+@@ -12,14 +12,14 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
++import json
+ import re
+
+ from dateutil.parser import parse as dateparse
+
+ from twisted.python import log
+
+-from buildbot.util import json
+-
+
+ def _process_change(payload, user, repo, repo_url, project, codebase=None):
+ """
+diff --git a/master/buildbot/www/hooks/googlecode.py b/master/buildbot/www/hooks/googlecode.py
+index b8709bb4d..2a370e4f9 100644
+--- a/master/buildbot/www/hooks/googlecode.py
++++ b/master/buildbot/www/hooks/googlecode.py
+@@ -14,12 +14,12 @@
+ # Copyright 2011, Louis Opter <kalessin@kalessin.fr>
+ #
+ # Quite inspired from the github hook.
++
+ import hmac
++import json
+
+ from twisted.python import log
+
+-from buildbot.util import json
+-
+
+ class GoogleCodeAuthFailed(Exception):
+ pass
+diff --git a/master/buildbot/www/oauth2.py b/master/buildbot/www/oauth2.py
+index 1d1ea4efd..baa9dab25 100644
+--- a/master/buildbot/www/oauth2.py
++++ b/master/buildbot/www/oauth2.py
+@@ -17,6 +17,7 @@ from future.moves.urllib.parse import urlencode
+ from future.utils import iteritems
+ from future.utils import string_types
+
++import json
+ from posixpath import join
+
+ import requests
+@@ -24,7 +25,6 @@ import requests
+ from twisted.internet import defer
+ from twisted.internet import threads
+
+-from buildbot.util import json
+ from buildbot.www import auth
+ from buildbot.www import resource
+
+diff --git a/master/buildbot/www/rest.py b/master/buildbot/www/rest.py
+index 3147a33b7..30f79d6ea 100644
+--- a/master/buildbot/www/rest.py
++++ b/master/buildbot/www/rest.py
+@@ -19,6 +19,7 @@ from future.utils import text_type
+ import cgi
+ import datetime
+ import fnmatch
++import json
+ import re
+ from contextlib import contextmanager
+
+@@ -28,7 +29,6 @@ from twisted.web.error import Error
+
+ from buildbot.data import exceptions
+ from buildbot.data import resultspec
+-from buildbot.util import json
+ from buildbot.util import toJson
+ from buildbot.www import resource
+ from buildbot.www.authz import Forbidden
+diff --git a/master/buildbot/www/sse.py b/master/buildbot/www/sse.py
+index df076195e..741328844 100644
+--- a/master/buildbot/www/sse.py
++++ b/master/buildbot/www/sse.py
+@@ -12,8 +12,10 @@
+ # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Copyright Buildbot Team Members
++
+ from future.utils import itervalues
+
++import json
+ import uuid
+
+ from twisted.python import log
+@@ -21,7 +23,6 @@ from twisted.web import resource
+ from twisted.web import server
+
+ from buildbot.data.exceptions import InvalidPathError
+-from buildbot.util import json
+ from buildbot.util import toJson
+
+
+diff --git a/master/buildbot/www/ws.py b/master/buildbot/www/ws.py
+index ed7bcad8f..1e48ec553 100644
+--- a/master/buildbot/www/ws.py
++++ b/master/buildbot/www/ws.py
+@@ -15,13 +15,14 @@
+ from future.utils import itervalues
+ from future.utils import string_types
+
++import json
++
+ from autobahn.twisted.resource import WebSocketResource
+ from autobahn.twisted.websocket import WebSocketServerFactory
+ from autobahn.twisted.websocket import WebSocketServerProtocol
+ from twisted.internet import defer
+ from twisted.python import log
+
+-from buildbot.util import json
+ from buildbot.util import toJson
+
+
+diff --git a/master/docs/developer/utils.rst b/master/docs/developer/utils.rst
+index e1e64503a..2470330bd 100644
+--- a/master/docs/developer/utils.rst
++++ b/master/docs/developer/utils.rst
+@@ -506,18 +506,6 @@ The ``@poll.method`` decorator makes this behavior easy and reliable.
+ Force a call to the decorated method now.
+ If the decorated method is currently running, another call will begin as soon as it completes.
+
+-:py:mod:`buildbot.util.json`
+-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-
+-.. py:module:: buildbot.util.json
+-
+-This package is just an import of the best available JSON module.
+-Use it instead of a more complex conditional import of :mod:`simplejson` or :mod:`json`:
+-
+-.. code-block:: python
+-
+- from buildbot.util import json
+-
+ :py:mod:`buildbot.util.maildir`
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--
+2.11.0
+