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

PyYAML 6.0.1 doesn't build with Cython 3.0.0 + Python 3.11 #30

Closed
totaam opened this issue Aug 15, 2023 · 1 comment
Closed

PyYAML 6.0.1 doesn't build with Cython 3.0.0 + Python 3.11 #30

totaam opened this issue Aug 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 15, 2023

Amusing:
yaml/pyyaml#731 (comment)
and yaml/pyyaml#601

And there are serious CVEs in older versions.. ie: CVE-2020-14343
Some people claim that 6.0.1 fixes things.
It doesn't work here:

*** Building python3-yaml *** [92/138]
python3 setup.py build --build-base /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1
running build
running build_py
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/scanner.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/error.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/constructor.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/composer.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/events.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/__init__.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/representer.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/tokens.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/dumper.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/cyaml.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/parser.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/reader.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/loader.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/resolver.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/serializer.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/nodes.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
copying lib/yaml/emitter.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/yaml
creating /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/_yaml
copying lib/_yaml/__init__.py -> /Users/macos/.cache/jhbuild/build/PyYAML-6.0.1/lib.macosx-10.12-x86_64-cpython-311/_yaml
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
Traceback (most recent call last):
  File "/Users/macos/gtk/source/PyYAML-6.0.1/setup.py", line 289, in <module>
    setup(
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
    super().run_command(command)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/Users/macos/gtk/source/PyYAML-6.0.1/setup.py", line 191, in run
    _build_ext.run(self)
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/Users/macos/gtk/source/PyYAML-6.0.1/setup.py", line 233, in build_extensions
    ext.sources = self.cython_sources(ext.sources, ext)
                  ^^^^^^^^^^^^^^^^^^^
  File "/Users/macos/gtk/inst/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
    raise AttributeError(attr)
AttributeError: cython_sources
@totaam totaam added the bug Something isn't working label Aug 15, 2023
@totaam
Copy link
Collaborator Author

totaam commented Jan 3, 2024

There is a workaround which could be added as a patch if someone cared:
yaml/pyyaml#601 (comment)

From now on, the MacOS builds just won't have yaml, as that's easier.

@totaam totaam closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant