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

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

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

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

pedrudehuere opened this issue Oct 3, 2016 · 6 comments

Comments

@pedrudehuere
Copy link

@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
Copy link
Member

@bitprophet 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
Copy link
Author

@pedrudehuere 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
Copy link

@ploxiln 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
Copy link

@ploxiln 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
Copy link
Member

@bitprophet 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
Copy link

@ploxiln 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants