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

1.7.2: test_setuptools_prepare_metadata_for_build_wheel fails #153

Open
mtelka opened this issue Sep 18, 2024 · 2 comments
Open

1.7.2: test_setuptools_prepare_metadata_for_build_wheel fails #153

mtelka opened this issue Sep 18, 2024 · 2 comments

Comments

@mtelka
Copy link

mtelka commented Sep 18, 2024

_______________ test_setuptools_prepare_metadata_for_build_wheel _______________

frontend_setuptools = <pyproject_api._via_fresh_subprocess.SubprocessFrontend object at 0x7fffad561a30>
tmp_path = PosixPath('/tmp/pytest-of-marcel/pytest-21/test_setuptools_prepare_metada0')

    def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: SubprocessFrontend, tmp_path: Path) -> None:
        meta = tmp_path / "meta"
        result = frontend_setuptools.prepare_metadata_for_build_wheel(metadata_directory=meta)
        assert result is not None
        dist = Distribution.at(str(result.metadata))
        assert list(dist.entry_points) == [EntryPoint(name="demo_exe", value="demo:a", group="console_scripts")]
        assert dist.version == "1.0"
        assert dist.metadata["Name"] == "demo"
        values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"]  # type: ignore[attr-defined]
        # ignore because "PackageMetadata" has no attribute "items"
>       assert sorted(values) == ["magic >3", "requests >2"]
E       AssertionError: assert ['magic>3', 'requests>2'] == ['magic >3', 'requests >2']
E
E         At index 0 diff: 'magic>3' != 'magic >3'
E
E         Full diff:
E           [
E         -     'magic >3',
E         ?           -
E         +     'magic>3',
E         -     'requests >2',
E         ?              -
E         +     'requests>2',
E           ]

tests/test_frontend_setuptools.py:76: AssertionError

To reproduce:

  1. download 1.7.2 sdist
  2. unpack it
  3. run tox -e py39
@paravoid
Copy link
Contributor

Came across this while updating the Debian package too. It's broken by a newer version of setuptools (or at least in the Debian package of it).

Good: 70.3.0
Bad: 72.2.0, 73.0.1, 74.1.2

@dvzrv
Copy link

dvzrv commented Sep 22, 2024

Also ran into this on Arch Linux and we have a somewhat ancient setuptools (69.5.1).

I will disable this test as I guess this isn't really protect against what it's supposed to protect against 🤔

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

3 participants