[PATCH 7 of 8 py3] check-code: recommend util.urlreq when importing urlparse

Gregory Szorc gregory.szorc at gmail.com
Wed Mar 22 01:56:44 EDT 2017


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1490161577 25200
#      Tue Mar 21 22:46:17 2017 -0700
# Node ID ec6ce29cad3eb47053b3f3296fb81bc0532ab9d9
# Parent  13b41c9e0b911c3dc1dfe8ceb319fb28391d31ca
check-code: recommend util.urlreq when importing urlparse

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -330,7 +330,7 @@ pypats = [
     (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"),
     (r'^import urllib', "don't use urllib, use util.urlreq/util.urlerr"),
     (r'^import SocketServer', "don't use SockerServer, use util.socketserver"),
-    (r'^import urlparse', "don't use urlparse, use util.urlparse"),
+    (r'^import urlparse', "don't use urlparse, use util.urlreq"),
     (r'^import xmlrpclib', "don't use xmlrpclib, use util.xmlrpclib"),
     (r'^import cPickle', "don't use cPickle, use util.pickle"),
     (r'^import pickle', "don't use pickle, use util.pickle"),


More information about the Mercurial-devel mailing list