[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] swig-py: restrict *-import to svn_* names

From: Роман Донченко <DXDragon_at_yandex.ru>
Date: Sun, 18 Mar 2012 15:36:24 +0400

Daniel Shahaf <danielsh_at_elego.de> писал в своём письме Sun, 18 Mar 2012
04:07:45 +0400:

> [[[
> Index: subversion/bindings/swig/python/svn/fs.py
> ===================================================================
> --- subversion/bindings/swig/python/svn/fs.py (revision 1301511)
> +++ subversion/bindings/swig/python/svn/fs.py (working copy)
> @@ -27,6 +27,7 @@ from libsvn.fs import *
> from svn.core import _unprefix_names, Pool
> _unprefix_names(locals(), 'svn_fs_')
> _unprefix_names(locals(), 'SVN_FS_')
> +__all__ = filter(lambda x: x.lower().startswith('svn_'),
> locals().keys())
> del _unprefix_names
> ]]]
>
> Before:
> % python -c 'from svn.fs import *;
> print [x for x in locals().keys() if "begin_txn2" in x]'
> ['svn_fs_begin_txn2', 'begin_txn2']
>
> After:
> % python -c 'from svn.fs import *;
> print [x for x in locals().keys() if "begin_txn2" in x]'
> ['svn_fs_begin_txn2']
>

This would nullify the purpose of _unprefix_names, would it not?

Roman.
Received on 2012-03-18 12:37:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.