Yasuhito Futatsuki <futatuki@yf.bsdclub.org> (futatuki)


Patch
r1868675, r1868673, r1868575, r1868290, r1868285, r1867779, r1867740, r1867729, r1867679, r1867653, r1867362, r1867214, r1863069, r1862755, r1862754, r1854007, r1854006, r1853738, r1853592, r1852967, r1851145

r1868675 | futatuki | 2019-10-21 02:24:51 +0000 (Mon, 21 Oct 2019)

Remove lightweight branch because the issue is resolved.

The issue on linking swig Python bindings on macOS is resolved in r1868674,  
on branch swig-py3.


r1868673 | futatuki | 2019-10-21 01:38:58 +0000 (Mon, 21 Oct 2019)

Create a lightweight branch to resolve swig-py dynamic link issue on macOS

* BRANCH-README: Replace contents for this branch.


r1868575 | futatuki | 2019-10-18 07:44:41 +0000 (Fri, 18 Oct 2019)

Fix false positive on test with Python 3 

* subversion/tests/cmdline/svnadmin_tests.py
  (dump_no_canonicalize_svndate): Make sure expected line to be bytes object.

* subversion/tests/cmdline/tree_conflict_tests.py
  (local_missing_dir_endless_loop): Use text mode I/O operations.

Tested by: jcorvel
Approved by: danielsh


r1868290 | futatuki | 2019-10-11 12:27:26 +0000 (Fri, 11 Oct 2019)

On branch swig-py3: Bring C4115 back to warning status to fix compilation
issue with Python 3, derived from including Python.h, in the generated
swig python code and our support code.

* build/generator/templates/vcnet_vcproj.ezt: Remove compile option to
  treat C4115 as an error from "AdditionalOptions".
* build/generator/templates/vcnet_vcxproj.ezt: Remove C4115 from list of 
  warnings to treat as an error.

Tested by: jcorvel


r1868285 | futatuki | 2019-10-11 09:36:56 +0000 (Fri, 11 Oct 2019)

On branch swig-py3: follow-up to 1867779: Use wrapper object to clean up
for stdout pipe of sub process 

* subversion/bindings/swig/python/svn/fs.py:
 (_PopenStdoutWrapper): New class
 (FileDiff.procs): Removed
 (FileDiff.get_pipe):
 - Don't hold subprocess.Popen object.
 - Return _PopenStdoutWrappper object instead of subprocess.Popen.stdout.
 (FileDiff.__del__):
 Remove clean up code for subproces.Popen object created in FileDiff.get_pipe. 


r1867779 | futatuki | 2019-09-30 15:04:44 +0000 (Mon, 30 Sep 2019)

On branch swig-py3: follow-up to 1867740: Fix issues in new clean up code

* subversion/bindings/swig/python/svn/fs.py (FileDiff.__del__):
 - Fix typo in exception class name.
 - Terminate subprocess only if its stdout is already closed.  
 - Terminate subprocess before remove temporary files.

 Patch by: Jun Omae <jun66j5 at gmail.com>
           me


r1867740 | futatuki | 2019-09-30 04:12:48 +0000 (Mon, 30 Sep 2019)

On branch swig-py3: Fix resource warnings on Python 3

* subversion/bindings/swig/python/svn/fs.py
  (FileDiff.procs): New list variable to hold process objects
  (FileDiff.get_pipe): Hold process object to self.procs.
  (FileDiff.__del__): Try to kill processes if they are alive before delete.
* subversion/bindings/swig/python/tests/fs.py
  (SubversionFSTestCase.test_diff_repos_paths_internal,
  SubversionFSTestCase.test_diff_repos_paths_external): explicitly close pipe.

Tested by: jcorvel
  (ResourceWarning in FileDiff object was caused somewhat different
  between Linux/Unix and Windows. jcovel helped me to reproduce the problem
  on Windows platform)


r1867729 | futatuki | 2019-09-29 15:52:36 +0000 (Sun, 29 Sep 2019)

On branch swig-py3: A follow-up to 1867679: fix regression on r1867679

* subversion/bindings/swig/python/tests/utils.py (file_uri_for_path):
  Fix conditon for `path' argment.

Reported by: jcorvel


r1867679 | futatuki | 2019-09-28 15:27:20 +0000 (Sat, 28 Sep 2019)

On branch swig-py3: A follow-up to 1867653:  Keep simple code in conditional
block

* subversion/bindings/swig/python/tests/utils.py (file_uri_for_path):
  Factor out call of pathname2url() into out of conditional block.

Patched by: brane


r1867653 | futatuki | 2019-09-28 06:59:54 +0000 (Sat, 28 Sep 2019)

On branch swig-py3: fix test for swig-py on Python 3 on Windows

[ in subversion/bindings/swig/python/tests/]
 * trac/versioncontrol/tests/svn_fs.py (REPOS_PATH, REPOS_URL),
   On Python 3, pass a str object as argument to urllib.request.pathname2url()
   instead of a bytes.
 * util.py (file_uri_for_path):
   On Python 3, pass a str object as argument to urllib.request.pathname2url()
   instead of a bytes even if the argment `path' is a bytes object.

Reported by: jcorvel


r1867362 | futatuki | 2019-09-22 23:03:52 +0000 (Sun, 22 Sep 2019)

On branch swig-py3: Fix test for swig-py on Windows

* subversion/bindings/swig/python/tests/client.py:
 (SubversionClientTestCase.test_merge_peg3): Concern platform specific
 new line style.
 (SubversionClientTestCase.test_conflict): Discriminate between local path
 and canonical path
 (SubversionClientTestCase.test_shelf): Discriminate between local path
 and canonical path

Reported by: jcorvel


r1867214 | futatuki | 2019-09-20 11:18:26 +0000 (Fri, 20 Sep 2019)

On branch swig-py3: Catchup to trunk @r1867213

r1863069 | futatuki | 2019-07-14 23:45:47 +0000 (Sun, 14 Jul 2019)

On branch swig-py3: Fix test after merging shelving-v3

* subversion/bindings/swig/python/tests/client.py:
  (SubversionClientTestCase.test_shelf): Relax assert condition to be suitable
  for changed behavior of shelved_func callback in
  svn_client__shelf_save_new_version3().


r1862755 | futatuki | 2019-07-08 15:30:35 +0000 (Mon, 08 Jul 2019)

On branch swig-py3: avoid crash when status is NULL

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
 (svn_swig_py_client_status_func) Allow NULL for status.


r1862754 | futatuki | 2019-07-08 15:19:03 +0000 (Mon, 08 Jul 2019)

On branch swig-py3: Catchup to trunk @r1862753.

r1854007 | futatuki | 2019-02-21 00:36:46 +0000 (Thu, 21 Feb 2019)

On branch swig-py3: Unify error message between py2 and py3

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
 (read_handler_pyio): Remove IS_PY3 conditional by unifying error message


r1854006 | futatuki | 2019-02-21 00:22:50 +0000 (Thu, 21 Feb 2019)

On branch swig-py3: Allow str return to svn_client_get_commit_log3_t callback

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c:
 (svn_swig_py_get_commit_log_func): Allow result as unicode object

* subversion/bindings/swig/python/tests/client.py:
 (SubversionClientTestCase.make_log_message_func): New helper function
 (SubversionClientTestCase.test_get_commit_log3_callback_accept_unicode):
  New test case
 (SubversionClientTestCase.test_get_commit_log3_callback_unicode_error):
  New test case


r1853738 | futatuki | 2019-02-17 06:03:10 +0000 (Sun, 17 Feb 2019)

On branch swig-py3: Follow-up to r1853592: Don't pass '-DPY3' argument to swig 

PY3 macro introduced on r1849784 for swig context no longer used.

* build/ac-macros/swig.m4: Revert r1849784



r1853592 | futatuki | 2019-02-14 16:48:40 +0000 (Thu, 14 Feb 2019)

On branch swig-py3: accept both of bytes/str for input char * arguments

* Replace typemap(in) for char * using 'parse' modifier with one using
 function allows both of bytes/str in py2/py3 in libsvn_swig_py library
* Fix functions to convert Python objects into char pointer to accept
 both of bytes/str object in py2/py3
* Fix to accept None as representation of NULL value on conversion
  prop dict into apr_hash_t * and apr_array_header_t * of svn_props_t * 

[In subversion/bindings/swig]

