Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 695eb3c

Browse files
author
David Robertson
committed
Add suggestions missed when cherry-picking from #12337
1 parent d8bee66 commit 695eb3c

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

.ci/scripts/test_old_deps.sh

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,38 @@ export LANG="C.UTF-8"
2020
# Prevent virtualenv from auto-updating pip to an incompatible version
2121
export VIRTUALENV_NO_DOWNLOAD=1
2222

23+
# TODO: in the future, we could use an implementation of
24+
# https://github.com/python-poetry/poetry/issues/3527
25+
# https://github.com/pypa/pip/issues/8085
26+
# to select the lowest possible versions, rather than resorting to this sed script.
27+
2328
# Patch the project definitions in-place:
2429
# - Replace all lower and tilde bounds with exact bounds
25-
# - Make the pyopenssl 17.0, which is the oldest version that works with
26-
# a `cryptography` compiled against OpenSSL 1.1.
30+
# - Make the pyopenssl 17.0, which can work against an
31+
# OpenSSL 1.1 compiled cryptography (as older ones don't compile on Travis).
2732
# - Delete all lines referring to psycopg2 --- so no testing of postgres support.
2833
# - Omit systemd: we're not logging to journal here.
2934

30-
# TODO: we should also replace caret bounds, see
31-
# https://python-poetry.org/docs/dependency-specification/#version-constraints
32-
# We don't use these yet, but they are the default bound used when you `poetry add` from
33-
# the commandline, rather than editing pyproject.toml directly.
35+
# TODO: also replace caret bounds, see https://python-poetry.org/docs/dependency-specification/#version-constraints
36+
# We don't use these yet, but IIRC they are the default bound used when you `poetry add`.
3437
# The sed expression 's/\^/==/g' ought to do the trick. But it would also change
35-
# `python = "^3.7"` to `python = "==3.7"`, which would mean we fail because olddeps
38+
# `python = "^3.7"` to `python = "==3.7", which would mean we fail because olddeps
3639
# runs on 3.8 (#12343).
3740

38-
# TODO: I'd prefer to use something like this
39-
# https://github.com/python-poetry/poetry/issues/3527
40-
# https://github.com/pypa/pip/issues/8085
41-
# rather than this sed script.
42-
4341
sed -i-backup \
4442
-e "s/[~>]=/==/g" \
4543
-e "/psycopg2/d" \
4644
-e 's/pyOpenSSL = "==16.0.0"/pyOpenSSL = "==17.0.0"/' \
47-
-e '/psycopg2/d' \
4845
-e '/systemd/d' \
4946
pyproject.toml
5047

51-
# TODO: once pyproject.toml uses poetry-core as its build-system, we may be able to
52-
# simply `pip install .[all, test]` and run trial directly. (We would have to convince
53-
# ourselves that pip will refuse to install if the olddeps are incompatible with each
54-
# other: folklore contends that pip's resolver is more lax than poetry's.)
48+
# Use poetry to do the installation. This ensures that the versions are all mutually
49+
# compatible (as far the package metadata declares, anyway); pip's package resolver
50+
# is more lax.
5551
#
56-
# Until then, setuptools is the build system. That means we need to use `poetry` to
57-
# do the installation. `poetry lock` fails because of incompatibilities between dev
58-
# dependencies and old deps. Workaround this by removing dev dependencies entirely.
52+
# Rather than `poetry install --no-dev`, we drop all dev dependencies from the
53+
# toml file. This means we don't have to ensure compatibility between old deps and
54+
# dev tools.
5955

6056
pip install --user toml
6157

0 commit comments

Comments
 (0)