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

test_explicit_export_topologically_sorted[random_string-True] fails #3376

Closed
jjerphan opened this issue Jul 31, 2024 · 2 comments · Fixed by #3377
Closed

test_explicit_export_topologically_sorted[random_string-True] fails #3376

jjerphan opened this issue Jul 31, 2024 · 2 comments · Fixed by #3377

Comments

@jjerphan
Copy link
Member

jjerphan commented Jul 31, 2024

conda-forge/pip-feedstock#121 released pip 24.1.2 a few hours ago:

diff --git 1/before 2/after
index 12c27c0..e041a48 100644
--- 1/before
+++ 2/after
@@ -111,7 +111,7 @@ openssl                               3.3.1         h4bc722e_2          conda-fo
 packaging                             24.1          pyhd8ed1ab_0        conda-forge
 passlib                               1.7.4         pyhd8ed1ab_1        conda-forge
 pep517                                0.13.0        pyhd8ed1ab_0        conda-forge
-pip                                   24.0          pyhd8ed1ab_0        conda-forge
+pip                                   24.1.2        pyhd8ed1ab_0        conda-forge
 pkg-config                            0.29.2        h4bc722e_1009       conda-forge
 platformdirs                          4.2.2         pyhd8ed1ab_0        conda-forge
 pluggy                                1.5.0         pyhd8ed1ab_0        conda-forge

since then, one test for topological sort fails:


=================================== FAILURES ===================================
________ test_explicit_export_topologically_sorted[random_string-True] _________

tmp_home = PosixPath('/tmp/pytest-of-runner/pytest-0/home0')
tmp_prefix = PosixPath('/tmp/pytest-of-runner/pytest-0/mamba0/envs/JYE54UB9P4')

    @pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
    def test_explicit_export_topologically_sorted(tmp_home, tmp_prefix):
        """Explicit export must have dependencies before dependent packages."""
        helpers.install("python=3.10", "pip", "jupyterlab")
        lines = helpers.run_env("export", "--explicit").splitlines()
    
        indices = {
            "libzlib": 0,
            "python": 0,
            "wheel": 0,
            "pip": 0,
            "jupyterlab": 0,
        }
        for i, line in enumerate(lines):
            for pkg in indices.keys():
                if pkg in line:
                    indices[pkg] = i
    
        assert indices["libzlib"] < indices["python"]
>       assert indices["python"] < indices["wheel"]
E       assert 122 < 0

First observed in #3375.

@jjerphan jjerphan changed the title pip 24.1.2 breaks test_explicit_export_topologically_sorted[random_string-True] test_explicit_export_topologically_sorted[random_string-True] fails Jul 31, 2024
@jjerphan
Copy link
Member Author

jjerphan commented Jul 31, 2024

Based on 66b4ac4's runs, the failure seems unrelated to the latest release of pip.

@jjerphan
Copy link
Member Author

I can reproduce the issue up to bdae0a1 with pip 23.3.2. I stopped at this commit, and I have not continued, I suspect the error originates from something else (I would have been reported earlier if it was due to a regression in a previous commit, I think).

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

Successfully merging a pull request may close this issue.

1 participant