Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
run-dev: Drop .py from script name.
Anders Kaseorg43b4f1057873
diff --git a/api_docs/incoming-webhooks-walkthrough.md b/api_docs/incoming-webhooks-walkthrough.mdindex 353b2fea581..ec9cd148684 100644--- a/api_docs/incoming-webhooks-walkthrough.md+++ b/api_docs/incoming-webhooks-walkthrough.md@@ -288,7 +288,7 @@ the [management commands][management-commands] documentation.### Integrations Dev PanelThis is the GUI tool.-1. Run `./tools/run-dev.py` then go to http://localhost:9991/devtools/integrations/.+1. Run `./tools/run-dev` then go to http://localhost:9991/devtools/integrations/.2. Set the following mandatory fields:**Bot** - Any incoming webhook bot.diff --git a/docs/development/remote.md b/docs/development/remote.mdindex 94bd48eb424..8cd318f0924 100644--- a/docs/development/remote.md+++ b/docs/development/remote.md@@ -62,7 +62,7 @@ The main difference from the standard instructions is that for aremote development environment, and you're not using our Digital OceanDroplet infrastructure (which handles `EXTERNAL_HOST` for you), you'llneed to run `export EXTERNAL_HOST=<REMOTE_IP>:9991` in a shell before-running `run-dev.py` (and see also the `--interface=''` option+running `run-dev` (and see also the `--interface=''` optiondocumented below).If your server has a static IP address, we recommend putting this@@ -77,7 +77,7 @@ development server with the following command in the directory whereyou cloned Zulip:```bash-./tools/run-dev.py --interface=''+./tools/run-dev --interface=''```This will start up the Zulip server on port 9991. You can then@@ -284,8 +284,8 @@ Next, read the following to learn more about developing for Zulip:For some applications (e.g. developing an OAuth2 integration forFacebook), you may need your Zulip development to have a valid SSL-certificate. While `run-dev.py` doesn't support that, you can do this-with an `nginx` reverse proxy sitting in front of `run-dev.py`.+certificate. While `run-dev` doesn't support that, you can do this+with an `nginx` reverse proxy sitting in front of `run-dev`.The following instructions assume you have a Zulip Droplet working andthat the user is `zulipdev`; edit accordingly if the situation is@@ -320,5 +320,5 @@ different.1. Start the Zulip development environment with the following command:```bash- env EXTERNAL_HOST="hostname.example.com" ./tools/run-dev.py --interface=''+ env EXTERNAL_HOST="hostname.example.com" ./tools/run-dev --interface=''```diff --git a/docs/development/request-remote.md b/docs/development/request-remote.mdindex d3331aea3e9..88c03740cd9 100644--- a/docs/development/request-remote.md+++ b/docs/development/request-remote.md@@ -61,7 +61,7 @@ Once your remote dev instance is ready:(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-py3-venv) ~$`.-- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.+- To start the dev server, `cd zulip` and then run `./tools/run-dev`.- While the dev server is running, you can see the Zulip server in your browserat http://zulip.username.zulipdev.org:9991.- The development server actually runs on all subdomains ofdiff --git a/docs/development/setup-advanced.md b/docs/development/setup-advanced.mdindex f0f91b382bd..0752b33c0dc 100644--- a/docs/development/setup-advanced.md+++ b/docs/development/setup-advanced.md@@ -44,7 +44,7 @@ git remote add -f upstream https://github.com/zulip/zulip.git# From a clone of zulip.git./tools/provisionsource /srv/zulip-py3-venv/bin/activate-./tools/run-dev.py # starts the development server+./tools/run-dev # starts the development server```Once you've done the above setup, you can pick up the [documentation@@ -223,7 +223,7 @@ expected.1. You should now be able to start the Zulip development server.```console- (zulip-py3-venv) vagrant@ubuntu-18:/srv/zulip$ ./tools/run-dev.py+ (zulip-py3-venv) vagrant@ubuntu-18:/srv/zulip$ ./tools/run-dev```The output will look like:@@ -255,7 +255,7 @@ expected.programs after the provisioning is completed. If it still isn'tenough, try restarting your system and running the command again.-2. Be patient the first time you run `./tools/run-dev.py`.+2. Be patient the first time you run `./tools/run-dev`.As with other installation methods, please visit [#provisionhelp][provision-help] in the [Zulip development communitydiff --git a/docs/development/setup-recommended.md b/docs/development/setup-recommended.mdindex 1329ec70b22..efe11ab7846 100644--- a/docs/development/setup-recommended.md+++ b/docs/development/setup-recommended.md@@ -232,7 +232,7 @@ installation method described here.# Enter the Zulip Python environmentsource /srv/zulip-py3-venv/bin/activate# Start the development server- ./tools/run-dev.py+ ./tools/run-dev```:::{note}@@ -240,7 +240,7 @@ installation method described here.the services using `./tools/wsl/start_services`.:::-1. If you are facing problems or you see error messages after running `./tools/run-dev.py`,+1. If you are facing problems or you see error messages after running `./tools/run-dev`,you can try running `./tools/provision` again.1. The [Visual Studio Code Remote -@@ -373,7 +373,7 @@ Next, start the Zulip server:```console(zulip-py3-venv) vagrant@vagrant:/srv/zulip-$ ./tools/run-dev.py+$ ./tools/run-dev```You will see several lines of output starting with something like:@@ -448,13 +448,13 @@ run `tools/lint` often to make sure you're following our coding style(or use `tools/setup-git-repo` to run it on just the changed filesautomatically whenever you commit).-#### Understanding run-dev.py debugging output+#### Understanding run-dev debugging output-It's good to have the terminal running `./tools/run-dev.py` up as you work since error+It's good to have the terminal running `./tools/run-dev` up as you work since errormessages including tracebacks along with every backend request will be printedthere.-See [Logging](../subsystems/logging.md) for further details on the run-dev.py console+See [Logging](../subsystems/logging.md) for further details on the run-dev consoleoutput.#### Committing and pushing changes with Git@@ -511,10 +511,10 @@ To shut down but preserve the development environment so you can useit again later use `vagrant halt` or `vagrant suspend`.You can do this from the same Terminal/Git BASH window that is running-run-dev.py by pressing ^C to halt the server and then typing `exit`. Or you+run-dev by pressing ^C to halt the server and then typing `exit`. Or youcan halt vagrant from another Terminal/Git BASH window.-From the window where run-dev.py is running:+From the window where run-dev is running:```console2016-05-04 18:33:13,330 INFO 127.0.0.1 GET 200 92ms /register/ (unauth@zulip via ?)@@ -559,7 +559,7 @@ $ vagrant up$ vagrant ssh(zulip-py3-venv) vagrant@vagrant:/srv/zulip-$ ./tools/run-dev.py+$ ./tools/run-dev```### Next stepsdiff --git a/docs/development/using.md b/docs/development/using.mdindex 3bdf0412a7a..d05a1ea9914 100644--- a/docs/development/using.md+++ b/docs/development/using.md@@ -42,7 +42,7 @@ the development environment][authentication-dev-server].- The main Django/Tornado server processes are run on top ofDjango's [manage.py runserver][django-runserver], which willautomatically restart them when you save changes to Python code- they use. You can watch this happen in the `run-dev.py` console+ they use. You can watch this happen in the `run-dev` consoleto make sure the backend has reloaded.- The Python queue workers will also automatically restart when yousave changes, as long as they haven't crashed (which can happen if@@ -51,7 +51,7 @@ the development environment][authentication-dev-server].to use the [Django migrationsprocess](../subsystems/schema-migrations.md); see also the [newfeature tutorial][new-feature-tutorial] for an example.-- While testing server changes, it's helpful to watch the `run-dev.py`+- While testing server changes, it's helpful to watch the `run-dev`console output, which will show tracebacks for any 500 errors yourZulip development server encounters (which are probably caused bybugs in your code).@@ -63,7 +63,7 @@ the development environment][authentication-dev-server].## Web-- Once the development server (`run-dev.py`) is running, you can visit+- Once the development server (`run-dev`) is running, you can visit<http://localhost:9991/> in your browser.- By default, the development server homepage just shows a list of theusers that exist on the server and you can log in as any of them bydiff --git a/docs/overview/changelog.md b/docs/overview/changelog.mdindex 105b303c59f..4ad5d9e7b33 100644--- a/docs/overview/changelog.md+++ b/docs/overview/changelog.md@@ -2979,7 +2979,7 @@ running a version from before 1.7 should upgrade directly to 1.7.1.- Fixed missing step in postfix_localmail installation instructions.- Fixed several bugs/inconveniences in the production upgrade process.- Fixed realm restrictions for servers with a unique, open realm.-- Substantially cleaned up console logging from run-dev.py.+- Substantially cleaned up console logging from run-dev.### 1.3.9 - 2015-11-16diff --git a/docs/subsystems/caching.md b/docs/subsystems/caching.mdindex fab3ffb1c66..9579a62f1c8 100644--- a/docs/subsystems/caching.md+++ b/docs/subsystems/caching.md@@ -219,9 +219,9 @@ test run).### Manual testing and memcachedZulip's development environment will automatically flush (delete all-keys in) `memcached` when provisioning and when starting `run-dev.py`.+keys in) `memcached` when provisioning and when starting `run-dev`.You can run the server with that behavior disabled using-`tools/run-dev.py --no-clear-memcached`.+`tools/run-dev --no-clear-memcached`.### Performancediff --git a/docs/subsystems/logging.md b/docs/subsystems/logging.mdindex 5d42e63509d..a4d11849da3 100644--- a/docs/subsystems/logging.md+++ b/docs/subsystems/logging.md@@ -85,9 +85,9 @@ The main Zulip server log contains a line for each backend request.It also contains warnings, errors, and the full tracebacks for anyPython exceptions. In production, it goes to`/var/log/zulip/server.log`; in development, it goes to the terminal-where you run `run-dev.py`.+where you run `run-dev`.-In development, it's good to keep an eye on the `run-dev.py` console+In development, it's good to keep an eye on the `run-dev` consoleas you work on backend changes, since it's a great way to notice bugsyou just introduced.diff --git a/docs/subsystems/queuing.md b/docs/subsystems/queuing.mdindex 00bef9c08d6..40e771a685c 100644--- a/docs/subsystems/queuing.md+++ b/docs/subsystems/queuing.md@@ -39,7 +39,7 @@ To add a new queue processor:the `@assign_queue` decorator; it's pretty easy to get the templatefor an existing similar queue processor. This suffices to test yourqueue worker in the Zulip development environment- (`tools/run-dev.py` will automatically restart the queue processors+ (`tools/run-dev` will automatically restart the queue processorsand start running your new queue processor code). You can also runa single queue processor manually using e.g.`./manage.py process_queue --queue=user_activity`.diff --git a/docs/testing/testing-with-puppeteer.md b/docs/testing/testing-with-puppeteer.mdindex c18845b8339..a856b50b4f9 100644--- a/docs/testing/testing-with-puppeteer.md+++ b/docs/testing/testing-with-puppeteer.md@@ -112,7 +112,7 @@ These tools/features are often useful when debugging:failures.- TODO: Document any other techniques/ideas that were helpful when portingthe Casper suite.-- The Zulip server powering these tests is just `run-dev.py` with some+- The Zulip server powering these tests is just `run-dev` with someextra [Django settings](../subsystems/settings.md) from`zproject/test_extra_settings.py` to configure an isolated databaseso that the tests will not interfere/interact with a normaldiff --git a/docs/testing/testing.md b/docs/testing/testing.mdindex cbc5ac471a2..146cb5cfdc1 100644--- a/docs/testing/testing.md+++ b/docs/testing/testing.md@@ -84,7 +84,7 @@ Additionally, Zulip also has about a dozen smaller tests suites:- `tools/check-frontend-i18n`: Checks for a common bug in Handlebarstemplates, of using the wrong syntax for translating blockscontaining variables.-- `./tools/test-run-dev`: Checks that `run-dev.py` starts properly;+- `./tools/test-run-dev`: Checks that `run-dev` starts properly;this helps prevent bugs that break the development environment.- `./tools/test-queue-worker-reload`: Verifies that Zulip's queueprocessors properly reload themselves after code changes.diff --git a/docs/tutorials/life-of-a-request.md b/docs/tutorials/life-of-a-request.mdindex 8a5345d7907..81f79d4087d 100644--- a/docs/tutorials/life-of-a-request.md+++ b/docs/tutorials/life-of-a-request.md@@ -15,7 +15,7 @@ it isn't working. nginx does the first level of routing--deciding whichapplication will serve the request (or deciding to serve the requestitself for static content).-In development, `tools/run-dev.py` fills the role of nginx. Static files+In development, `tools/run-dev` fills the role of nginx. Static filesare in your Git checkout under `static`, and are served unminified.## Static files are [served directly][served-directly] by nginxdiff --git a/requirements/dev.in b/requirements/dev.inindex 3a154dfb90b..2044878a663 100644--- a/requirements/dev.in+++ b/requirements/dev.in@@ -8,7 +8,7 @@# moto s3 mockmoto[s3]-# Needed for running tools/run-dev.py+# Needed for running tools/run-devTwisted# Needed for documentation links testdiff --git a/tools/droplets/README.md b/tools/droplets/README.mdindex dcd71b55d83..69c0c098aab 100644--- a/tools/droplets/README.md+++ b/tools/droplets/README.md@@ -100,7 +100,7 @@ Your remote Zulip dev server has been created!(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-py3-venv) ~$`.-- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.+- To start the dev server, `cd zulip` and then run `./tools/run-dev`.- While the dev server is running, you can see the Zulip server in your browserat http://<username>.zulipdev.org:9991.diff --git a/tools/droplets/create.py b/tools/droplets/create.pyindex 2b4c90e2311..58a411d3d87 100644--- a/tools/droplets/create.py+++ b/tools/droplets/create.py@@ -264,7 +264,7 @@ Your remote Zulip dev server has been created!(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-py3-venv) ~$`.-- To start the dev server, `cd zulip` and then run `./tools/run-dev.py`.+- To start the dev server, `cd zulip` and then run `./tools/run-dev`.- While the dev server is running, you can see the Zulip server in your browser athttp://{1}:9991.""".format(diff --git a/tools/generate-integration-docs-screenshot b/tools/generate-integration-docs-screenshotindex c832fcd31a5..2ef7d296355 100755--- a/tools/generate-integration-docs-screenshot+++ b/tools/generate-integration-docs-screenshot@@ -206,7 +206,7 @@ def send_bot_payload_message(except requests.exceptions.ConnectionError:print("This tool needs the local dev server to be running. "- "Please start it using tools/run-dev.py before running this tool."+ "Please start it using tools/run-dev before running this tool.")sys.exit(1)if response.status_code != 200:diff --git a/tools/lib/test_server.py b/tools/lib/test_server.pyindex 1b2f5ec7cad..84f360c50ea 100644--- a/tools/lib/test_server.py+++ b/tools/lib/test_server.py@@ -72,7 +72,7 @@ def test_server_running(update_test_databases_if_required(rebuild_test_database=True)# Run this not through the shell, so that we have the actual PID.- run_dev_server_command = ["tools/run-dev.py", "--test", "--streamlined"]+ run_dev_server_command = ["tools/run-dev", "--test", "--streamlined"]if skip_provision_check:run_dev_server_command.append("--skip-provision-check")server = subprocess.Popen(run_dev_server_command, stdout=log, stderr=log)diff --git a/tools/run-dev.py b/tools/run-devsimilarity index 99%rename from tools/run-dev.pyrename to tools/run-devindex aac1f4a3929..56521753e9b 100755--- a/tools/run-dev.py+++ b/tools/run-dev@@ -23,7 +23,7 @@ from tornado.platform.asyncio import AsyncIOMainLoopfrom tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_okif "posix" in os.name and os.geteuid() == 0:- raise RuntimeError("run-dev.py should not be run as root.")+ raise RuntimeError("run-dev should not be run as root.")DESCRIPTION = """Starts the app listening on localhost, for local development.diff --git a/tools/setup/dev-motd b/tools/setup/dev-motdindex 0e9e930ee0f..fec23b3df84 100755--- a/tools/setup/dev-motd+++ b/tools/setup/dev-motd@@ -2,7 +2,7 @@This is the Zulip development environment. Popular commands:* tools/provision - Update the development environment-* tools/run-dev.py - Run the development server+* tools/run-dev - Run the development server* tools/lint - Run the linter (quick and catches many problems)* tools/test-* - Run tests (use --help to learn about options)diff --git a/tools/test-queue-worker-reload b/tools/test-queue-worker-reloadindex 589728937b8..9ea4661cdb9 100755--- a/tools/test-queue-worker-reload+++ b/tools/test-queue-worker-reload@@ -60,7 +60,7 @@ def check_worker_launch(run_dev: "subprocess.Popen[str]") -> bool:if __name__ == "__main__":print("\nStarting development server")- args = [f"{TOOLS_DIR}/run-dev.py"]+ args = [f"{TOOLS_DIR}/run-dev"]run_dev = subprocess.Popen(args,bufsize=1, # line buffereddiff --git a/tools/test-run-dev b/tools/test-run-devindex 278bd0e2422..cbf38bfbea5 100755--- a/tools/test-run-dev+++ b/tools/test-run-dev@@ -40,7 +40,7 @@ if __name__ == "__main__":with tempfile.NamedTemporaryFile(buffering=0) as logfile:run_dev = subprocess.Popen(- [os.path.join(TOOLS_DIR, "run-dev.py")], stdout=logfile, stderr=subprocess.STDOUT+ [os.path.join(TOOLS_DIR, "run-dev")], stdout=logfile, stderr=subprocess.STDOUT)failure, log = start_server(logfile.name)diff --git a/zerver/management/commands/convert_mattermost_data.py b/zerver/management/commands/convert_mattermost_data.pyindex 26b3fb132fc..d9fd0f71a7a 100644--- a/zerver/management/commands/convert_mattermost_data.py+++ b/zerver/management/commands/convert_mattermost_data.py@@ -10,7 +10,7 @@ in zerver/tests/../manage.py import --destroy-rebuild-database mattermost mm_export/gryffindorTest out the realm:- ./tools/run-dev.py+ ./tools/run-devgo to browser and use your dev url"""diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.pyindex bd017553e1a..b4b4bf2c6c9 100644--- a/zilencer/management/commands/populate_db.py+++ b/zilencer/management/commands/populate_db.py@@ -73,7 +73,7 @@ from zerver.models import (settings.USING_TORNADO = False# Disable using memcached caches to avoid 'unsupported pickle# protocol' errors if `populate_db` is run with a different Python-# from `run-dev.py`.+# from `run-dev`.default_cache = settings.CACHES["default"]settings.CACHES["default"] = {"BACKEND": "django.core.cache.backends.locmem.LocMemCache",@@ -1139,7 +1139,7 @@ def generate_and_send_messages(def send_messages(messages: List[Message]) -> None:# We disable USING_RABBITMQ here, so that deferred work is# executed in do_send_message_messages, rather than being- # queued. This is important, because otherwise, if run-dev.py+ # queued. This is important, because otherwise, if run-dev# wasn't running when populate_db was run, a developer can end# up with queued events that reference objects from a previous# life of the database, which naturally throws exceptions.diff --git a/zproject/computed_settings.py b/zproject/computed_settings.pyindex ba3f369308a..13876b3e932 100644--- a/zproject/computed_settings.py+++ b/zproject/computed_settings.py@@ -1161,7 +1161,7 @@ if EMAIL_BACKEND is not None:# If the server admin specified a custom email backend, use that.passelif DEVELOPMENT:- # In the dev environment, emails are printed to the run-dev.py console.+ # In the dev environment, emails are printed to the run-dev console.EMAIL_BACKEND = "zproject.email_backends.EmailLogBackEnd"elif not EMAIL_HOST:# If an email host is not specified, fail gracefullydiff --git a/zproject/dev_settings.py b/zproject/dev_settings.pyindex f06417b3ea0..9f90f459f11 100644--- a/zproject/dev_settings.py+++ b/zproject/dev_settings.py@@ -24,7 +24,7 @@ external_host_env = os.getenv("EXTERNAL_HOST")if external_host_env is None:if IS_DEV_DROPLET:# For our droplets, we use the hostname (eg github_username.zulipdev.org) by default.- # Note that this code is duplicated in run-dev.py.+ # Note that this code is duplicated in run-dev.EXTERNAL_HOST = os.uname()[1].lower() + ":9991"else:# For local development environments, we use localhost by@@ -170,7 +170,7 @@ SEARCH_PILLS_ENABLED = bool(os.getenv("SEARCH_PILLS_ENABLED", False))BILLING_ENABLED = TrueLANDING_PAGE_NAVBAR_MESSAGE: Optional[str] = None-# Our run-dev.py proxy uses X-Forwarded-Port to communicate to Django+# Our run-dev proxy uses X-Forwarded-Port to communicate to Django# that the request is actually on port 9991, not port 9992 (the Django# server's own port); this setting tells Django to read that HTTP# header. Important for SAML authentication in the developmentdiff --git a/zproject/urls.py b/zproject/urls.pyindex b175d3199d9..71805a2a5b5 100644--- a/zproject/urls.py+++ b/zproject/urls.py@@ -235,7 +235,7 @@ if settings.TWO_FACTOR_AUTHENTICATION_ENABLED:## - The nginx config knows which URLs to route to Django or Tornado.#-# - Likewise for the local dev server in tools/run-dev.py.+# - Likewise for the local dev server in tools/run-dev.# These endpoints constitute the currently designed API (V1), which uses:# * REST verbs