From 2ad1a27b28534a21c6cb406bcd1d54dc371adf00 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 9 Jan 2019 16:30:44 -0800 Subject: [PATCH] create-production-venv: Remove Python 2 support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We still create a Python 2 virtualenv for thumbor but that’s separate (/srv/zulip-thumbor-venv from scripts/lib/create-thumbor-venv). Signed-off-by: Anders Kaseorg --- scripts/lib/create-production-venv | 2 +- templates/zerver/api/incoming-webhooks-walkthrough.md | 6 +++--- tools/droplets/README.md | 2 +- tools/droplets/create.py | 2 +- zerver/webhooks/helloworld/doc.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/lib/create-production-venv b/scripts/lib/create-production-venv index b7b37ddeda..167fbd7e5d 100755 --- a/scripts/lib/create-production-venv +++ b/scripts/lib/create-production-venv @@ -40,7 +40,7 @@ python_version = sys.version_info[0] # relative path in requirements/common.in works. os.chdir(ZULIP_PATH) -venv_name = "zulip-venv" if sys.version_info[0] == 2 else "zulip-py3-venv" +venv_name = "zulip-py3-venv" cached_venv_path = setup_virtualenv( os.path.join(args.deploy_path, venv_name), os.path.join(ZULIP_PATH, "requirements", "prod.txt"), diff --git a/templates/zerver/api/incoming-webhooks-walkthrough.md b/templates/zerver/api/incoming-webhooks-walkthrough.md index e90e041137..c8302941cc 100644 --- a/templates/zerver/api/incoming-webhooks-walkthrough.md +++ b/templates/zerver/api/incoming-webhooks-walkthrough.md @@ -191,7 +191,7 @@ Now you can test using Zulip itself, or curl on the command line. Using `manage.py` from within the Zulip development environment: ``` -(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ +(zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ ./manage.py send_webhook_fixture_message \ --fixture=zerver/webhooks/helloworld/fixtures/hello.json \ '--url=http://localhost:9991/api/v1/external/helloworld?api_key=' @@ -303,7 +303,7 @@ Once you have written some tests, you can run just these new tests from within the Zulip development environment with this command: ``` -(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ +(zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ ./tools/test-backend zerver/webhooks/helloworld ``` @@ -352,7 +352,7 @@ stream name: To trigger a notification using this webhook, use `send_webhook_fixture_message` from the Zulip command line: - (zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ + (zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ ./manage.py send_webhook_fixture_message \ --fixture=zerver/tests/fixtures/helloworld/hello.json \ '--url=http://localhost:9991/api/v1/external/helloworld?api_key=<api_key>' diff --git a/tools/droplets/README.md b/tools/droplets/README.md index 156e1b1840..c851a2f234 100644 --- a/tools/droplets/README.md +++ b/tools/droplets/README.md @@ -97,7 +97,7 @@ Your remote Zulip dev server has been created! `ssh zulipdev@.zulipdev.org` on the command line (Terminal for macOS and Linux, Bash for Git on Windows). - There is no password; your account is configured to use your ssh keys. -- Once you log in, you should see `(zulip-venv) ~$`. +- Once you log in, you should see `(zulip-py3-venv) ~$`. - To start the dev server, `cd zulip` and then run `./tools/run-dev.py`. - While the dev server is running, you can see the Zulip server in your browser at http://.zulipdev.org:9991. diff --git a/tools/droplets/create.py b/tools/droplets/create.py index 536cb1e880..a9574b71d7 100644 --- a/tools/droplets/create.py +++ b/tools/droplets/create.py @@ -206,7 +206,7 @@ Your remote Zulip dev server has been created! `ssh zulipdev@{0}.zulipdev.org` on the command line (Terminal for macOS and Linux, Bash for Git on Windows). - There is no password; your account is configured to use your ssh keys. -- Once you log in, you should see `(zulip-venv) ~$`. +- Once you log in, you should see `(zulip-py3-venv) ~$`. - To start the dev server, `cd zulip` and then run `./tools/run-dev.py`. - While the dev server is running, you can see the Zulip server in your browser at http://{0}.zulipdev.org:9991. diff --git a/zerver/webhooks/helloworld/doc.md b/zerver/webhooks/helloworld/doc.md index b6d30cb8a2..af5c06654c 100644 --- a/zerver/webhooks/helloworld/doc.md +++ b/zerver/webhooks/helloworld/doc.md @@ -15,7 +15,7 @@ To trigger a notification using this webhook, use `send_webhook_fixture_message` from the Zulip command line: ``` -(zulip-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ +(zulip-py3-venv)vagrant@vagrant-ubuntu-trusty-64:/srv/zulip$ ./manage.py send_webhook_fixture_message \ > --fixture=zerver/tests/fixtures/helloworld/hello.json \ > '--url=http://localhost:9991/api/v1/external/helloworld?api_key=<api_key>'