Skip to content

Commit

Permalink
Build: pin pip as workaround
Browse files Browse the repository at this point in the history
Latest pip version is failing wit

```
ERROR: Exception:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/qtile/envs/3274/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/qtile/envs/3274/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/qtile/envs/3274/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 389, in run
    to_install = resolver.get_installation_order(requirement_set)
  File "/home/docs/checkouts/readthedocs.org/user_builds/qtile/envs/3274/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 190, in get_installation_order
    expected_node_count=len(self._result.mapping) + 1,
  File "/home/docs/checkouts/readthedocs.org/user_builds/qtile/envs/3274/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 276, in get_topological_weights
    assert len(weights) == expected_node_count
AssertionError
```

By pining it to the previous version we can make builds to workaround this issue
and keep building docs successfully.

See #8864
  • Loading branch information
humitos committed Jan 31, 2022
1 parent e7102a4 commit 0edcbfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common
8 changes: 7 additions & 1 deletion readthedocs/doc_builder/python_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,13 @@ def install_core_requirements(self):
Feature.DONT_INSTALL_LATEST_PIP,
# 20.3 uses the new resolver by default.
positive='pip<20.3',
negative='pip',

# We are pinning pip to 21.3.1 because builds are failing when
# using a newer version. This is a temporal workaround to avoid
# builds failing at this step, but we should come back to this and
# unpin pip for this case.
# https://github.com/readthedocs/readthedocs.org/issues/8864#issuecomment-1025499598
negative='pip==21.3.1',
)
cmd = pip_install_cmd + [pip_version, 'setuptools<58.3.0']
self.build_env.run(
Expand Down

0 comments on commit 0edcbfd

Please sign in to comment.