You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python 2.6 string format syntax errors in matplotlib 1.4.3 #5703
matplotlib 1.4.xsupposedly supports Python 2.6, but the 1.4.3 release indicates that it is the last patch release, and there is no 1.4.x branch that I can submit PRs to.
Ironically, this means that 1.5.x supports Python 2.6 better than the 1.4.x series.
Unfortunately, we no longer support the 1.4.x series.
The 1.5 series does not 'officially' support 2.6, but we are still testing it against 2.6 and if you put in a PR to 1.5.x to fix these formatting issues I will merge it.
Going forward we will not support py2.6 at all (there is 2.6 incompatible code currently on both the 2.x and master branches).
@tacaswell, much appreciated, especially for backporting those changes to 1.5.x.
There are quite a few more uses of {} on the 1.5.x branch (see below). The py26 tests must not be covering those lines. Are you interested in having those fixed? I'll be happy to send through PRs for them.
Would you be interested in a patch that implements https://github.com/xZise/flake8-string-format checking on the 1.5.x branch, to catch possible string format 2.6 bugs early ?
If there is an aversion to using flake8, that checker can be run without flake8 already.
[v1.5.x]$ find . -name '*.py' | grep -v axes_zoom_effect | grep -v threading_test | xargs python3.4 -m flake8_string_format
./examples/api/filled_step.py:45:42: P202 format call uses missing keyword ('h', 'v')
./lib/mpl_toolkits/axes_grid1/axes_rgb.py:207:30: P101 format string does contain unindexed parameters
./lib/matplotlib/figure.py:494:0: P102 docstring does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:61:5: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:195:10: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:198:10: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:200:10: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:202:10: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:204:10: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_mathtext.py:208:10: P103 other string does contain unindexed parameters
./lib/matplotlib/tests/test_ticker.py:71:0: P102 docstring does contain unindexed parameters
./lib/matplotlib/table.py:347:0: P102 docstring does contain unindexed parameters
./lib/matplotlib/artist.py:999:26: P101 format string does contain unindexed parameters
./lib/matplotlib/ticker.py:831:17: P101 format string does contain unindexed parameters
./lib/matplotlib/ticker.py:834:21: P101 format string does contain unindexed parameters
./lib/matplotlib/ticker.py:836:21: P101 format string does contain unindexed parameters
./lib/matplotlib/ticker.py:839:21: P101 format string does contain unindexed parameters
./lib/matplotlib/ticker.py:841:21: P101 format string does contain unindexed parameters
./lib/matplotlib/afm.py:333:0: P102 docstring does contain unindexed parameters
./lib/matplotlib/type1font.py:142:28: P103 other string does contain unindexed parameters
./lib/matplotlib/axes/_base.py:3596:0: P102 docstring does contain unindexed parameters
./lib/matplotlib/mathtext.py:2222:35: P103 other string does contain unindexed parameters
./lib/matplotlib/patches.py:144:0: P102 docstring does contain unindexed parameters
./lib/matplotlib/lines.py:1050:35: P101 format string does contain unindexed parameters
./lib/matplotlib/dates.py:710:29: P103 other string does contain unindexed parameters
./versioneer.py:932:0: P103 other string does contain unindexed parameters
(many of those are false positives; I'll find a way to fix or whitelist those lines which are not actually a problem.)
It could also be useful on master, to catch problems like the first one in the list above, which is PR #5707.
Activity
tacaswell commentedon Dec 20, 2015
Thanks for taking the time to look into this.
Unfortunately, we no longer support the 1.4.x series.
The 1.5 series does not 'officially' support 2.6, but we are still testing it against 2.6 and if you put in a PR to 1.5.x to fix these formatting issues I will merge it.
Going forward we will not support py2.6 at all (there is 2.6 incompatible code currently on both the 2.x and master branches).
jayvdb commentedon Dec 21, 2015
@tacaswell, much appreciated, especially for backporting those changes to 1.5.x.
There are quite a few more uses of
{}on the 1.5.x branch (see below). The py26 tests must not be covering those lines. Are you interested in having those fixed? I'll be happy to send through PRs for them.Would you be interested in a patch that implements https://github.com/xZise/flake8-string-format checking on the 1.5.x branch, to catch possible string format 2.6 bugs early ?
If there is an aversion to using flake8, that checker can be run without flake8 already.
(many of those are false positives; I'll find a way to fix or whitelist those lines which are not actually a problem.)
It could also be useful on master, to catch problems like the first one in the list above, which is PR #5707.
Zac-HD commentedon Jan 8, 2018
Ping @tacaswell; this can probably be closed now.
efiring commentedon Jan 8, 2018
Good point. Thank you.