zulip/scripts
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
..
lib scripts: Fix exec invocation for in-process virtualenv activation. 2019-04-16 17:42:44 -07:00
nagios scripts: Remove nagios overrides for missedmessage_emails. 2019-04-13 20:43:07 -07:00
setup terminate-psql-sessions: Allow running as postgres user. 2019-04-12 17:27:23 -07:00
README.md docs: Update links from codebase to point to ReadTheDocs. 2017-11-16 10:53:49 -08:00
__init__.py
get-django-setting Remove `from __future__ import absolute_import`. 2017-10-17 22:59:42 -07:00
purge-old-deployments scripts: Remove unused imports. 2019-02-02 17:02:58 -08:00
restart-server scripts: Add argparse option to `restart-zerver` for `--fill-cache`. 2019-01-14 15:20:01 -08:00
upgrade-zulip Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
upgrade-zulip-from-git Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
zulip-puppet-apply puppet: Remove vendored puppetlabs apt and stdlibs dependencies. 2018-12-11 13:03:26 -08:00

README.md

This directory contains scripts that:

  • Generally do not require access to Django or the database (those are "management commands"), and thus are suitable to run operationally.

  • Are useful for managing a production deployment of Zulip (many are also used in a Zulip development environment, though development-only scripts live in tools/).

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