Hi all,
I have noticed a "new" issue in Wine Staging that I believe must have found its way into it in the October to November time frame.
I am heavily using CPython on top of Wine. When Python imports modules, it looks for them in certain paths, specified in `sys.path`. For development, it is common practise to symlink a package's folder from e.g. a git repo into one of the folders contained in `sys.path`, usually `site-packages`. Python then happily imports the module from there for e.g. testing. Many tools are built around this workflow.
This used to work with Wine Staging until about September and still works with stable releases of Wine 7. However, in recent versions of Wine Staging, 7.22 and 8.0-rc2, the import fails:
``` Traceback (most recent call last): File "<string>", line 1, in <module> File "Z:\work\bar__init__.py", line 1, in <module> from .subbar import funcbar ModuleNotFoundError: No module named 'bar.subbar' ```
Python's module import mechanism appears to follow the symlink correctly (into module "bar") but fails to "locate" stuff within the linked folder (submodule "bar.subbar"). Other Python code can at least correctly navigate the linked folder's contents, so I am suspecting a `stat` syscall of some kind to return unusual values.
Python's import mechanism was rewritten recently, so only versions prior to Python 3.10 appear to be affected. Many packages support down to 3.7 at the moment.
A minimal reproducer, all steps included: https://gist.github.com/s-m-e/84d5fbf5663825a46d9ae98e4636d8ec
Wine builds from dl.winehq.org/wine-builds/ubuntu on Ubuntu 22.04.
I am not sure what I am looking for. How would I debug this from Wine's side or, in other words, what am I looking for in Wine's logs? Is there something that I can try as a workaround (other than going back to older versions of Wine)?
Thanks, Sebastian