mozautomation: move bugzilla xmlrpc transports code from mozreview (
bug 1363509); r?glob
vcttesting.bugzilla needs this code. Since it isn't unique to MozReview
and we don't want to create the dependency mess to import the mozreview
Python package in minimal virtualenvs, let's just move the code to
somewhere that's always available.
The mozreview package already imports from mozautomation, so this
shouldn't need any ops changes.
MozReview-Commit-ID: DKHMNfHoicu
rename from pylib/mozreview/mozreview/bugzilla/transports.py
rename to pylib/mozautomation/mozautomation/bugzilla_transports.py
--- a/pylib/mozreview/mozreview/bugzilla/client.py
+++ b/pylib/mozreview/mozreview/bugzilla/client.py
@@ -7,19 +7,19 @@ import posixpath
import xmlrpclib
from urlparse import urlparse, urlunparse
from django.contrib.auth.models import User
from djblets.siteconfig.models import SiteConfiguration
from djblets.util.decorators import simple_decorator
+from mozautomation.bugzilla_transports import bugzilla_transport
from mozreview.bugzilla.errors import BugzillaError, BugzillaUrlError
from mozreview.bugzilla.models import get_or_create_bugzilla_users
-from mozreview.bugzilla.transports import bugzilla_transport
from mozreview.rb_utils import (
get_diff_url,
get_diff_url_from_rr_url,
get_obj_url,
)
from mozautomation.commitparser import (
replace_reviewers,
--- a/testing/vcttesting/bugzilla/__init__.py
+++ b/testing/vcttesting/bugzilla/__init__.py
@@ -4,17 +4,17 @@
import base64
import bugsy
import mechanize
import xmlrpclib
import yaml
-from mozreview.bugzilla.transports import bugzilla_transport
+from mozautomation.bugzilla_transports import bugzilla_transport
def create_xmlrpc_proxy(url, username, password):
"""Obtain an XMLRPC proxy to the Bugzilla service."""
transport = bugzilla_transport(url)
proxy = xmlrpclib.ServerProxy(url, transport)
proxy.User.login({'login': username, 'password': password})