Commit Graph

8 Commits

Author SHA1 Message Date
Robin Dunn
295d3f6442 * Upgrade to the newest six module (1.2.0) and call it six instead of wx2to3.
* Tweak six a little, adding its license text since we'll only be distributing the module, fix the name of the dummy moves module, and add a PY33 constant since the change in memoryview affects our code.

* Update all modules already using the old wx2to3

* Tweak lots of unit tests and other modules to work with Python 3.3 (still a few more that will need some work.)

* Try to deal with memoryview changes in Py3.3, without much luck...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-16 01:15:41 +00:00
Robin Dunn
b41df0b779 Many, many (many!) changes needed to build and run the Phoenix extension modules with Python 3. Where possible changes were made such that the code works with both Python 2.7 and 3.2 without conditionals. In general the following types of changes were made:
* Changed imports to use either absolute or explicit relative imports.  Implicit relative imports are no longer allowed.

 * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely.

 * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues.

 * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.)

 * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc.

 * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-24 23:28:02 +00:00
Robin Dunn
18098181e3 Add buffer related methods and helpers for wxBitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 04:05:08 +00:00
Robin Dunn
c2e5a59a8f * Add a new wxPyBuffer class and MappedType to help facilitate checking input and getting the pointer and size of Python Buffer compatible objects.
* Use wxPyBuffer with wx.Image
* Return bytearrays from GetData and GetAlpha
* Return memoryviews from GetDataBuffer and GetAlphaBuffer
* Add some notes about these changes to the migration guide

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-28 04:04:53 +00:00
Robin Dunn
e8e932aade * Fix image ctors that accept data buffers to check the size of the buffer
* Do the same for the Create, SetData and SetAlpha methods
* Replace the GetData and GetAlpha to return copies of the buffer as in Classic
* Add GetDataBuffer, GetAlphaBuffer, SetDataBuffer, SetAlphaBuffer methods
* Add wxImageHandler

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-26 01:29:35 +00:00
Robin Dunn
5540ad141d Use unittest.expectedFailure decorator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-10 18:59:05 +00:00
Robin Dunn
a09e00e539 We have stream support now, reenable those tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 20:58:34 +00:00
Robin Dunn
640f22a259 Add Classic's enhancements to image and add unittests. Still need to add buffer and stream support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-14 06:40:40 +00:00