Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated wx plugin to be up-to-date with the latest wx and Pillow #51

Merged
merged 2 commits into from
Oct 9, 2018

Conversation

yueranyuan
Copy link
Contributor

@yueranyuan yueranyuan commented Sep 22, 2018

updates function names to get rid of 2 deprecation warnings:
pyscreenshot/plugins/wxscreen.py:24: wxPyDeprecationWarning: Call to deprecated item EmptyBitmap. Use :class:'wx.Bitmap' instead
pyscreenshot/plugins/wxscreen.py:28: wxPyDeprecationWarning: Call to deprecated item ImageFromBitmap. Use bitmap.ConvertToImage instead. myWxImage = wx.ImageFromBitmap(bmp)

wrap input to 1 function to fulfill the latest function argument of frombytes in Pillow==5.2.0 to prevent error:
TypeError: argument 1 must be string or read-only buffer, not bytearray

@coveralls
Copy link

coveralls commented Sep 22, 2018

Coverage Status

Coverage decreased (-0.1%) to 39.44% when pulling 398ee0a on yueranyuan:update_wx_plugin into 2730487 on ponty:master.

@ponty
Copy link
Owner

ponty commented Sep 24, 2018

Travis CI fails: "TypeError: String or Unicode type required"
Ubuntu 18.04 also fails.
Bitmap call is not compatible with wxPython Classic.
Please check it!

@yueranyuan
Copy link
Contributor Author

I think the constructor was changed in wxPython >= 4.0 to allow for wxBitmap(width, height). Defaulting to prior behaviour for wxPython < 4.0

@ponty ponty merged commit abddc4a into ponty:master Oct 9, 2018
@ponty
Copy link
Owner

ponty commented Oct 9, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants