-
Notifications
You must be signed in to change notification settings - Fork 3k
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
22.0: assert len(weights) == expected_node_count AssertionError
#10851
Comments
This is likely related to #10574. /cc @mauritsvanrees in case they're interested! |
@elParaguayo Can you try creating a clean virtualenv, and running |
assert len(weights) == expected_node_count AssertionError
assert len(weights) == expected_node_count AssertionError
I tried that. I create a virtual environment with python 3.7, upgraded pip to latest and installed requirements. No error message. I was hoping to get the same error locally. |
Hmmm... Maybe this needs running the pip install commands that RTD runs before those?
It might be that already-installed packages are implicated. |
This started happening to me too. |
I am able to reproduce the error following these steps with a fresh virtual environment. Here are the steps specifically:
And the requirements file looks like this:
I have not been able to reproduce it using a single install or using download. I set a breakpoint where the asert statement is and I found:
|
I can't easily check the example, because installing Pillow fails due to missing The This one in BTW, if someone is looking for a workaround, you could try an extra option for |
FYI - ReadTheDocs are pinning pip to 21.3.1 for now. |
This was a fun little learning exercise with the debugger (I've removed the parts where I'm figuring out how to do this):
So "sphinxcontrib-websupport" is in the weights but not in the self._result.mapping. |
pip 22 is currently having issues with dependency installation (pypa/pip#10851) until it is resolved, we should disable explicit updating. if it takes longer to resolve, then we may need to explicitly enforce pip 21.3.1
See #9031, which also involved sphinxcontrib-websupport. |
* Temporarily Stop Updating pip pip 22 is currently having issues with dependency installation (pypa/pip#10851) until it is resolved, we should disable explicit updating. if it takes longer to resolve, then we may need to explicitly enforce pip 21.3.1 * Temporarily disable pip in merge_to_master
That looks horrendous... And given the steps required to produce this error it's probably a very similar issue. Perhaps the graph cleaning assumes you can't have nodes which are not descendants of the root node? Which appears like it can still be the case reading that issue? |
For completeness, this is also raised when running In previous releases of pip this would install the dependency defined by tox-gh. Removing tox from the install command solves this instance. |
I confirm that this can be reproduced with the original instructions of issue #9031. Updated for pip 22:
In this case, before calculating the topological weights:
Some ideas:
When I try the last idea, it works for |
The graph cleaning "trims" nodes that don't have any edges "out" of them. This makes it so that the graph is only left with cycles by the time we recursive That won't be affected by the root cause of this failure, which originates from |
This PR should fix it: #10867 |
With pip 22.0.2, I also see this error. With my PR it works again, resulting in an install of |
pip 22 is currently having issues with dependency installation (pypa/pip#10851) until it is resolved, we should disable explicit updating. if it takes longer to resolve, then we may need to explicitly enforce pip 21.3.1
pip 22 is currently having issues with dependency installation (pypa/pip#10851) until it is resolved, we should disable explicit updating. if it takes longer to resolve, then we may need to explicitly enforce pip 21.3.1
avoid broken pip versions due to pypa/pip#10851
So can anyone help me out with 22.0.3 |
This issue is closed. If you have a new issue with the latest version of pip (currently 22.0.3) you should report that new issue. |
Bumps [pip](https://github.com/pypa/pip) from 21.3.1 to 22.0.3. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p> <blockquote> <h1>22.0.3 (2022-02-03)</h1> <h2>Features</h2> <ul> <li>Print the exception via <code>rich.traceback</code>, when running with <code>--debug</code>. (<code>[#10791](pypa/pip#10791) <https://github.com/pypa/pip/issues/10791></code>_)</li> </ul> <h2>Bug Fixes</h2> <ul> <li> <p>Only calculate topological installation order, for packages that are going to be installed/upgraded.</p> <p>This fixes an <code>AssertionError</code> that occured when determining installation order, for a very specific combination of upgrading-already-installed-package + change of dependencies + fetching some packages from a package index. This combination was especially common in Read the Docs' builds. (<code>[#10851](pypa/pip#10851) <https://github.com/pypa/pip/issues/10851></code>_)</p> </li> <li> <p>Use <code>html.parser</code> by default, instead of falling back to <code>html5lib</code> when <code>--use-deprecated=html5lib</code> is not passed. (<code>[#10869](pypa/pip#10869) <https://github.com/pypa/pip/issues/10869></code>_)</p> </li> </ul> <h2>Improved Documentation</h2> <ul> <li>Clarify that using per-requirement overrides disables the usage of wheels. (<code>[#9674](pypa/pip#9674) <https://github.com/pypa/pip/issues/9674></code>_)</li> </ul> <h1>22.0.2 (2022-01-30)</h1> <h2>Deprecations and Removals</h2> <ul> <li>Instead of failing on index pages that use non-compliant HTML 5, print a deprecation warning and fall back to <code>html5lib</code>-based parsing for now. This simplifies the migration for non-compliant index pages, by letting such indexes function with a warning. (<code>[#10847](pypa/pip#10847) <https://github.com/pypa/pip/issues/10847></code>_)</li> </ul> <h1>22.0.1 (2022-01-30)</h1> <h2>Bug Fixes</h2> <ul> <li>Accept lowercase <code><!doctype html></code> on index pages. (<code>[#10844](pypa/pip#10844) <https://github.com/pypa/pip/issues/10844></code>_)</li> <li>Properly handle links parsed by html5lib, when using <code>--use-deprecated=html5lib</code>. (<code>[#10846](pypa/pip#10846) <https://github.com/pypa/pip/issues/10846></code>_)</li> </ul> <h1>22.0 (2022-01-29)</h1> <h2>Process</h2> <ul> <li>Completely replace :pypi:<code>tox</code> in our development workflow, with :pypi:<code>nox</code>.</li> </ul> <p>Deprecations and Removals</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/pip/commit/44018de50cafba25445a225c1a1986d6312e1ef3"><code>44018de</code></a> Bump for release</li> <li><a href="https://github.com/pypa/pip/commit/65f096c432d60d5f0214793becd592e1c1c3b624"><code>65f096c</code></a> Update AUTHORS.txt</li> <li><a href="https://github.com/pypa/pip/commit/7d50964bcb1b25f9fe2c49fe447ab58aad2b4247"><code>7d50964</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/10876">#10876</a> from mbacchi/vcs_support_typo</li> <li><a href="https://github.com/pypa/pip/commit/ff8dbb458a59905c5462d339a63536257aad497a"><code>ff8dbb4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/10867">#10867</a> from mauritsvanrees/maurits-topoligical-weights-req...</li> <li><a href="https://github.com/pypa/pip/commit/b3f5cad73241e25a25ce7d50eb9175dbafcfd8db"><code>b3f5cad</code></a> Update news/10851.bugfix.rst</li> <li><a href="https://github.com/pypa/pip/commit/cf4655f474cb8a04fa6b274ee0edaf774546a79b"><code>cf4655f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/10869">#10869</a> from pradyunsg/put-html5lib-behind-flag</li> <li><a href="https://github.com/pypa/pip/commit/3608b42ef0ab39a2d50335356644f8f3464f651a"><code>3608b42</code></a> Fix minor typo in vcs support doc</li> <li><a href="https://github.com/pypa/pip/commit/6c92a33b6e22f099edac8f4df594ffe6a18eb6e2"><code>6c92a33</code></a> Place the link as "context" instead of "Link:"</li> <li><a href="https://github.com/pypa/pip/commit/7a3b0f1ae1cc59ae6566694e47887728a7976ab9"><code>7a3b0f1</code></a> 📰</li> <li><a href="https://github.com/pypa/pip/commit/d7fed8fe9382c4f4442d7aa6216f41c8ed6f1ea3"><code>d7fed8f</code></a> Use rich.traceback with debug mode (<a href="https://github-redirect.dependabot.com/pypa/pip/issues/10832">#10832</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/21.3.1...22.0.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=21.3.1&new-version=22.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
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:
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.
pip version
22.0 and 22.0.1
Python version
3.7
OS
ReadTheDocs docker image - I think is Ubuntu 20.04
How to Reproduce
(Appreciate this isn't particularly helpful...)
Note: I cannot recreate locally. However, given that the failures started with 22.0 I can only assume it's caused by that. Unfortunately, I don't know what the error message means.
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: