[PATCH 1 of 4] import-checker: allow symbol imports from hgweb.common and .request

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Nov 18 23:51:25 CST 2015



On 11/18/2015 06:42 PM, Gregory Szorc wrote:
> On Wed, Nov 18, 2015 at 1:51 PM, Pierre-Yves David
> <pierre-yves.david at ens-lyon.org <mailto:pierre-yves.david at ens-lyon.org>>
> wrote:
>
>
>
>     On 11/18/2015 07:44 AM, Yuya Nishihara wrote:
>
>         # HG changeset patch
>         # User Yuya Nishihara <yuya at tcha.org <mailto:yuya at tcha.org>>
>         # Date 1446353721 -32400
>         #      Sun Nov 01 13:55:21 2015 +0900
>         # Node ID d66415991a1f94da2f7f1e24793746a48deb3df6
>         # Parent  a21e63ed613bc956c88c2832fce1968550ccf834
>         import-checker: allow symbol imports from hgweb.common and .request
>
>         This seems the convention of hgweb.
>
>
>     I'm unclear about what this changeset achieve and why it is
>     necessary. Can you elaborate?
>
>
> absolute_import engages a strict mode about what imports are allowed.
> One of the rules is we only allow importing of symbols that are
> themselves modules (as opposed to functions, variables, etc). We're
> supposed to import modules then assign their symbols to locals post import.
>
> The list modified by this patch stops applying this restriction to hgweb
> because it is easier to do that than rewrite half of hgweb to not import
> symbols directly.

Okay pushed to the clowncopter.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list