zulip/requirements
Mateusz Mandera 1d9fb4f988 django: Upgrade Zulip to Django 3.2 LTS.
This is a straightforward upgrade in terms of changes needed.

Necessary changes were:
- Set `DEFAULT_AUTO_FIELD`
  https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys

- `The default_app_config application configuration variable is deprecated, due
  to the now automatic AppConfig discovery.`
  https://docs.djangoproject.com/en/3.2/releases/3.2/#automatic-appconfig-discovery

To handle this one, we can remove default_app_config from
zerver/__init__.py because it satisfies what release notes describe in
https://docs.djangoproject.com/en/3.2/releases/3.2/#automatic-appconfig-discovery:
"Most pluggable applications define an AppConfig subclass in an apps.py
submodule. Many define a default_app_config variable pointing to this
class in their __init__.py.  When the apps.py submodule exists and
defines a single AppConfig subclass, Django now uses that configuration
automatically, so you can remove default_app_config."

An important note is that rebuild-test-database needs to be run after
this upgrade in dev environment - if tests are run with test db that was
built on the previous version, they will fail due to a mysterious bug
(?), where changing attributes of a user and .save()ing after logging in
in the test via self.login_user, causes getting logged out - the next
requests via self.client_get etc. are unauthed for some reason,
unless self.login_user is called again. This behavior is no longer
exhibited upon rebuilding the test db - and I can't reproduce it in
production or dev db. So this can likely be reasonably dismissed as some
quirk of the test client system that won't be relevant in the future and
doesn't impact production.
2021-05-03 08:36:22 -07:00
..
README.md requirements: Update example to match the line above. 2021-03-04 18:08:45 -08:00
common.in django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
dev.in requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
dev.txt django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
docs.in docs: Capitalize Markdown consistently. 2020-08-11 10:23:06 -07:00
docs.txt requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
mypy.in mypy: Use sqlalchemy-stubs. 2020-11-16 18:17:41 -08:00
mypy.txt requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
pip.in requirements: Upgrade Python requirements. 2020-12-09 14:24:54 -08:00
pip.txt requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
prod.in requirements: Remove unnecessary version bounds from *.in. 2019-09-23 13:23:58 -07:00
prod.txt django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
thumbor-dev.in requirements: Upgrade Thumbor to 7.0.0a5 on Python 3. 2020-07-06 16:09:53 -07:00
thumbor-dev.txt requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00
thumbor.in requirements: Upgrade Python requirements. 2021-02-10 10:15:50 -08:00
thumbor.txt requirements: Upgrade Python requirements. 2021-04-15 21:47:33 -07:00

README.md

The dependency graph of the requirements is as follows:

dev +-> prod +-> common
+
|
v
mypy,docs,pip

Of the files, only dev, prod, and mypy have been used in the install scripts directly. The rest are implicit dependencies.

Steps to update a lock file, e.g. to update ipython from 5.3.0 to latest version: 0. Remove entry for ipython==5.3.0 in dev.txt.

  1. Run ./tools/update-locked-requirements, which will generate new entries, pinned to the latest version.
  2. Increase PROVISION_VERSION in version.py.
  3. Run ./tools/provision to install the new deps and test them.
  4. Commit your changes.