I downgraded PyYAML from 6.0.1 to 5.4.1 and all we...
# general
g
I downgraded PyYAML from 6.0.1 to 5.4.1 and all went to hell. Now all pex builds that include PyYAML fail. Any ideas? Is this a known issue?
I'm guessing it has to do with PyYAML not shipping as many compiled wheels for as many different versions python, but I don't know how to solve this issue.
Copy code
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Building 4 requirements for docs.datamodel/sphinx-apidoc.pex from the apps/pants.lock resolve: Sphinx<6.0.0,>=5.3.0, myst-parser<2.0.0,>=1.0.0, sphinx-pyreverse<0.0.18,>=0.0.17, sphinx-rtd-theme<2.0.0,>=1.1.1' failed with exit code 1.
stdout:

stderr:
There was 1 error downloading required artifacts:
1. pyyaml 5.4.1 from <https://altana-197271086086.d.codeartifact.us-east-1.amazonaws.com/pypi/altana/simple/pyyaml/5.4.1/PyYAML-5.4.1.tar.gz>
    note: This error originates from a subprocess, and is likely not a problem with pip.
b
Here are the wheels that do exist for PyYAML 5.4.1: https://pypi.org/project/PyYAML/5.4.1/#files What platforms do you get when you run:
Copy code
pex3 interpreter inspect --markers --tags
You could also try adding PyYAML to the
resolves_to_no_binary
mapping which would force using sdists for that package: https://www.pantsbuild.org/2.23/reference/subsystems/python#resolves_to_no_binary
1
g
macos.txt
I'm probably going to upgrade libs that require PyYAML <6 and then upgrade it again.
but these types of things are scary in the sense that if I actually needed PyYAML 5.x I don't know what the heck to do
b
It’s hard to say what the issue is, because we don’t know what the underlying error was - if you try fetching PyYAML from PyPI instead of CodeArtifact, does that work?
b
If I run
pip install pyyaml==5.4.1
on my arm macOS machine, I get build errors... so I wonder if that version of PyYAML fundamentally doesn't support this platform. The output I get has more info than what pex is surfacing, so it's unfortunate pex isn't making this obvious
👀 1
b
Hmm yeah, can reproduce it on Mac as well.
Copy code
File "/Users/krishnanchandra/Library/Caches/uv/.tmpsuxFrR/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
    self._add_defaults_ext()
  File "/Users/krishnanchandra/Library/Caches/uv/.tmpsuxFrR/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
    self.filelist.extend(build_ext.get_source_files())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 201, in get_source_files
  File "/Users/krishnanchandra/Library/Caches/uv/.tmpsuxFrR/.venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
    raise AttributeError(attr)
AttributeError: cython_sources
Interestingly, I was able to get
PyYAML==5.4.1
to install with Python 3.10 on Mac, but not with Python 3.12. So that might be another clue as to where the problem is.
g
yes, it looks like a known issue with 5.4.1