Fabric: Clarify fabric vs fabric2 vs fabric3 differences

Created on 8 Jun 2018  ·  8Comments  ·  Source: fabric/fabric

Currently there are 3 fabric packages on pypi, and its far from clear which ones are supposed to be used and when. I remember that fabric3 was supposed to add py3 support before fabric was able to do the same but as of today it appears that all of them document to declare support for py27 and py34+, at least in their descriptions.

I think that this should be clearly documented, avoiding confusions and allowing users using older versions to migrate.

Most helpful comment

用我刚自己总结的吧(中文,懒得改英文了):

Fabric1,Fabric2,Fabric3,分别对应着python官网发布的地址:
https://pypi.org/project/Fabric/
https://pypi.org/project/fabric2/
https://pypi.org/project/Fabric3/
安装方式分别是:

pip install Fabric
pip install fabric2
pip install fabric3

而结论是:

  • Fabric1和Fabric2,在pypi中的页面,就是同一个东西:

    • 都是Fabric的最新版:Fabric 2.x



      • 截至到20180817,安装出来的版本是:2.3.1



    • 而官网之所以弄出来个Fabric2是因为:

    • Fabric2和Fabric1相比,完全重写了,接口和功能都有很大改动



      • 官网也不建议你继续用Fabric1,建议升级到Fabric2


      • 最新版也早就支持Python 3.4+,和之前的Python2.7



  • 而Fabric3,是非官网的

    • 是当之前Fabric1还没有支持Python3时,别人去fork出来,加了Python 3的支持的

    • 现在好像基本上不维护了

总结一下态度就是:

  • 尽量用最新的Fabric2

    • Mac中用brew install fabric,已经是最新的2.3.1版本了

    • 如果pip install的话,应该是:

    • pip install fabric

    • pip install fabric2

    • 都是最新版本

  • 尽量不要用之前旧的版本的Fabric1了

    • 如果还在用,建议升级到最新的Fabric2

  • 不需要操心、忽略掉,所谓的、非官网的,现在已没价值的:Fabric3

All 8 comments

fabric2 is just an alternate name for Fabric, for convenience of being able to install with the alternate name: http://www.fabfile.org/installing.html#installing-modern-fabric-as-fabric2

fabric3 was done by someone else: https://github.com/mathiasertl/fabric/
You could request that fabric3 clarify the latest situation in its README and pypi description.

... but I don't disagree - it would probably help to have a short summary of Fabric vs fabric2 vs Fabric3 everywhere someone might first come across fabric, including in the pypi descriptions

Yea, we don't own fabric3, but now that we're using fabric and fabric2 I agree we should get out ahead of that. I'll update the README or something.

Try db7bba809ade5f904398a37fc179d6a9b4d6c059 on for size. Install doc seemed the best place for it, I don't expect it to pop up in front of people _so_ often as to need a README level note, but having it by the notes about fabric vs fabric2 seems reasonable. Thanks!

用我刚自己总结的吧(中文,懒得改英文了):

Fabric1,Fabric2,Fabric3,分别对应着python官网发布的地址:
https://pypi.org/project/Fabric/
https://pypi.org/project/fabric2/
https://pypi.org/project/Fabric3/
安装方式分别是:

pip install Fabric
pip install fabric2
pip install fabric3

而结论是:

  • Fabric1和Fabric2,在pypi中的页面,就是同一个东西:

    • 都是Fabric的最新版:Fabric 2.x



      • 截至到20180817,安装出来的版本是:2.3.1



    • 而官网之所以弄出来个Fabric2是因为:

    • Fabric2和Fabric1相比,完全重写了,接口和功能都有很大改动



      • 官网也不建议你继续用Fabric1,建议升级到Fabric2


      • 最新版也早就支持Python 3.4+,和之前的Python2.7



  • 而Fabric3,是非官网的

    • 是当之前Fabric1还没有支持Python3时,别人去fork出来,加了Python 3的支持的

    • 现在好像基本上不维护了

总结一下态度就是:

  • 尽量用最新的Fabric2

    • Mac中用brew install fabric,已经是最新的2.3.1版本了

    • 如果pip install的话,应该是:

    • pip install fabric

    • pip install fabric2

    • 都是最新版本

  • 尽量不要用之前旧的版本的Fabric1了

    • 如果还在用,建议升级到最新的Fabric2

  • 不需要操心、忽略掉,所谓的、非官网的,现在已没价值的:Fabric3

Previous comment by @crifan transcribed from Chinese (for the lazy ones that do not want to go to google translate). It is a good explanation (although now similar explanation appears in the fabric2 but not in fabric3 site):

Fabric1, Fabric2, and Fabric3 correspond to the addresses published by Python's official website:
https://pypi.org/project/Fabric/
Https://pypi.org/project/fabric2/
https://pypi.org/project/Fabric3/
The installation methods are:

Pip install Fabric
Pip install fabric2
Pip install fabric3
And the conclusion is:

Fabric1 and Fabric2, the pages in pypi, are the same thing:
Are the latest version of Fabric: Fabric 2.x
As of 20110817, the installed version is: 2.3.1
The reason why the official website came up with a Fabric2 is because:
Compared with Fabric1, Fabric2 is completely rewritten, and the interface and functions are greatly changed.
The official website does not recommend that you continue to use Fabric1, it is recommended to upgrade to Fabric2
The latest version also supports Python 3.4+, and the previous Python 2.7
And Fabric3, is the official website.
When Fabric1 didn't support Python3 before, others went out for fork and added support for Python 3.
It seems that it is basically not maintained now.
To sum up, the attitude is:

Try to use the latest Fabric2
The brew install fabric for Mac is already the latest 2.3.1 version.
If pip install, it should be:
Pip install fabric
Pip install fabric2
Are the latest version
Try not to use the old version of Fabric1.
If still in use, it is recommended to upgrade to the latest Fabric2
Don't worry, ignore, so-called, non-official, now worthless: Fabric3

For those want to do a fresh install of Fabric, just pip install fabric and a 2.0+ version will be installed. I suspect it applies to those who want to upgrade from 1.0 to 2.0, too. fabric2 is just for those who want fabric1 and fabric2 to coexist.

For those looking for a supported version of Fabric 1.x, there's a fork which is maintained:
https://github.com/ploxiln/fab-classic

I recommend using it in case you don't want to rewrite all the existing code. And it works with Python 3.7.

We've switched from fabric3==1.14.post1 to fab-classic==1.15.2 without any problems.

Was this page helpful?
0 / 5 - 0 ratings