Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Replace use of str() with six.text_type() for Py2&3 compatibility

Version 1 of the PyQt APIs return QVariant types that must be
cast to Python strings before use. To catch this `get_window_title()`
in `backend_qt5.py` wrapped the call to `self.window.windowTitle()`
with `str()`. This fails on Python 2 if the window title contains
unicode characters.

This is replaced with `six.text_type` for Py2&3 compatibility with
unicode types.

A number of other locations in the same file were also using `str()`
for potentially unicode data. These are also fixed in this commit.

Fixes #4275.
latest commit 378e37d775
@mfitzp mfitzp authored
..
Failed to load latest commit information.
axes Merge pull request #3060 from montefra/no_assert
backends Replace use of str() with six.text_type() for Py2&3 compatibility
compat Work around subprocess.CalledProcessError on Google App Engine
delaunay Fix C++ warnings from latest clang-analyzer
mpl-data Revert "Merge pull request #3792 from mrkrd/master"
projections Fixed spacing issue for pep8
sphinxext Fix --small option for docs build with sphinx 1.3
style Fixing "line too long (80 > 79 characters)". :-/
testing PEP8 : convert lambdas to functions
tests Merge pull request #4264 from olanmatt/fix_4068
tri String formatting in matplotlib directory changed
__init__.py String formatting in matplotlib directory changed
_cm.py Removing unnecessary import in _cm.py
_mathtext_data.py The `from __future__ ...` line added in #2226 is three charachters
_pylab_helpers.py MNT : fix typo in no-lint flag
afm.py Merge remote-tracking branch 'upstream/v1.4.x'
animation.py String formatting in matplotlib directory changed
artist.py MAINT: remove noqa comments
axis.py Merge pull request #3060 from montefra/no_assert
backend_bases.py Merge pull request #3060 from montefra/no_assert
bezier.py Changed handling of division by zero
blocking_input.py Modified according to @tacaswell comments
cbook.py Improved GC for python3.
cm.py STY: Various pep8 fixes - specifically targeting travis pep8 failures
collections.py scatter: fix marker kwarg bug. Closes #4073, #3895.
colorbar.py colorbar: edit tick locations based on vmin and vmax; closes #4181
colors.py String formatting in matplotlib directory changed
container.py The `from __future__ ...` line added in #2226 is three charachters
contour.py python2.6 string formatting. style more uniform
dates.py Merge remote-tracking branch 'upstream/v1.4.x'
docstring.py Fixed small bug in Appender class in docstring module.
dviread.py The `from __future__ ...` line added in #2226 is three charachters
figure.py python2.6 string formatting. style more uniform
finance.py python2.6 string formatting. style more uniform
font_manager.py Merge pull request #4113 from fcolas/fix#3330
fontconfig_pattern.py class foo: => class foo(object):
gridspec.py `eg` (without a comma) to `e.g.,`
hatch.py class foo: => class foo(object):
image.py PEP8 fixed - image.py
legend.py Revert "Merge pull request #3792 from mrkrd/master"
legend_handler.py removing comments and unnecessary line changes
lines.py Merge branch 'v1.4.x' into master
markers.py String formatting in matplotlib directory changed
mathtext.py Keep depth positive when calculating mathtext bounding box
mlab.py String formatting in matplotlib directory changed
offsetbox.py Fix lots of warnings in docs.
patches.py Merge pull request #3060 from montefra/no_assert
path.py python2.6 string formatting. style more uniform
patheffects.py String formatting in matplotlib directory changed
pylab.py MNT : remove mlab.premca
pyplot.py Refactoring: fewer variables, slightly faster code
quiver.py BUG: Quiver must copy U, V, C args so they can't change before draw()
rcsetup.py Merge pull request #3060 from montefra/no_assert
sankey.py python2.6 string formatting. style more uniform
scale.py Typo fixed
spines.py python2.6 string formatting. style more uniform
stackplot.py removing comments and unnecessary line changes
streamplot.py fixed according to #3060 comment
table.py python2.6 string formatting. style more uniform
texmanager.py class foo: => class foo(object):
text.py Merge pull request #3060 from montefra/no_assert
textpath.py MNT : use six to patch over import differences
ticker.py asserts removed from t* file. test and tri directories ignored
tight_bbox.py Update tight_bbox.py
tight_layout.py STY: Reversed E113 pep errors where the indenting of comments looked …
transforms.py python2.6 string formatting. style more uniform
type1font.py BUG : fix 2.6 compatbility
units.py Merge remote-tracking branch 'upstream/v1.4.x'
widgets.py Merge pull request #3060 from montefra/no_assert
Something went wrong with that request. Please try again.