Fix access to C++ static member functions using Python class
staticmethod syntax, such as Klass.memberfunction instead of
Klass_memberfunction, when using -fastproxy and -builtin in
combination with %callback.
The docstring containing the callback pointers were not being patched
during module initialisation.
Accept keyword arguments accessing C++ static member functions when
using -builtin and kwargs feature and Python class staticmethod syntax.
The missing keyword argument support was only when using the
class staticmethod syntax, not when using the flat static method
syntax.
Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.
- Document change in CHANGES file
- Minor tweaks and whitespace fixes in stype.c
- Enhance testcase
- Synchronise Java and Python runt test in testcase
Closes#1977Fixes#1603
Squashed commit of the following:
commit 61f794184e
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:20:25 2021 +0100
added python version for second part of testcase
commit bb80e236b8
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:10:14 2021 +0100
reworked comment in fixed code
commit 5a94bcc481
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:07:34 2021 +0100
removed new unittests; I switched to the official test cases
commit 36603f3c8d
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:05:33 2021 +0100
removed new unittests; I switched to the official test cases
commit 1f20ea00d2
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 14:39:19 2021 +0100
adapted testcase
commit ab492794c0
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 14:29:10 2021 +0100
fixed test
commit 9b5dd0c8f9
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 13:04:06 2021 +0100
C99 compatible comments
commit 1a89425ac8
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 11:41:48 2021 +0100
added extra checks to prevent accidental partial matches
commit 20e76f511a
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:42:56 2021 +0100
minor
commit 0e383bbb76
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:41:45 2021 +0100
cleanup
commit b644767121
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:39:43 2021 +0100
cleanup
commit 2574468c0f
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:38:35 2021 +0100
cleanup
commit 9dc7f1ed30
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:35:28 2021 +0100
removed ide files
commit a442a9df46
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:32:36 2021 +0100
removed printf
commit da4c6e91e3
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:29:02 2021 +0100
possible fix found
commit 6fad8d40e3
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:01:11 2021 +0100
found difference between good/bad case... next: analyze why replacement did not work here...
commit 72a7693340
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 22:43:08 2021 +0100
ideintified location where the template-template type is inserted in the final type (with the missing specialization).
commit 1b53312c07
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 22:28:19 2021 +0100
more notes (to be reverted)
commit a9a0b58938
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 22:19:16 2021 +0100
some experiments (to be reverted)
commit 0e7a24bbd5
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 21:46:20 2021 +0100
added some notes
commit 2f77911a12
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 22:01:01 2021 +0100
comment changed
commit 2cb7213b06
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 21:55:47 2021 +0100
renamed example template parameters to easily distinguish them.
commit ff457d7397
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 21:21:10 2021 +0100
added reset parser functionality (required for unittests, to reset parser)
commit 617bbde3b4
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 20:47:41 2021 +0100
adjusted test for simple templates
commit beb7e7f77c
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Mon Mar 15 07:41:17 2021 +0100
added note how it should be...
commit 7b3328431c
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 17:07:24 2021 +0100
found a place which is maybe problematic for the template_template problem (#1603)
commit 46c2443d15
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 16:11:56 2021 +0100
unitests: reset parser for each testcase
commit b3a0f1516f
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 15:30:47 2021 +0100
first experiment with templates
commit 32a11c6c77
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:31:17 2021 +0100
wip
commit 37b805ba6e
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:21:05 2021 +0100
integrated unittests in ctest
commit 79f7bee168
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:18:26 2021 +0100
wip: new test created; problem: not in c++ mode
commit 345d503d55
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:08:09 2021 +0100
cleanup test code
commit 0a26adec10
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:05:24 2021 +0100
some more tests (first steps with c++ code)
commit 6f628e0fa9
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 12:56:41 2021 +0100
experiments
commit c4a13bf3e1
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 13 18:18:01 2021 +0100
first experiment
commit 7d26586105
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 13 17:23:13 2021 +0100
setup catch2 framework (w/o tests)
template_typedef_cplx2 files are generated by the template_typedef_import.multicpptest
but can also be cleaned by the template_typedef_cplx2.cpptest target.
* commit '8245277ad3acd9308ce28c40508b999e9496b27e':
Remove test for unsupported complex or _Complex by itself
More C99 complex fixes, plus Python tests
Restore _Complex as standalone type
Small corrections for handling C99 _Complex
Properly handle C99 complex types even in C++ mode
Conflicts:
Examples/test-suite/python/complextest_runme.py
* remove-dependency-on-2to3:
Remove need for Python 2to3
Modify examples to be both Python 2 and 3 compatible
Remove python3 specific runme3.py test files
Convert python tests using 2to3
Convert python test scripts to be Python 2 and 3 compatible
Convert swigobject python test to be python 2 and 3 compatible
Convert two tests to work with both Python 2 and 3
Improve director_exception Python test
Remove further print statements from Python tests
Improve Python testing catching exceptions
Improve contract Python testcase testing
Remove print statements from Python tests
All Python examples and tests have been written to be both Python 2 and Python 3
compatible, removing the need for 2to3 to run the examples or test-suite.
The 2to3 executable is not always available and even when available does not
always work, e.g. with pyenv. An alternative would be to use the lib2to3 Python
module instead, but this isn't available in some older versions of Python 3.
I had this problem on Ubuntu Bionic on Travis:
checking Examples/python/callback
pyenv: 2to3-3.8: command not found
The `2to3-3.8' command exists in these Python versions:
3.8
3.8.1
Reference issues:
https://github.com/pypa/virtualenv/issues/1399https://travis-ci.community/t/2to3-command-not-found-in-venv-in-bionic/4495