2019-04-21 05:51:20 +02:00
|
|
|
import os
|
|
|
|
|
2022-11-18 00:13:58 +01:00
|
|
|
ZULIP_VERSION = "7.0-dev+git"
|
2021-05-13 02:50:42 +02:00
|
|
|
|
2019-04-21 05:51:20 +02:00
|
|
|
# Add information on number of commits and commit hash to version, if available
|
2021-02-12 08:19:30 +01:00
|
|
|
zulip_git_version_file = os.path.join(
|
2021-02-12 08:20:45 +01:00
|
|
|
os.path.dirname(os.path.abspath(__file__)), "zulip-git-version"
|
2021-02-12 08:19:30 +01:00
|
|
|
)
|
2021-05-13 02:50:42 +02:00
|
|
|
lines = [ZULIP_VERSION, ""]
|
2019-04-21 05:51:20 +02:00
|
|
|
if os.path.exists(zulip_git_version_file):
|
|
|
|
with open(zulip_git_version_file) as f:
|
2023-01-26 00:12:09 +01:00
|
|
|
lines = [*f, "", ""]
|
2021-05-13 02:50:42 +02:00
|
|
|
ZULIP_VERSION = lines.pop(0).strip()
|
|
|
|
ZULIP_MERGE_BASE = lines.pop(0).strip()
|
2019-04-21 05:51:20 +02:00
|
|
|
|
2022-11-17 20:21:05 +01:00
|
|
|
LATEST_MAJOR_VERSION = "6.0"
|
2023-01-23 19:52:47 +01:00
|
|
|
LATEST_RELEASE_VERSION = "6.1"
|
2022-11-17 20:21:05 +01:00
|
|
|
LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.com/2022/11/17/zulip-6-0-released/"
|
2017-11-16 21:40:36 +01:00
|
|
|
|
2020-04-01 22:11:26 +02:00
|
|
|
# Versions of the desktop app below DESKTOP_MINIMUM_VERSION will be
|
|
|
|
# prevented from connecting to the Zulip server. Versions above
|
|
|
|
# DESKTOP_MINIMUM_VERSION but below DESKTOP_WARNING_VERSION will have
|
|
|
|
# a banner at the top of the page asking the user to upgrade.
|
2021-05-13 21:46:40 +02:00
|
|
|
DESKTOP_MINIMUM_VERSION = "5.2.0"
|
|
|
|
DESKTOP_WARNING_VERSION = "5.4.3"
|
2020-04-01 22:11:26 +02:00
|
|
|
|
2020-04-20 00:57:28 +02:00
|
|
|
# Bump the API_FEATURE_LEVEL whenever an API change is made
|
|
|
|
# that clients might want to condition on. If we forget at
|
|
|
|
# the time we make the change, then bump it later as soon
|
|
|
|
# as we notice; clients using API_FEATURE_LEVEL will just not
|
|
|
|
# use the new feature/API until the bump.
|
|
|
|
#
|
2020-04-29 05:55:42 +02:00
|
|
|
# Changes should be accompanied by documentation explaining what the
|
2023-01-31 12:11:45 +01:00
|
|
|
# new level means in api_docs/changelog.md, as well as "**Changes**"
|
|
|
|
# entries in the endpoint's documentation in `zulip.yaml`.
|
2023-04-21 14:58:36 +02:00
|
|
|
API_FEATURE_LEVEL = 176
|
2020-04-20 00:57:28 +02:00
|
|
|
|
2017-12-26 07:57:39 +01:00
|
|
|
# Bump the minor PROVISION_VERSION to indicate that folks should provision
|
|
|
|
# only when going from an old version of the code to a newer version. Bump
|
|
|
|
# the major version to indicate that folks should provision in both
|
|
|
|
# directions.
|
|
|
|
|
2019-07-22 04:00:19 +02:00
|
|
|
# Typically,
|
|
|
|
# * adding a dependency only requires a minor version bump;
|
|
|
|
# * removing a dependency requires a major version bump;
|
|
|
|
# * upgrading a dependency requires a major version bump, unless the
|
|
|
|
# upgraded dependency is backwards compatible with all of our
|
|
|
|
# historical commits sharing the same major version, in which case a
|
|
|
|
# minor version bump suffices.
|
2017-12-26 07:57:39 +01:00
|
|
|
|
linkifier: Support URL templates for linkifiers.
This swaps out url_format_string from all of our APIs and replaces it
with url_template. Note that the documentation changes in the following
commits will be squashed with this commit.
We change the "url_format" key to "url_template" for the
realm_linkifiers events in event_schema, along with updating
LinkifierDict. "url_template" is the name chosen to normalize
mixed usages of "url_format_string" and "url_format" throughout
the backend.
The markdown processor is updated to stop handling the format string
interpolation and delegate the task template expansion to the uri_template
library instead.
This change affects many test cases. We mostly just replace "%(name)s"
with "{name}", "url_format_string" with "url_template" to make sure that
they still pass. There are some test cases dedicated for testing "%"
escaping, which aren't relevant anymore and are subject to removal.
But for now we keep most of them as-is, and make sure that "%" is always
escaped since we do not use it for variable substitution any more.
Since url_format_string is not populated anymore, a migration is created
to remove this field entirely, and make url_template non-nullable since
we will always populate it. Note that it is possible to have
url_template being null after migration 0422 and before 0424, but
in practice, url_template will not be None after backfilling and the
backend now is always setting url_template.
With the removal of url_format_string, RealmFilter model will now be cleaned
with URL template checks, and the old checks for escapes are removed.
We also modified RealmFilter.clean to skip the validation when the
url_template is invalid. This avoids raising mulitple ValidationError's
when calling full_clean on a linkifier. But we might eventually want to
have a more centric approach to data validation instead of having
the same validation in both the clean method and the validator.
Fixes #23124.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-05 20:55:31 +02:00
|
|
|
PROVISION_VERSION = (234, 0)
|