Skip to content

Pinned PyYAML version incompatible with latest Cython 3.0.0 #324

Closed
@frenck

Description

@frenck

Describe the bug

pip install with everything latest greatest in a clean environment will pull in cython 3.0.0, which will not work with the PyYAML version pinned by this project.

#9 24.58 Collecting PyYAML<6.0,>=5.4
#9 24.60   Downloading PyYAML-5.4.1.tar.gz (175 kB)
#9 24.60      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 200.7 MB/s eta 0:00:00
#9 24.76   Installing build dependencies: started
#9 29.20   Installing build dependencies: finished with status 'done'
#9 29.21   Getting requirements to build wheel: started
#9 29.45   Getting requirements to build wheel: finished with status 'error'
#9 29.46   error: subprocess-exited-with-error
#9 29.46   
#9 29.46   × Getting requirements to build wheel did not run successfully.
#9 29.46   │ exit code: 1
#9 29.46   ╰─> [68 lines of output]
#9 29.46       /tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
#9 29.46       !!
#9 29.46       
#9 29.46               ********************************************************************************
#9 29.46               The license_file parameter is deprecated, use license_files instead.
#9 29.46       
#9 29.46               By 2023-Oct-30, you need to update your project and remove deprecated calls
#9 29.46               or your builds will no longer be supported.
#9 29.46       
#9 29.46               See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
#9 29.46               ********************************************************************************
#9 29.46       
#9 29.46       !!
#9 29.46         parsed = self.parsers.get(option_name, lambda x: x)(value)
#9 29.46       running egg_info
#9 29.46       writing lib3/PyYAML.egg-info/PKG-INFO
#9 29.46       writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
#9 29.46       writing top-level names to lib3/PyYAML.egg-info/top_level.txt
#9 29.46       Traceback (most recent call last):
#9 29.46         File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#9 29.46           main()
#9 29.46         File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#9 29.46           json_out['return_val'] = hook(**hook_input['kwargs'])
#9 29.46                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#9 29.46         File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#9 29.46           return hook(config_settings)
#9 29.46                  ^^^^^^^^^^^^^^^^^^^^^
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
#9 29.46           return self._get_build_requires(config_settings, requirements=['wheel'])
#9 29.46                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
#9 29.46           self.run_setup()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
#9 29.46           exec(code, locals())
#9 29.46         File "<string>", line 271, in <module>
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
#9 29.46           return distutils.core.setup(**attrs)
#9 29.46                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
#9 29.46           return run_commands(dist)
#9 29.46                  ^^^^^^^^^^^^^^^^^^
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
#9 29.46           dist.run_commands()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
#9 29.46           self.run_command(cmd)
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
#9 29.46           super().run_command(command)
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#9 29.46           cmd_obj.run()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
#9 29.46           self.find_sources()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line [322](https://github.com/hassio-addons/addon-mqtt-io/actions/runs/5591727199/jobs/10223217322#step:10:326), in find_sources
#9 29.46           mm.run()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
#9 29.46           self.add_defaults()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
#9 29.46           sdist.add_defaults(self)
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
#9 29.46           super().add_defaults()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
#9 29.46           self._add_defaults_ext()
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
#9 29.46           self.filelist.extend(build_ext.get_source_files())
#9 29.46                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#9 29.46         File "<string>", line 201, in get_source_files
#9 29.46         File "/tmp/pip-build-env-7f1pbprl/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
#9 29.46           raise AttributeError(attr)
#9 29.46       AttributeError: cython_sources
#9 29.46       [end of output]
#9 29.46   
#9 29.46   note: This error originates from a subprocess, and is likely not a problem with pip.
#9 29.47 error: subprocess-exited-with-error
#9 29.47 
#9 29.47 × Getting requirements to build wheel did not run successfully.
#9 29.47 │ exit code: 1
#9 29.47 ╰─> See above for output.
#9 29.47

Expected behavior

To be able to install.

Error messages and traceback

See above

Config

Not relevant.

Hardware

  • Platform: Any
  • Connected hardware: Not relevant

System:

  • OS: Any
  • Python version: Python 3.11
  • User you're running as: Irrelevant
  • Using a virtualenv?: yes

Additional context

This issue has been solved in PyYAML 6.0.1

Changelog: https://github.com/yaml/pyyaml/blob/6.0.1/CHANGES#L7
Ref: yaml/pyyaml@6.0...6.0.1

Possible solutions

  • Update PyYAML to be at least 6.0.1 or newer
  • If that is not possible, pinning cython dep to < 3.0 in this project might be a workaround

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions