| Summary: | REGRESSION(261097@main) [Win] test-webkitpy: Failed to install pytest-asyncio-0.20.3! | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> |
| Component: | Tools / Tests | Assignee: | Fujii Hironori <Hironori.Fujii> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Fujii Hironori
2023-03-05 17:40:55 PST
There are two problems. setup.cfg of pytest-asyncio-0.20.3 is using attr for version. > version = attr: pytest_asyncio.__version__ https://github.com/pytest-dev/pytest-asyncio/blob/v0.20.3/setup.cfg#L3 So, setuptools tries to load pytest_asyncio. It imports pytest. But, it fails to load pytest because pytest isn't installed yet. > import pytest https://github.com/pytest-dev/pytest-asyncio/blob/v0.20.3/pytest_asyncio/plugin.py#L27 On Linux, however, setuptools doen't try to load pytest_asyncio because it already knows version. https://github.com/pypa/setuptools/blob/v56.0.0/setuptools/config.py#L213-L214 This is a test program. > import setuptools > print(setuptools.__version__) > dist = setuptools.Distribution() > print(dist.metadata.version) Use WebKit's autoinstalled setuptools: > export PYTHONPATH=/webkit/Tools/Scripts/libraries/autoinstalled/python-3-x86_64 Unpack pytest-asyncio-0.20.3.tar.gz, and place the test program in the top directory that has setup.cfg. And, invoke 'python test.py' With Windows Python, it doesn't know the dist.metadata.version. > 56.0.0 > None With Linux Python, it knows the dist.metadata.version. > 56.0.0 > 0.20.3 I don't know the reason of this difference. Pull request: https://github.com/WebKit/WebKit/pull/11150 Committed 261341@main (8fd5bfebd3eb): <https://commits.webkit.org/261341@main> Reviewed commits have been landed. Closing PR #11150 and removing active labels. |