[Webkit-unassigned] [Bug 253421] REGRESSION(261097 at main) [Win] test-webkitpy: Failed to install pytest-asyncio-0.20.3!
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 6 19:26:52 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=253421
--- Comment #1 from Fujii Hironori <Hironori.Fujii at sony.com> ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230307/aaccd987/attachment-0001.htm>
More information about the webkit-unassigned
mailing list