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

Re: svn commit: r1303375 - in /subversion/trunk/subversion/bindings/swig/python: svn/core.py tests/pool.py

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 21 Mar 2012 11:42:48 -0400

This dance you're doing is exactly why I disrecommend using *-imports. It
hands power/infection of your local namespace to a module not under your
control.

Cheers,
-g
On Mar 21, 2012 8:55 AM, <danielsh_at_apache.org> wrote:

> Author: danielsh
> Date: Wed Mar 21 12:54:49 2012
> New Revision: 1303375
>
> URL: http://svn.apache.org/viewvc?rev=1303375&view=rev
> Log:
> Unbreak the build, after r1303369.
>
> * subversion/bindings/swig/python/svn/core.py
> (__all__): Export some more symbols to star imports.
>
> * subversion/bindings/swig/python/tests/pool.py
> (PoolTestCase.test_compatibility_layer):
> Use fully-qualified names for apr_* symbols.
>
> Modified:
> subversion/trunk/subversion/bindings/swig/python/svn/core.py
> subversion/trunk/subversion/bindings/swig/python/tests/pool.py
>
> Modified: subversion/trunk/subversion/bindings/swig/python/svn/core.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/python/svn/core.py?rev=1303375&r1=1303374&r2=1303375&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/bindings/swig/python/svn/core.py (original)
> +++ subversion/trunk/subversion/bindings/swig/python/svn/core.py Wed Mar
> 21 12:54:49 2012
> @@ -27,7 +27,44 @@ from libsvn.core import *
> import libsvn.core as _libsvncore
> import atexit as _atexit
> import sys
> -__all__ = []
> +__all__ = [
> + # Symbols that 'import *' used to pull (in 1.7)
> + 'Pool',
> + 'SVNSYNC_PROP_CURRENTLY_COPYING',
> + 'SVNSYNC_PROP_FROM_URL',
> + 'SVNSYNC_PROP_FROM_UUID',
> + 'SVNSYNC_PROP_LAST_MERGED_REV',
> + 'SVNSYNC_PROP_LOCK',
> + 'SVNSYNC_PROP_PREFIX',
> + 'SubversionException',
> + # 'apr_array_header_t',
> + # 'apr_file_open_stderr',
> + # 'apr_file_open_stdout',
> + # 'apr_file_t',
> + # 'apr_hash_t',
> + # 'apr_initialize',
> + # 'apr_pool_clear',
> + # 'apr_pool_destroy',
> + # 'apr_pool_t',
> + # 'apr_terminate',
> + # 'apr_time_ansi_put',
> + # 'run_app',
> +
> + # Symbols defined explicitly below.
> + 'SVN_IGNORED_REVNUM',
> + 'SVN_INVALID_REVNUM',
> + 'svn_path_compare_paths',
> + 'svn_mergeinfo_merge',
> + 'svn_mergeinfo_sort',
> + 'svn_rangelist_merge',
> + 'svn_rangelist_reverse',
> + # 'Stream',
> + # 'apr_initialize',
> + # 'apr_terminate',
> + 'svn_pool_create',
> + 'svn_pool_destroy',
> + 'svn_pool_clear',
> +]
>
> class SubversionException(Exception):
>
>
> Modified: subversion/trunk/subversion/bindings/swig/python/tests/pool.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/python/tests/pool.py?rev=1303375&r1=1303374&r2=1303375&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/bindings/swig/python/tests/pool.py
> (original)
> +++ subversion/trunk/subversion/bindings/swig/python/tests/pool.py Wed Mar
> 21 12:54:49 2012
> @@ -195,10 +195,10 @@ class PoolTestCase(unittest.TestCase):
> self.assertNone(anonymous_pool_ref())
>
> # Try to cause a segfault using apr_terminate
> - apr_terminate()
> - apr_initialize()
> - apr_terminate()
> - apr_terminate()
> + svn.core.apr_terminate()
> + svn.core.apr_initialize()
> + svn.core.apr_terminate()
> + svn.core.apr_terminate()
>
> # Destroy the application pool
> svn_pool_destroy(libsvn.core.application_pool)
>
>
>
Received on 2012-03-21 16:43:23 CET

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