# HG changeset patch
# User Matt Harbison <
matt_h...@yahoo.com>
# Date 1664984712 14400
# Wed Oct 05 11:45:12 2022 -0400
# Branch stable
# Node ID acfdfaf48d6fbb9bdcd8a0c922dfab0064c0b0b0
# Parent 8ef0493ff30adc38cd0dfd3e1a8d5cb5b2366af0
# EXP-Topic pin-pip
ci: pin pytype to 2022.03.29
Pytype depends on libcst, and the current version requires the Rust compiler, so
pytype wasn't running at all. Since new pytype releases randomly add false
positives or hangs, it's better to be explicit about the version anyway (and
this is the version and dependency pinned by Mercurial's pytype test).
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -89,7 +89,7 @@
script:
- apt-get update
- apt-get -y install python3-pyqt5 python3-pyqt5.qsci
- - pip3 install --user --upgrade pytype
+ - pip3 install --user --upgrade libcst==0.3.20 pytype==2022.03.29
- hg -R /ci/repos/mercurial pull
- hg -R /ci/repos/mercurial update stable
- hg -R /ci/repos/mercurial summary
@@ -102,7 +102,7 @@
script:
- apt-get update
- apt-get -y install python3-pyqt5 python3-pyqt5.qsci
- - pip3 install --user --upgrade pytype
+ - pip3 install --user --upgrade libcst==0.3.20 pytype==2022.03.29
- hg -R /ci/repos/mercurial pull
- hg -R /ci/repos/mercurial update default
- hg -R /ci/repos/mercurial summary
diff --git a/contrib/generate_gitlab_ci_yml.py b/contrib/generate_gitlab_ci_yml.py
--- a/contrib/generate_gitlab_ci_yml.py
+++ b/contrib/generate_gitlab_ci_yml.py
@@ -94,7 +94,9 @@
'image': docker_image_name(hgver, prebuilt_images),
'script': [
*gen_install_apt_dependencies(),
- f'pip3 install --user --upgrade pytype',
+ # Newer versions of libcst require rustc, so the docker images
+ # need to be updated to use a newer version of it.
+ 'pip3 install --user --upgrade libcst==0.3.20 pytype==2022.03.29',
*gen_update_to_mercurial_rev(hgver),
thg_make_command('local'),
# The following is a workaround for pytype's lack of support for