Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests are busted due to something with setuptools and ruamel.yaml #5515

Closed
beckermr opened this issue Oct 23, 2024 · 3 comments · Fixed by #5517
Closed

tests are busted due to something with setuptools and ruamel.yaml #5515

beckermr opened this issue Oct 23, 2024 · 3 comments · Fixed by #5517

Comments

@beckermr
Copy link
Contributor

IDK why, but the tests for conda skeleton are now breaking due to the removal of safe_dump in ruamel.yaml >=0.18.0.

see https://github.com/conda/conda-build/actions/runs/11484656642/job/31962986476

@zooba
Copy link

zooba commented Oct 25, 2024

I'm seeing the same thing in my own builds:

Traceback (most recent call last):
  File "/tmp/tmptxqm3_v0conda_skeleton_azure-eventgrid-4.5.0.zip/azure-eventgrid-4.5.0/setup.py", line 53, in <module>
    setup(
  File "/mnt/vss/_work/1/tools/envs/default/conda-bld/skeleton_1729848074618/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/vss/_work/1/tools/envs/default/conda-bld/skeleton_1729848074618/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 218, in setup
    fn.write(yaml.safe_dump(data, encoding=None))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/vss/_work/1/tools/envs/default/conda-bld/skeleton_1729848074618/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/site-packages/ruamel/yaml/main.py", line 1260, in safe_dump
    error_deprecation('safe_dump', 'dump', arg="typ='safe', pure=True")
  File "/mnt/vss/_work/1/tools/envs/default/conda-bld/skeleton_1729848074618/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
    raise AttributeError(s, name=None)
AttributeError: 
"safe_dump()" has been removed, use

  yaml = YAML(typ='safe', pure=True)
  yaml.dump(...)

instead of file "/mnt/vss/_work/1/tools/envs/default/conda-bld/skeleton_1729848074618/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 218

        fn.write(yaml.safe_dump(data, encoding=None))

I can't find the source of this code anywhere, so I have to assume conda-build/skeleton is doing some kind of patching.

Going to go look for a workaround (probably pinning ruamel somehow), but if this is coming from a patch then it'd be great to get it fixed upstream (wherever that is).

@beckermr
Copy link
Contributor Author

I think the issue is that some of the recipes in the tests need ruamel.yaml pinned.

@beckermr
Copy link
Contributor Author

NVM. I think I found it here: #5517

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants