On Sun, Sep 29, 2019 at 8:42 PM Yasuhito FUTATSUKI <futat...@poem.co.jp> wrote: ... > Hmm.. It seems the diffrence comes from difference of implementation > of class subprocess.Popen. > > I tweaked again clean up code for class svn.fs.FileDiff. Only if > Python >= 3.3, it wait for maximum 10 sec to terminate subprocess. > 'timeout' parameter for subprocess.Popen.wait() is added on Python 3.3. > and not back ported to Python 2, so if we want to use wait() on > earlier Python, it may wait forever.... (It can be possible to implement > timeout by using poll() and sleep loop, but is it needed here?)
Okay, with that latest patch the testsuite runs fine now. Perfect. [[[ C:\research\svn\dev\swig-py3>runtest.bat --swig=python 'ruby' is not recognized as an internal or external command, operable program or batch file. Testing Release configuration on local repository. -- Running Swig Python tests -- ........................................................................................................................ ................................. ---------------------------------------------------------------------- Ran 153 tests in 63.938s OK ]]] > > When I treat ResourceWarning as an error, I get a lot more output, > > especially before the test runs start. I suppose those are unrelated > > to that one RW above. > > Yes, ... and ResourceWarnings are usually hided by default warning filter. > > https://docs.python.org/3/library/warnings.html#default-warning-filter > > Only while executing unittest.main(), warning filter is overrided by > its optional parameter `warning'. Its default is specified filter on > Python start up by environment variable PYTHONWARNINGS or -W option > if it is specified, otherwise "default" action for all warning > categories (i.e. show all warnings). > > > [[[ > > C:\research\svn\dev\swig-py3>set PYTHONWARNINGS=error::ResourceWarning:: > > > > C:\research\svn\dev\swig-py3>runtest.bat --swig=python > > Exception ignored in: <_io.FileIO name='build.conf' mode='rb' closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper name='build.conf' > > mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\srclib\\apr\\include\\apr_version.h' > > mode='rb' closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\srclib\\apr\\include > > \\apr_version.h' mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\srclib\\apr-util\\include\\apu_versi > > on.h' mode='rb' closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\srclib\\apr-util\\in > > clude\\apu_version.h' mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\srclib\\apr-util\\xml/expat/lib\\exp > > at.h' mode='rb' closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\srclib\\apr-util\\xm > > l/expat/lib\\expat.h' mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\zlib-1.2.11\\zlib.h' mode='rb' > > closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\zlib-1.2.11\\zlib.h' mode='r' enco > > ding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\sqlite-amalgamation-3.22.0.0\\sqlite3.h' > > mode='rb' > > closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\sqlite-amalgamation-3.22.0.0\\sqli > > te3.h' mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='subversion\\libsvn_subr\\lz4\\lz4internal.h' mode='rb' > > closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='subversion\\libsvn_subr\\lz4\\lz4internal.h' mode='r' encoding=' > > cp1252'> > > Exception ignored in: <_io.FileIO > > name='subversion\\libsvn_subr\\utf8proc\\utf8proc_internal.h' > > mode='rb' closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='subversion\\libsvn_subr\\utf8proc\\utf8proc_internal.h' mode='r' > > encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\include\\ap_release.h' > > mode='rb' clo > > sefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\httpd-2.4.29\\include\\ap_release. > > h' mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\openssl-1.0.2n\\inc32/openssl/opensslv.h' > > mode='rb > > ' closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\openssl-1.0.2n\\inc32/openssl/open > > sslv.h' mode='r' encoding='cp1252'> > > Exception ignored in: <_io.FileIO > > name='C:\\research\\svn\\dev\\deps\\serf-1.3.9\\serf.h' mode='rb' > > closefd=True> > > ResourceWarning: unclosed file <_io.TextIOWrapper > > name='C:\\research\\svn\\dev\\deps\\serf-1.3.9\\serf.h' mode='r' encod > > ing='cp1252'> > > Exception ignored in: <function Popen.__del__ at 0x01043420> > > Traceback (most recent call last): > > File "C:\Python37\lib\subprocess.py", line 858, in __del__ > > ResourceWarning, source=self) > > ResourceWarning: subprocess 3716 is still running > > Exception ignored in: <function Popen.__del__ at 0x01043420> > > Traceback (most recent call last): > > File "C:\Python37\lib\subprocess.py", line 858, in __del__ > > ResourceWarning, source=self) > > ResourceWarning: subprocess 1356 is still running > > 'ruby' is not recognized as an internal or external command, > > operable program or batch file. > > Testing Release configuration on local repository. > > -- Running Swig Python tests -- > > ..........................................................Exception > > ignored in: <function Popen.__del__ at 0x02D4B030> > > Traceback (most recent call last): > > File "C:\Python37\lib\subprocess.py", line 858, in __del__ > > ResourceWarning, source=self) > > ResourceWarning: subprocess 2972 is still running > > ............................................................................................... > > ---------------------------------------------------------------------- > > Ran 153 tests in 93.884s > > > > OK > > ]]] > > > > These ResourceWarning except last one are raised in test driver > win_test.py itself and in gen_win_dependencies module which is > used by win_test.py, I guess. Okay, I'll ignore those. I have unset the PYTHONWARNINGS env var again. At this point, I think the only thing blocking reintegration of this branch into trunk seems to be the C4115 warning / error. As I said, I have no informed opinion either way (and Brane was okay with turning it into a warning). So if Bert doesn't reply within a couple of days, I'd say we are good to go. BTW, I have one more question: is it expected that "swig-python bindings compiled with python 3" cannot be used by python 2? Because if I run the testsuite with Python 2.7.16, after I have compiled them with Python 3.7.4, I get the following error: [[[ C:\research\svn\dev\swig-py3>python --version Python 2.7.16 C:\research\svn\dev\swig-py3>runtest.bat --swig=python Testing Release configuration on local repository. -- Running Swig Python tests -- Traceback (most recent call last): File "C:\research\svn\dev\swig-py3\subversion\bindings\swig\python\tests\run_all.py", line 23, in <module> import mergeinfo, core, client, delta, checksum, pool, fs, ra, wc, repository, \ File "C:\research\svn\dev\swig-py3\subversion\bindings\swig\python\tests\mergeinfo.py", line 22, in <module> from svn import core, repos, fs File "C:\research\svn\dev\swig-py3\subversion\bindings\swig\python\tests/..\svn\core.py", line 26, in <module> from libsvn.core import * File "R:\test_release--swigpython\swig\pylib\libsvn\core.py", line 137 def apr_initialize() -> "apr_status_t": ^ SyntaxError: invalid syntax [Test runner reported failure] ]]] So distributors / packagers that want to support both py2 and py3 users, will have to create two sets of bindings. -- Johan