Commit Graph

9 Commits

Author SHA1 Message Date
William S Fulton a01e8474f6 Fixing setting this in Python when using __slots__
Don't attempt to use the class's __dict__ for setting 'this' when
a user has extended a class with:
    __slots__ = ['this'].
Was segfaulting. Now we fall back to a simple PyObject_SetAttr if the
usual approach to setting 'this' in __dict__ does not work.

Closes #1673 Closes #1674
2020-02-06 07:08:16 +00:00
Olly Betts 728b8955bd Drop support for Python classic classes
There were only needed to support Python < 2.2, and we now require at
least Python 2.6.

 Conflicts:
	.travis.yml
	Examples/test-suite/python/autodoc_runme.py
	Source/Modules/python.cxx

This is a cherry-pick and merge from patch in #1261
2018-10-12 07:10:47 +01:00
William S Fulton 95e8643d70 Rename func to funk in tests to avoid Go keyword problems 2017-06-16 19:24:48 +01:00
Alec Cooper b45164e098 Support python(pre|ap)pend on static methods in classic mode
Adding a test that covers this case to the python_append test-suite
Note: staticmethod function has been available since Python 2.2
2016-02-04 15:27:54 -05:00
Jon Schlueter b77f3afafb autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
2015-05-08 21:35:52 -04:00
William S Fulton 76bcec1d87 Test-suite fixes for python -classic
These are mostly workarounds for static class members not being supported for
old style classes, as documented in Python.html, "C++ classes".
2015-01-31 15:04:35 +00:00
William S Fulton 0fb34cb019 Disable test not relevant for Python -builtin 2014-10-01 07:57:23 +01:00
William S Fulton 1c44078751 Improve testing of %pythonprepend and %pythonappend 2013-07-02 20:00:17 +01:00
Haoyu Bai afd67f8c67 Fix SF#2552488: indentation adjust of %pythonappend and %pythonprepend
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11100 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-31 14:37:54 +00:00