This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Might one day incorporate other checks like #14742
- Loading branch information
David Robertson
committed
Jan 17, 2023
1 parent
b7137a2
commit b6fddbe
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/env python | ||
import sys | ||
|
||
if sys.version_info < (3, 11): | ||
raise RuntimeError("Requires at least Python 3.11, to import tomllib") | ||
|
||
import tomllib | ||
|
||
with open("poetry.lock", "rb") as f: | ||
lockfile = tomllib.load(f) | ||
|
||
try: | ||
lock_version = lockfile["metadata"]["lock-version"] | ||
assert lock_version == "2.0" | ||
except Exception: | ||
print( | ||
"""\ | ||
Lockfile is not version 2.0. You probably need to upgrade poetry on your local box | ||
and re-run `poetry lock --no-update`. See the Poetry cheat sheet at | ||
https://matrix-org.github.io/synapse/develop/development/dependencies.html | ||
""" | ||
) | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters