Commit Graph

5 Commits

Author SHA1 Message Date
William S Fulton 365d4961d4 Remove print statements from Python tests
Use exceptions instead of printing to stdout.
Part of an effort to convert Python tests to python 3 syntax.
2020-08-13 21:22:47 +01: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 4b4540056d Turn off Python pickle test for old style classes 2016-10-14 19:48:37 +01:00
William S Fulton d2cb98c134 Pickle test additions
These are not working yet for all combinations of builtin and PY3
The goal is to have a sensible default error that states that
pickling is not supported.
2016-10-14 07:30:44 +01:00
William S Fulton 96fae38be2 Fix Python pickling and metaclass for builtin wrappers
The metaclass (SwigPyObjectType) for SWIG objects was not defined in
a way that let importlib successfully import the Python wrappers.
The pickle module failed because it couldn't determine what module the
SWIG wrapped objects are in.

I've changed the definition of SwigPyObjectType using more normal
builtin type definitions. There are still some open questions:
- None of the builtin types, like swig_static_var_getset_descriptor and
  SwigPyObject are added into any module. No call to PyModule_AddObject
  is made, so isinstance cannot be used for any wrapped type, all of
  which are derived from SwigPyObject.

Closes #808
2016-10-14 07:30:44 +01:00