Checkout
troycurtisjr
committed
on 31 Dec 17
On branch swig-py3: Create and use a wrapper function to efficiently retrieve
lists from dict object on Python 2 and 3.

Wrapping dict metho… Show more
On branch swig-py3: Create and use a wrapper function to efficiently retrieve

lists from dict object on Python 2 and 3.

Wrapping dict methods such as keys() and values() in list() works to create a

independent list, but on Python 2 two distinct lists are created which is

inefficient.

* subversion/bindings/swig/python/svn/core.py

 Create a new utility function, _as_list(), and remove now unnecessary

 _bi_list alias.

 (svn.core._unprefix_names, svn.core.__all__): Use new _as_list() function in

  place of list() on dict output.

* subversion/bindings/swig/python/svn/client.py,

 subversion/bindings/swig/python/svn/delta.py,

 subversion/bindings/swig/python/svn/diff.py,

 subversion/bindings/swig/python/svn/fs.py,

 subversion/bindings/swig/python/svn/ra.py,

 subversion/bindings/swig/python/svn/repos.py,

 subversion/bindings/swig/python/svn/wc.py,

 subversion/bindings/swig/python/tests/mergeinfo.py,

 subversion/bindings/swig/python/tests/ra.py,

 subversion/bindings/swig/python/tests/repository.py,

 subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py,

 subversion/bindings/swig/python/tests/wc.py

 (svn.client.__all__,

  svn.delta.__all__,

  svn.diff.__all__,

  svn.fs.__all__,

  svn.fs.entries,

  svn.ra.__all__,

  svn.repos.__all__,

  svn.wc.__all__,

  SubversionMergeinfoTestCase.test_mergeinfo_leakage__incorrect_range_t_refcounts,

  SubversionRepositoryAccessTestCase.test_delta_driver_commit,

  SubversionRepositoryAccessTestCase.test_get_log2,

  SubversionChangeset.get_changes,

  SubversionChangeset.get_properties,

  SubversionRepositoryTestCase.test_get_logs,

  SubversionWorkingCopyTestCase.test_entries_read,

  SubversionWorkingCopyTestCase.test_diff_editor4):

 Use new _as_list() function in place of list() on dict output.

Found By: danielsh, brane

   

Show less