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

fails on test_setuptools_prepare_metadata_for_build_wheel with Python 3.9 #77

Closed
mcepl opened this issue May 5, 2023 · 1 comment · Fixed by #95
Closed

fails on test_setuptools_prepare_metadata_for_build_wheel with Python 3.9 #77

mcepl opened this issue May 5, 2023 · 1 comment · Fixed by #95

Comments

@mcepl
Copy link

mcepl commented May 5, 2023

assert values == ["requests (>2)", "magic (>3)"]

Tests passes with 3.10, but not with 3.9:

[   12s] _______________ test_setuptools_prepare_metadata_for_build_wheel _______________
[   12s] 
[   12s] frontend_setuptools = <pyproject_api._via_fresh_subprocess.SubprocessFrontend object at 0x7fba9b7caa90>
[   12s] tmp_path = PosixPath('/tmp/pytest-of-abuild/pytest-13/test_setuptools_prepare_metada0')
[   12s] 
[   12s]     def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: SubprocessFrontend, tmp_path: Path) -> None:
[   12s]         meta = tmp_path / "meta"
[   12s]         result = frontend_setuptools.prepare_metadata_for_build_wheel(metadata_directory=meta)
[   12s]         dist = Distribution.at(str(result.metadata))
[   12s]         assert list(dist.entry_points) == [EntryPoint(name="demo_exe", value="demo:a", group="console_scripts")]
[   12s]         assert dist.version == "1.0"
[   12s]         assert dist.metadata["Name"] == "demo"
[   12s]         values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"]  # type: ignore
[   12s]         # ignore because "PackageMetadata" has no attribute "items"
[   12s] >       assert values == ["requests (>2)", "magic (>3)"]
[   12s] E       AssertionError: assert ['magic (>3)'...equests (>2)'] == ['requests (>... 'magic (>3)']
[   12s] E         At index 0 diff: 'magic (>3)' != 'requests (>2)'
[   12s] E         Full diff:
[   12s] E         - ['requests (>2)', 'magic (>3)']
[   12s] E         + ['magic (>3)', 'requests (>2)']

Complete build log with all details of versions of packages used and steps taken to reproduce.

@gaborbernat
Copy link
Member

PR welcome 🤗

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