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

Python2.5 compatibility 'str' object has no attribute 'format' #1514

Closed
pedrudehuere opened this Issue Oct 3, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@pedrudehuere

pedrudehuere commented Oct 3, 2016

file: network.py
line: 475
a .format() has been introduced, in commit 1ca512d,
which (IIRC) is not compatible with python2.5.

Using Python 2.5 I'm getting :

...Fabric-1.12.0-py2.5.egg/fabric/network.py", line 475, in connect
    name = 'gss_{0}'.format(suffix)
AttributeError: 'str' object has no attribute 'format'
@bitprophet

This comment has been minimized.

Member

bitprophet commented Oct 3, 2016

Yup, added in 2.6. We have very few users on 2.5 nowadays (and CI platforms no longer support it, either) which is doubtless why this went uncaught. Thanks for the catch!

@bitprophet bitprophet added this to the 1.10.6 milestone Oct 3, 2016

@pedrudehuere

This comment has been minimized.

pedrudehuere commented Oct 5, 2016

I really got depressed when I reckoned I had to use python2.5... I worked round it by doing some SSH tunnels, not very clean, but better than use python2.5 =P

@ploxiln

This comment has been minimized.

ploxiln commented Oct 7, 2016

This bug was actually introduced in the 1.11 branch. It is not present in the 1.10 branch.

ploxiln added a commit to ploxiln/fab-classic that referenced this issue Oct 7, 2016

@ploxiln

This comment has been minimized.

ploxiln commented Oct 7, 2016

It would make sense to "officially" drop support for python-2.5 in the next minor release, and probably python-2.6 as well in fabric-2.0. The last python-2.6 patch-update was a full 3 years ago, users stuck on that python can use fabric 1.12.x, which could continue to be maintained.

@bitprophet

This comment has been minimized.

Member

bitprophet commented Oct 7, 2016

Fabric 2 (via Invoke/Paramiko's requirements) will support 2.6-2.7 and 3.3+; there are still a lot of people on 2.6 despite its EOLification. (Though I expect it'll get dropped in the subsequent major revisions of all of those libs, which will not be nearly as long as Fab 2 took...)

I don't think it makes sense to drop 2.5 support in Fab 1.x despite the small userbase, it's technically breaking backwards incompat, and given 1.x isn't Py3 compatible, the burden of supporting 2.5 isn't very high (basically, don't use .format).

@ploxiln

This comment has been minimized.

ploxiln commented Oct 7, 2016

Sounds good. I'm sure you've thought about it more than I have :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment