[PATCH 7 of 7] check-code: reject import cStringIO

Augie Fackler raf at durin42.com
Wed Apr 6 21:20:57 EDT 2016


On Wed, Apr 06, 2016 at 04:57:44PM -0500, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1459974914 0
> #      Wed Apr 06 20:35:14 2016 +0000
> # Node ID 670b4e0794aebc10df2298a7bea28a9135589beb
> # Parent  5d3336fefe3a4df0f907980361be7c5b3947eab3
> check-code: reject import cStringIO

these are queued, thanks

>
> please use the util.stringio alias instead
>
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -316,6 +316,7 @@
>      (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"),
>      (r'\butil\.Abort\b', "directly use error.Abort"),
>      (r'^import Queue', "don't use Queue, use util.queue + util.empty"),
> +    (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"),
>    ],
>    # warnings
>    [
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list