mozautomation: move bugzilla xmlrpc transports code from mozreview (bug 1363509); r?glob draft
authorGregory Szorc <gps@mozilla.com>
Tue, 09 May 2017 15:41:35 -0700
changeset 11317 45418301beea77f90e308bfdd2b05217cbd46b40
parent 11316 aa77c441ae781f845d2b17d3ee4888c94e1e276c
child 11318 fa8cfd940e3a46920af40828a11abf57048205d8
push id1719
push userbmo:gps@mozilla.com
push dateSat, 24 Jun 2017 00:30:23 +0000
reviewersglob
bugs1363509
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
pylib/mozautomation/mozautomation/bugzilla_transports.py
pylib/mozreview/mozreview/bugzilla/client.py
pylib/mozreview/mozreview/bugzilla/transports.py
testing/vcttesting/bugzilla/__init__.py
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})