8000 Fix Cairo text on Python3 with pycairo by mdboom · Pull Request #2906 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix Cairo text on Python3 with pycairo #2906

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

Merged
merged 1 commit into from
Mar 24, 2014

Conversation

mdboom
Copy link
Member
@mdboom mdboom commented Mar 18, 2014

There are three possible cairo wrappers that we support: py2cairo on Python 2.x, pycairo on Python 3.x and cairocffi on both. Unfortunately, they want to receive strings differently. py2cairo expects them as utf-8-encoding byte strings. The other two expect Python unicode strings.

This fixes the one case we missed in the recent changes to support cairocffi: when on Python 3.x with pycairo, we need to give the wrapper unicode strings.

Replaces #2905. Fixes #2903.

@tacaswell tacaswell added this to the v1.4.0 milestone Mar 18, 2014
tacaswell added a commit that referenced this pull request Mar 24, 2014
Fix Cairo text on Python3 with pycairo
@tacaswell tacaswell merged commit 97eb5c7 into matplotlib:master Mar 24, 2014
@mdboom mdboom deleted the cairo/text-encoding branch August 7, 2014 13:54
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.

Cairo Backend: Can't convert 'bytes' object to str implicitly on Python3
2 participants
0