zulip/tools
Anders Kaseorg 9fc0aa7ffa scripts: Fix exec invocation for in-process virtualenv activation.
activate_this.py has always documented that it should be exec()ed with
locals = globals, and in virtualenv 16.0.0 it raises a NameError
otherwise.

As a simplified demonstration of the weird things that can go wrong
when locals ≠ globals:

    >>> exec('a = 1; print([a])', {}, {})
    [1]
    >>> exec('a = 1; print([a for b in [1]])', {}, {})
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<string>", line 1, in <module>
      File "<string>", line 1, in <listcomp>
    NameError: name 'a' is not defined
    >>> exec('a = 1; print([a for b in [1]])', {})
    [1]

Top-level assignments go into locals, but from inside a new scope like
a list comprehension, they’re read out of globals, which doesn’t work.

Fixes #12030.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-16 17:42:44 -07:00
..
ci tests: Optimize test-backend performance. 2019-02-19 14:50:41 -08:00
circleci circleci: Add a base image for Ubuntu Bionic. 2018-05-31 18:51:32 -07:00
documentation_crawler spiders: Set error status for exceptions generated by spider. 2019-04-08 17:04:29 -07:00
droplets create-production-venv: Remove Python 2 support. 2019-01-09 17:32:05 -08:00
i18n push-translations: Run manage.py makemessages first. 2019-03-13 14:11:27 -07:00
lib scripts: Fix exec invocation for in-process virtualenv activation. 2019-04-16 17:42:44 -07:00
linter_lib activity: Create interface for doing support operations. 2019-03-11 12:01:11 -07:00
setup scripts: Rename DEFAULT_USER to POSTGRES_USER. 2019-04-12 17:27:23 -07:00
test-install test-install/install: Print usage when run without arguments. 2019-01-31 16:15:51 -08:00
tests tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
zulint tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
zulip-export tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
README.md docs: Update links to ReadTheDocs to always use https. 2017-11-16 10:59:24 -08:00
__init__.py
build-docs build-docs: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
build-release-tarball build-release-tarball: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
check-capitalization check-capitalization: Include banned words in overall output. 2018-03-16 16:59:02 -07:00
check-frontend-i18n tools: Change use of typing.Text to str. 2018-05-13 17:17:32 -07:00
check-issue-labels tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
check-provision check-provision: Replace optparse with argparse. 2017-09-30 09:32:46 -07:00
check-swagger
check-templates tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
check-urls billing: Move billing-related views and urls to corporate. 2018-10-01 15:43:21 -07:00
clean-branches clean-branches: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
clean-repo clean-repo: Revert optimization to .pyc removal. 2017-07-30 17:24:55 -07:00
commit-message-lint Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
commit-msg Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
compile-handlebars-templates Add basic widgets framework (JS side). 2018-05-16 15:13:33 -07:00
conf.ini-template
coveragerc webhooks: Add generic exception for unexpected webhook events. 2018-05-22 08:30:19 -07:00
create-test-api-docs tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
deploy-branch Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
diagnose docs: Add documentation for `if False` mypy pattern in scripts. 2018-12-17 11:12:53 -08:00
django-template-graph django-template-graph: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
do-destroy-rebuild-database test_fixtures: Move test_db_status state under UUID_VAR_PATH. 2017-10-17 21:15:58 -07:00
do-destroy-rebuild-test-database do-destroy-rebuild-test-database: Fix shellcheck warnings. 2018-08-03 09:15:26 -07:00
fetch-pull-request Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
fetch-rebase-pull-request Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
find-add-class tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
find-unused-css Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
get-handlebar-vars Enable pycodestyle W605 (invalid escape sequence). 2018-07-03 16:54:46 +02:00
html-grep zulint: Move lister.py to tools/zulint. 2018-08-04 19:53:53 -07:00
inline-email-css emails: Fix duplicate <html> blocks in missed-message emails. 2019-01-11 14:23:30 -08:00
js-dep-visualizer.py tools: Add TypeScript to the dependency visualizer. 2019-04-12 11:14:42 -07:00
lint lint: Fix typo in eslint command line. 2019-04-13 22:45:07 -07:00
list-outdated-packages tools: Add tool for listing outdated pip packages. 2018-05-24 15:16:02 -07:00
minify-js tools: Remove pointless uses of shell=True. 2018-07-30 22:39:06 -07:00
pre-commit Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
pretty-print-html tools: Remove print_function. 2017-09-29 15:44:56 -07:00
provision provision: Clean up comments and unused variables. 2019-01-04 15:16:19 -08:00
push-to-pull-request Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
release-tarball-exclude.txt tests: Move zerver/fixtures to zerver/tests/fixtures for clarity. 2018-04-19 21:50:17 -07:00
renumber-migrations tools: Only files starting with same migration number conflict. 2018-07-10 21:09:34 +05:30
replacer zulint: Move lister.py to tools/zulint. 2018-08-04 19:53:53 -07:00
reset-to-pull-request Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
review tools/review: Don’t pretend to emulate shell=True either. 2018-07-30 22:39:08 -07:00
run-dev.py run-dev-queue-processors: Remove 2019-04-05 15:18:38 -07:00
run-mypy docs: Move mypy documentation from contributing to testing. 2018-12-16 21:52:53 -08:00
setup-git-repo Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
show-profile-results mypy: Remove ignores for a few typeshed bugs fixed upstream. 2017-10-27 17:09:00 -07:00
start-dockers Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
stop-run-dev tools: Consistently use hyphen in user script names. 2017-10-11 12:52:36 -07:00
test-all tests: Optimize test-backend performance. 2019-02-19 14:50:41 -08:00
test-all-docker Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
test-api tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
test-backend notifications: Rename notifications.py to email_notifications.py. 2019-03-15 11:02:17 -07:00
test-documentation test-documentation: Simplify --skip-external-links code path. 2018-12-29 09:09:18 -08:00
test-emoji-name-scripts test-emoji-name-scripts: Avoid hardcoded paths in /var/tmp. 2019-01-15 16:05:50 -08:00
test-help-documentation test-help-documentation: Skips checking external links. 2018-12-29 20:15:30 +05:30
test-js-with-casper
test-js-with-node tests: Update JS Node tests to support TypeScript. 2019-04-12 11:14:42 -07:00
test-locked-requirements tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
test-migrations Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
test-queue-worker-reload test-queue-worker-reload: Use a pipe rather than polling a log file. 2019-01-15 16:00:48 -08:00
test-run-dev test-run-dev: Use a pipe rather than polling a log file. 2019-01-15 16:00:48 -08:00
test-tools tools: Revert to Python 2 typing syntax for now. 2017-12-13 10:38:15 -08:00
update-authors-json tools: Remove unused imports. 2019-02-02 17:10:31 -08:00
update-locked-requirements update-locked-requirements: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
update-prod-static tools: Fix missing comma in collectstatic configuration. 2019-03-04 08:31:12 -08:00
upgrade-python-dependencies tools: Add script to automate python dependency upgrade. 2019-01-07 10:25:35 -08:00
webpack tests: Clean up calls to tools/webpack. 2018-09-07 11:39:55 -04:00
webpack-helpers.ts typescript: Fix violations of new typescript rules. 2019-04-13 11:42:48 -07:00
webpack.assets.json refactor: Remove inline javascript code in email_log.html. 2019-04-05 17:28:23 -07:00
webpack.config.ts typescript: Fix violations of new typescript rules. 2019-04-13 11:42:48 -07:00
zanitizer docs: Avoid hardcoded /tmp paths in miscellaneous documentation. 2019-01-15 16:16:12 -08:00
zanitizer_config.pm.sample zanitizer_config.pm.sample: keep_file → scrub_filename 2018-09-23 20:42:27 -07:00

README.md

This directory contains scripts that are used in building, managing, testing, and other forms of work in a Zulip development environment. Note that tools that are also useful in production belong in scripts/ or should be Django management commands.

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.