* core.i (%typemap(in) (const char *data, apr_size_t *len): Allow str
 as well as bytes for data argment of svn_stream_write()

* include/svn_global.swg
 (remove)(%typemap(in) char *, char const *, char * const,
  char const * const): Move this typemap into include/svn_strings as
  typemap (in) IN_STRING

* include/svn_string.swg (new)(%typemap(in) IN_STRING): replacement of
 %typemap(in) char *, char const *, char * const, char const * const.
 actual processing code is moved new svn_swig_py_string_to_cstring() 
 function in python/libsvn_swig_py/swigutil_py.c

* include/svn_types.swg (%typemap(in) const char *MAY_BE_NULL):
  Move processing code into new svn_swig_py_string_to_cstring() function
  in python/libsvn_swig_py/swigutil_py.c 

* python/libsvn_swig_py/swigutil_py.c
 (svn_swig_py_string_to_cstring): New function to convert Python
  bytes or str into const char *, with better TypeError exception message
 (svn_swig_py_string_type_exception): New function to construct
  TypeError exception for new make_string_from_ob_maybe_null() function
 (make_string_from_ob, make_svn_string_from_ob):
  - Allow str as well as bytes for ob
  - Don't raise TypeError exception because all callers don't expect it
 (make_string_from_ob_maybe_null, make_svn_string_from_ob_maybe_null):
  New function same as make_string_from_ob() and make_svn_string_fromob()
  but allows None input represents NULL value and raise TypeError
  if input value don't have appropriate type
 (svn_swig_py_stringhash_from_dict, svn_swig_py_mergeinfo_from_dict,
  svn_swig_py_proparray_from_dict, svn_swig_py_prophash_from_dict,
  svn_swig_py_path_rev_hash_from_dict,
  svn_swig_py_struct_ptr_hash_from_dict): separate check of key conversion
  result and value conversion result
 (svn_swig_py_proparray_from_dict, svn_swig_py_prophash_from_dict):
  allow NULL for prop values
 (svn_swig_py_unwrap_string):
  - Allow str as well as bytes for source argument
 (svn_swig_py_make_file):
  - Allow str as well as bytes for py_file argument as file path
 (svn_swig_py_auth_gnome_keyring_unlock_prompt_func):
  - Use new function make_string_from_ob_maybe_null() instead of
   make_string_from_ob() to check TypeError
  - Report Python exception caused by Python callback function as
   callback exception error

* python/libsvn_swig_py/swigutil_py.h
 Expose new public function make_string_from_ob_maybe_null(), which is
 used by typemap(in) char IN_STRING, typemap(in) const char *MAY_BY_NULL

* python/tests/client.py
 (SubversionClientTestCase.log_entry_receiver_whole): New helper
  callback function for new SubversionClientTestCase.test_log5_revprops
 (SubversionClientTestCase.test_log5_revprops): new test for 
  typemap(in) apr_array_t *STRINGLIST and its helper function
  svn_swig_py_unwrap_string()

* python/tests/core.py
 (SubversionCoreTestCase.test_stream_write_exception):
  - As unicode input is now valid, use int value as invalid input
  - Add case to be expected to cause UnicodeEncodeError
 (SubversionCoreTestCase.test_stream_write_str):(Only for Python 3) 
  New test case for svn_stream_write() to pass str object as data argument
 (SubversionCoreTestCase.test_stream_write_bytes):
  Renamed from SubversionCoreTestCase.test_stream_write

* python/tests/run_all.py: Register new test module typemap

* python/tests/typemap.py: New unittest module for typemaps 
 (SubversionTypemapTestCase): New unittest subclass for unit test about
  typemaps 
 (SubversionTypemapTestCase.test_char_ptr_in): New test case
 (SubversionTypemapTestCase.test_char_ptr_in_unicode_exception):
  New test case
 (SubversionTypemapTestCase.test_char_ptr_may_be_null): New test case
 (SubversionTypemapTestCase.test_char_ptr_may_be_null_unicode_exception):
  New test case
 (SubversionTypemapTestCase.test_make_string_from_ob): New test case
 (SubversionTypemapTestCase.test_prophash_from_dict_null_value):
  New test case
 (SubversionTypemapTestCase.test_make-string_ob_unicode_exception):
  New test case
 (SubversionTypemapTestCase.test_make_svn_string_ob_unicode_exception):
  New test case
 (suite): New function to drive SubversionTypemapTestCase


r1852967 | futatuki | 2019-02-05 07:05:40 +0000 (Tue, 05 Feb 2019)

On branch swig-py3: A follow up r1851888: Save/restore Python error indicator

For all callback APIs which don't return svn_error_t * cannot notify
Python exception their caller, and as exceptions chain in Python 3,
exception conext should be detached from caller. 

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
 (svn_swig_py_notify_func, svn_swig_py_notify_func2,
  svn_swig_py_status_func, svn_swig_py_client_status_func,
  svn_swig_py_status_func2, ra_callbacks_progress_func,
  svn_swig_py_config_enumerator2, svn_swig_py_config_section_enumerator2):
  Save error indicator before Python function call and then restore it
  after call


r1851145 | futatuki | 2019-01-12 07:32:17 +0000 (Sat, 12 Jan 2019)

* COMMITERS: Add myself as a partial commiter (swig-py3 branch)