# HG changeset patch # User Gregory Szorc # Date 1645466191 25200 # Node ID 82f1c46cce5c3dc7208c7035f88c132b6b336fe0 # Parent 431084a68c4aca2af366d9250fd91863a103b347 check-code: allow importing Python 3 modules Now that we no longer support Python 2, we should be able to import and use the Python 3 only modules in our code. So remove a lint banning this. Differential Revision: https://phab.mercurial-scm.org/D12284 diff -r 431084a68c4a -r 82f1c46cce5c contrib/check-code.py --- a/contrib/check-code.py Wed Mar 02 08:29:52 2022 -0700 +++ b/contrib/check-code.py Mon Feb 21 10:56:31 2022 -0700 @@ -430,24 +430,6 @@ "module-level @cachefunc is risky, please avoid", ), ( - r'^import Queue', - "don't use Queue, use pycompat.queue.Queue + " - "pycompat.queue.Empty", - ), - ( - 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.urlreq"), - (r'^import xmlrpclib', "don't use xmlrpclib, use util.xmlrpclib"), - (r'^import httplib', "don't use httplib, use util.httplib"), - (r'^import BaseHTTPServer', "use util.httpserver instead"), - ( r'^(from|import) mercurial\.(cext|pure|cffi)', "use mercurial.policy.importmod instead", ),