1. 07 Aug, 2015 1 commit
    • David Gobbi's avatar
      Fix numpy_interface compatibility with py3k. · 8b32c4d3
      David Gobbi authored
      This involved replacing map() with list comprehensions, changing the way
      metaclasses are used, removing the __div__ method under python 3, and
      using 'zip" instead of "izip" on python 3.
  2. 06 Aug, 2015 6 commits
    • David Gobbi's avatar
      Patch CommonCore python tests for py3k. · b7308b03
      David Gobbi authored
      This change modifies the python code for the tests so that they are
      cross-compatible between python 2 and python 3.  The new code will not
      run on Python 2.5 or earlier, because only python 2.6 and 2.7 allow
      py3k-friendly syntax.
      The numpy_interface does not fully support python 3 yet, due to changes
      in the way numeric operators work and the way type coercion is done.
    • David Gobbi's avatar
      Python API compatibility for py3k. · d3eb4043
      David Gobbi authored
      This is a large change that adds conditional compilation to support
      both python 2 and python 3.  The header vtkPythonCompatibility.h
      does a lot of the necessary work:
      1) PyInt is redefined to PyLong for py3k
      2) PyString is redefied to PyUnicode for py3k
      3) PyBytes is redefined to PyString for python 2
    • David Gobbi's avatar
      Make vtk/__init__.py compatible with py3k. · c96458b9
      David Gobbi authored
    • David Gobbi's avatar
      Fix PyVTKTemplate dict compatibility methods. · e1ff8866
      David Gobbi authored
      The get() method was incorrectly implemented and segfaulted.  Also,
      with py3k, the keys() method returned a special object instead of
      a plain list, and this caused the wrapping to fail.
    • David Gobbi's avatar
      Add the new py3k buffer interface. · 16bb32d4
      David Gobbi authored
      Python 3 introduced a multi-dimensional buffer interface, which was
      backported to Python 2.6 and Python 2.7.
    • David Gobbi's avatar
      Provide py3k module initialization. · f2aebb86
      David Gobbi authored
      This changes the return value of the "real_init" function from void
      to PyObject *, in accordance with the new PyInit method.
  3. 30 Jul, 2015 1 commit
  4. 28 Jul, 2015 1 commit
  5. 27 Jul, 2015 1 commit
  6. 26 Jul, 2015 6 commits
    • David Gobbi's avatar
      Simplify PyVTKClass struct by removing vtk_mangle. · d0d6e833
      David Gobbi authored
      The vtk_mangle member was exactly the same as the python name for
      the class, so it can be retrieved from the PyTypeObject.  I also
      renamed the vtk_cppname member to vtk_name and renamed its attrib
      to __vtkname__.  This attrib is what the VTK GetClassName() method
    • David Gobbi's avatar
      Make python enum type objects static. · 41c65801
      David Gobbi authored
      This was the last generated type object that was exported.  Now that
      it is static, the wrapper-specific import/export macros are no longer
    • David Gobbi's avatar
      Simplify type check for overload resolution. · c4aaab42
      David Gobbi authored
      The overloaded method resolution code in vtkPythonOverload.cxx used to
      make assumptions about type based on the class name (e.g. vtk types start
      with "vtk", python types start with "Py").  Now a distinct character code
      is used for each type.
    • David Gobbi's avatar
      Add the module to the tp_name member of every type. · 74de9b8c
      David Gobbi authored
      This is done according to the documentation for PyTypeObject. It
      allows python to correctly generate the __module__ attribute for
      extension types, which is needed by some python packaging systems.
    • David Gobbi's avatar
      Update the PyVTKTemplate type object. · 45abed45
      David Gobbi authored
      This allowed me to remove its custom GetAttr method.
    • David Gobbi's avatar
      Do type checking with type objects, not strings. · c14475e3
      David Gobbi authored
      There is no guarantee that tp_name is unique, and it would be bad
      if someone fooled the type checking by simply creating a new type
      with the same name as an existing type.
  7. 23 Jul, 2015 11 commits
  8. 20 Jul, 2015 7 commits
  9. 19 Jul, 2015 6 commits