Skip to content

Conversation

@AidanCurrah
Copy link
Contributor

@AidanCurrah AidanCurrah commented Jul 30, 2019

fabric3 is dead since as of version 2, fabric supports python 3. fabric3 uses pycrypto which is itself an old a dead package. I'd rather not use an out of date cryptography package if we can avoid it.

This does mean we have to change how all the commands work however as the syntax for fabric 2.0 is wildly different to fabric 1.0 which is what the syntax for fabric3 was based on.

All commands updated, commands tested:

  • Backup DB
  • Deploy
  • Pull all
  • Pull DB
  • Pull Media
  • Push DB
  • Push media
  • SSL
  • Update

def prompt(text, default=None, validate=None):
if default:
text = text.strip()
if text[-1] == ':' and len(text) > 1:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this function is only used internally, I'm not sure why you would strip a colon from the end if it is present - just don't use the function that way.

def title_print(title, state=''):
def prompt(text, default=None, validate=None):
if default:
text = text.strip()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my below comment - as it's used internally only, just don't call it with whitespace on the end..

with virtualenv(new_venv), shell_env(DJANGO_SETTINGS_MODULE=settings_module):
sudo('[[ -e requirements.txt ]] && pip install -r requirements.txt')
sudo('pip install gunicorn')
with connection.prefix(f'workon {new_venv}'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't assume virtualenvwrapper is installed, which provides workon.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants