Due to #2931, this project bumped to pypy 3.7. I'd always been under the assumpting that "pypy3" would always get the latest stable version of PyPy3 available, but I was wrong.
After bumping to pypy-3.7, CI is now failing in the test_editable_prefix test with the error:
E TypeError: argument of type 'WindowsPath' is not iterable
Full error is:
_____________________ TestNamespaces.test_editable_prefix _____________________
[gw1] win32 -- Python 3.7.9 D:\a\setuptools\setuptools\.tox\python\Scripts\python.EXE
self = <setuptools.tests.test_develop.TestNamespaces object at 0x0000022E4DB54848>
tmp_path = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-unknown/pytest-0/popen-gw1/test_editable_prefix0')
sample_project = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-unknown/pytest-0/popen-gw1/test_editable_prefix0/sampleproject')
@pytest.mark.xfail(
platform.python_implementation() == 'PyPy',
reason="Workaround fails on PyPy (why?)",
)
def test_editable_prefix(self, tmp_path, sample_project):
"""
Editable install to a prefix should be discoverable.
"""
prefix = tmp_path / 'prefix'
prefix.mkdir()
# figure out where pip will likely install the package
site_packages = prefix / next(
pathlib.Path(path).relative_to(sys.prefix)
for path in sys.path
if 'site-packages' in path and path.startswith(sys.prefix)
)
# install the workaround
self.install_workaround(site_packages)
env = dict(os.environ, PYTHONPATH=str(site_packages))
4) Backslashes are interpreted literally, unless they
immediately precede a double quotation mark.
5) If backslashes immediately precede a double quotation mark,
every pair of backslashes is interpreted as a literal
backslash. If the number of backslashes is odd, the last
backslash escapes the next double quotation mark as
described in rule 3.
"""
# See
# http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
# or search http://msdn.microsoft.com for
# "Parsing C++ Command-Line Arguments"
result = []
needquote = False
for arg in seq:
bs_buf = []
# Add a space to separate this argument from the others
if result:
result.append(' ')
> needquote = (" " in arg) or ("\t" in arg) or not arg
E TypeError: argument of type 'WindowsPath' is not iterable
C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\subprocess.py:555: TypeError
---------------------------- Captured stderr setup ----------------------------
Cloning into 'sampleproject'...
---------------------------- Captured stdout call -----------------------------
Obtaining file:///C:/Users/runneradmin/AppData/Local/Temp/pytest-of-unknown/pytest-0/popen-gw1/test_editable_prefix0/sampleproject
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting peppercorn
Downloading peppercorn-0.6-py3-none-any.whl (4.8 kB)
Installing collected packages: peppercorn, sampleproject
Running setup.py develop for sampleproject
Successfully installed peppercorn-0.6 sampleproject-2.0.0
Seems the workaround in the test isn't selecting exactly the right environments.
Due to #2931, this project bumped to pypy 3.7. I'd always been under the assumpting that "pypy3" would always get the latest stable version of PyPy3 available, but I was wrong.After bumping to pypy-3.7, CI is now failing in the test_editable_prefix test with the error:
Full error is:
Seems the workaround in the test isn't selecting exactly the right environments.