stephenmcd / mezzanine

CMS framework for Django
http://mezzanine.jupo.org
BSD 2-Clause "Simplified" License
4.76k stars 1.65k forks source link

Fabric < 2.0 requirement creates Python 2.7 dependency #1957

Closed jmorsecode closed 3 years ago

jmorsecode commented 4 years ago

Current packaged fabfile.py needs to be upgraded for use with Fabric 2+. Accepting Fabric is not a hard requirement for deployment and that this topic already appears in various threads already, I still believe it deserves an open issue. Fabric 1.x is not compatible with Python 3 and Python 2 is now officially EOL. Considering the sensitive nature of the calls that Fabric is making (handling privileged remote execution, git access, etc.) it would seem this should be a priority.

jerivas commented 4 years ago

Hi J.M.

I agree, specially since Mezzanine's next version will only work with Django 2.2+ and Python 3. We'd need to rewrite the fabfile to work with Fabric 2 or use another solution.

In the meantime, I have deployed several Python 3 sites with the existing fabfile by using Fabric3 (last version I used was Fabric3==1.13.1.post1). It has the same API as Fabric 1.X but works with Python 3.

jmorsecode commented 4 years ago

Hi J.M. ... In the meantime, I have deployed several Python 3 sites with the existing fabfile by using Fabric3 (last version I used was Fabric3==1.13.1.post1). It has the same API as Fabric 1.X but works with Python 3.

@jerivas Thanks for that! I have seen that in various threads and videos but actually thought it was a typo since the latest official is v2. That being said, after looking at that repo, it's certainly not being maintained anymore. My point above regarding the handling of sensitive files and privileged access would still apply.

frankier commented 4 years ago

https://github.com/ploxiln/fab-classic is maintained

jmorsecode commented 3 years ago

Just wanted to update. I'm about 90% done with writing a near feature parity fabfile with Fabric 2.6 and Python 3.6. Without pulling in more dependencies it may lose some minor features but if my potential PR is accepted as a new baseline I'm sure someone with more skill could potentially replace those if they are deemed important enough.

jmorsecode commented 3 years ago

PR incoming later next week. Have been able to terraform destroy, apply to rebuild a fresh Ubuntu 20.04 linode, fab secure, and finally fab all several times over now. Just need to polish it up and squash some commits. Fair warning there was some ugly workarounds.

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 5.0.0-rc.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 5.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: