Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds failing since pip update to 22.0 and 22.0.1 #8864

Closed
elParaguayo opened this issue Jan 30, 2022 · 11 comments
Closed

Builds failing since pip update to 22.0 and 22.0.1 #8864

elParaguayo opened this issue Jan 30, 2022 · 11 comments

Comments

@elParaguayo
Copy link

Description

Hi there,

I'm one of the maintainers for Qtile (https://www.github.com/qtile/qtile).

I've noticed that our docs (hosted by ReadTheDocs) have begun failing to build.

The error message is:

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

The first failure (https://readthedocs.org/projects/qtile/builds/15928125/) was the first build following the release of 22.0.

The most recent failure (https://readthedocs.org/projects/qtile/builds/15931046/) also fails on 22.0.1.

Expected behavior

Documents should build successfully.

I'm not aware of any other changes that would have impacted the building of our docs.

Would appreciate any support here.

I believe this is a pip issue, so I've posted an issue on their page too: pypa/pip#10851

@boxed
Copy link

boxed commented Jan 31, 2022

I also have this problem.

I've been searching a long while now for a way to set pip version to the version before it broke, but I can't seem how to do that. It seems like there are two problem here:

  1. pip broke
  2. rtd projects can't work around it with a specific version of pip

@prisae
Copy link

prisae commented Jan 31, 2022

+1 - I am having the same issue.

@yurabysaha
Copy link

+1 - Same issue for 22.0.2

@naturalett
Copy link

It solved me the issue:

pip install -r requirements.txt --use-deprecated=html5lib --use-deprecated=legacy-resolver

@humitos
Copy link
Member

humitos commented Jan 31, 2022

Thanks for reporting this issue. I read pypa/pip#10851 and it seems that it's a problem related to pip itself. I'm not sure yet if there is something that Read the Docs can do as a workaround to avoid this problem now. However, we will be taking a look at this and following that issue to understand the problem better and see if there is something we can do from our side.

I followed the steps from this comment and I was able to reproduce it pypa/pip#10851 (comment)

However, downgrading pip to 21.3.1 (pip install -U pip==21.3.1) I was able to install the dependencies without issues. So, maybe Read the Docs could pin pip to that version.

@humitos
Copy link
Member

humitos commented Jan 31, 2022

By pining pip in my local RTD instance, I was able to build qtile/qtile@99e39b2 properly. So, that could be a temporal solution we can implement.

humitos added a commit that referenced this issue Jan 31, 2022
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
humitos added a commit that referenced this issue Jan 31, 2022
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
humitos added a commit that referenced this issue Jan 31, 2022
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
humitos added a commit that referenced this issue Jan 31, 2022
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
humitos added a commit that referenced this issue Jan 31, 2022
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
@humitos
Copy link
Member

humitos commented Jan 31, 2022

@elParaguayo @yurabysaha @prisae @boxed @naturalett Hi! I just deployed a quick hotfix that pins pip==21.3.1 as a workaround for now. Can you confirm me that your documentation is building successfully now?

I triggered a build for qtile at https://readthedocs.org/projects/qtile/builds/15935061/ for the latest version and I did passed. So, I assume the rest of the projects should build properly as well.

@prisae
Copy link

prisae commented Jan 31, 2022

Tested it already, works perfectly now, thanks!

@boxed
Copy link

boxed commented Jan 31, 2022

Yep. Works now. Thanks for the super fast turn around!

@elParaguayo
Copy link
Author

elParaguayo commented Jan 31, 2022

Works for me too (I know you tested our docs yourself but I submitted a new dummy PR to check for myself 😉). Thanks.

agjohnson added a commit that referenced this issue Feb 1, 2022
* Build: pin pip as workaround

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

* Change pip selector to `<=` to support py27

Co-authored-by: Anthony <aj@ohess.org>
@humitos
Copy link
Member

humitos commented Feb 1, 2022

I'm closing this issue for now since the problem is workarounded in Read the Docs and there is no more work required from our side. We will remove the pin once pip releases a new version without this... bug? Thanks you all for reporting and all the work you are doing to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants