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

Integration tests failing on kiwisolver. #3448

Closed
jaraco opened this issue Jul 14, 2022 · 4 comments
Closed

Integration tests failing on kiwisolver. #3448

jaraco opened this issue Jul 14, 2022 · 4 comments

Comments

@jaraco
Copy link
Member

jaraco commented Jul 14, 2022

In the latest release, the integration tests failed.

_____________________ test_install_sdist[kiwisolver-1.3.2] _____________________
package = 'kiwisolver', version = '1.3.2'
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_install_sdist_kiwisolver_0')
venv_python = '/tmp/pytest-of-runner/pytest-0/test_install_sdist_kiwisolver_0/.venv/bin/python'
setuptools_wheel = PosixPath('/tmp/pytest-of-runner/pytest-0/wheel_build/setuptools-63.2.0.post20220713-py3-none-any.whl')
    @pytest.mark.parametrize('package, version', EXAMPLES)
    @pytest.mark.uses_network
    def test_install_sdist(package, version, tmp_path, venv_python, setuptools_wheel):
        venv_pip = (venv_python, "-m", "pip")
>       sdist = retrieve_sdist(package, version, tmp_path)
setuptools/tests/integration/test_pip_install_sdist.py:118: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
setuptools/tests/integration/test_pip_install_sdist.py:145: in retrieve_sdist
    dist = retrieve_pypi_sdist_metadata(package, version)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
package = 'kiwisolver', version = '1.3.2'
    def retrieve_pypi_sdist_metadata(package, version):
        # https://warehouse.pypa.io/api-reference/json.html
        id_ = package if version is LATEST else f"{package}/{version}"
        with urlopen(f"[https://pypi.org/pypi/{id_}/json](https://pypi.org/pypi/%7Bid_%7D/json)") as f:
            metadata = json.load(f)
        if metadata["info"]["yanked"]:
            raise ValueError(f"Release for {package} {version} was yanked")
        version = metadata["info"]["version"]
>       release = metadata["releases"][version]
E       KeyError: 'releases'
@jaraco
Copy link
Member Author

jaraco commented Jul 14, 2022

I tried to replicate the issue locally, so I ran tox -e integration -- -k kiwisolver, but that execution failed because of the way the integration tests are configured in tox.ini:

setuptools/tox.ini

Lines 32 to 33 in f747e8b

commands =
pytest --integration {posargs:-vv --durations=10 setuptools/tests/integration}

Passing any posargs causes setuptools/tests/integration to be omitted from the args.

Moving that phrase outside the "default args" works around that issue and I'm able to replicate the failure.

@jaraco
Copy link
Member Author

jaraco commented Jul 14, 2022

I suspect something change about API of warehouse that affects the way version-specific releases are referenced. kiwisolver is the only one that doesn't specify LATEST.

@jaraco
Copy link
Member Author

jaraco commented Jul 14, 2022

Confirmed the breaking change was intentional: pypi/warehouse#11775

@jaraco jaraco closed this as completed in 6a1782a Jul 14, 2022
@jaraco
Copy link
Member Author

jaraco commented Jul 14, 2022

I manually cut the v63.2.0 release.

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

1 participant