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

login
register
mail settings
Submitter Gregory Szorc
Date March 22, 2017, 5:56 a.m.
Message ID <ec6ce29cad3eb47053b3.1490162204@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/19557/
State Accepted
Headers show

Comments

Gregory Szorc - March 22, 2017, 5:56 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@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

Patch

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"),