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

[bug] Failed to install to PyYaml due to Cython3.0 release #14319

Closed
wiccy46 opened this issue Jul 18, 2023 · 9 comments
Closed

[bug] Failed to install to PyYaml due to Cython3.0 release #14319

wiccy46 opened this issue Jul 18, 2023 · 9 comments
Assignees
Milestone

Comments

@wiccy46
Copy link

wiccy46 commented Jul 18, 2023

Environment details

  • Operating System+version: Mac OS X64
  • Compiler+version: clang13
  • Conan version: 1.59, 1.60
  • Python version: 3.10

With the recent update to Cython 3.0 (about a day) , pyyaml has not been able installed with the cython_source error:

This is a known issue in PyYaml: yaml/pyyaml#601, this pin PyYAML<=6.0,>=3.11 is not affected.

Also we find that the same issue has not affected our Apple silicon Arm64 build pipeline.

Steps to reproduce

pip install conan==1.59
or
pip install conan==1.60

Logs

[2023-07-18T11:56:07.861Z] + pip install --upgrade conan==1.60

[2023-07-18T11:56:08.250Z] Collecting conan==1.60

[2023-07-18T11:56:08.637Z]   Downloading https://UPSTREAMURL/packages/conan/1.60.0/conan-1.60.0.tar.gz (781 kB)

[2023-07-18T11:56:09.465Z] Collecting requests<3.0.0,>=2.25

[2023-07-18T11:56:09.465Z]   Using cached https://URL/packages/requests/2.31.0/requests-2.31.0-py3-none-any.whl (62 kB)

[2023-07-18T11:56:09.465Z] Collecting urllib3<1.27,>=1.26.6

[2023-07-18T11:56:09.465Z]   Using cached https://URL/packages/urllib3/1.26.16/urllib3-1.26.16-py2.py3-none-any.whl (143 kB)

[2023-07-18T11:56:09.851Z] Collecting colorama<0.5.0,>=0.3.3

[2023-07-18T11:56:09.851Z]   Using cached https://URL/packages/colorama/0.4.6/colorama-0.4.6-py2.py3-none-any.whl (25 kB)

[2023-07-18T11:56:10.243Z] Collecting PyYAML<=6.0,>=3.11

[2023-07-18T11:56:10.243Z]   Using cached https://UPSTREAMURL/packages/pyyaml/6.0/PyYAML-6.0.tar.gz (124 kB)

[2023-07-18T11:56:10.243Z]   Installing build dependencies: started

[2023-07-18T11:56:16.668Z]   Installing build dependencies: finished with status 'done'

[2023-07-18T11:56:16.668Z]   Getting requirements to build wheel: started

[2023-07-18T11:56:16.668Z]   Getting requirements to build wheel: finished with status 'error'

[2023-07-18T11:56:16.668Z]   ERROR: Command errored out with exit status 1:

[2023-07-18T11:56:16.668Z]    command: /Users/holoplot/build/workspace/Creative_-_Aura_PR-247/.pyenv-python3/bin/python3 /Users/holoplot/build/workspace/Creative_-_Aura_PR-247/.pyenv-python3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/tmpyiaxs77a

[2023-07-18T11:56:16.668Z]        cwd: /private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-install-fku7h4p0/pyyaml

[2023-07-18T11:56:16.668Z]   Complete output (48 lines):

[2023-07-18T11:56:16.668Z]   running egg_info

[2023-07-18T11:56:16.668Z]   writing lib/PyYAML.egg-info/PKG-INFO

[2023-07-18T11:56:16.668Z]   writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt

[2023-07-18T11:56:16.668Z]   writing top-level names to lib/PyYAML.egg-info/top_level.txt

[2023-07-18T11:56:16.668Z]   Traceback (most recent call last):

[2023-07-18T11:56:16.668Z]     File "/Users/holoplot/build/workspace/Creative_-_Aura_PR-247/.pyenv-python3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>

[2023-07-18T11:56:16.668Z]       main()

[2023-07-18T11:56:16.668Z]     File "/Users/holoplot/build/workspace/Creative_-_Aura_PR-247/.pyenv-python3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main

[2023-07-18T11:56:16.668Z]       json_out['return_val'] = hook(**hook_input['kwargs'])

[2023-07-18T11:56:16.668Z]     File "/Users/holoplot/build/workspace/Creative_-_Aura_PR-247/.pyenv-python3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel

[2023-07-18T11:56:16.668Z]       return hook(config_settings)

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel

[2023-07-18T11:56:16.668Z]       return self._get_build_requires(config_settings, requirements=['wheel'])

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires

[2023-07-18T11:56:16.668Z]       self.run_setup()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in run_setup

[2023-07-18T11:56:16.668Z]       exec(code, locals())

[2023-07-18T11:56:16.668Z]     File "<string>", line 288, in <module>

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup

[2023-07-18T11:56:16.668Z]       return distutils.core.setup(**attrs)

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup

[2023-07-18T11:56:16.668Z]       return run_commands(dist)

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands

[2023-07-18T11:56:16.668Z]       dist.run_commands()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands

[2023-07-18T11:56:16.668Z]       self.run_command(cmd)

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1234, in run_command

[2023-07-18T11:56:16.668Z]       super().run_command(command)

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command

[2023-07-18T11:56:16.668Z]       cmd_obj.run()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 314, in run

[2023-07-18T11:56:16.668Z]       self.find_sources()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 322, in find_sources

[2023-07-18T11:56:16.668Z]       mm.run()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 551, in run

[2023-07-18T11:56:16.668Z]       self.add_defaults()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults

[2023-07-18T11:56:16.668Z]       sdist.add_defaults(self)

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/command/sdist.py", line 104, in add_defaults

[2023-07-18T11:56:16.668Z]       super().add_defaults()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults

[2023-07-18T11:56:16.668Z]       self._add_defaults_ext()

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext

[2023-07-18T11:56:16.668Z]       self.filelist.extend(build_ext.get_source_files())

[2023-07-18T11:56:16.668Z]     File "<string>", line 204, in get_source_files

[2023-07-18T11:56:16.668Z]     File "/private/var/folders/85/kttx527j0gd5nytgsgyx5jgw0000gn/T/pip-build-env-69olgnk_/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__

[2023-07-18T11:56:16.668Z]       raise AttributeError(attr)

[2023-07-18T11:56:16.668Z]   AttributeError: cython_sources

[2023-07-18T11:56:16.668Z]   ----------------------------------------
@wiccy46 wiccy46 changed the title [bug] Failed to install due to PyYaml's Cython3.0 update [bug] Failed to install to PyYaml due to Cython3.0 release Jul 18, 2023
@memsharded memsharded self-assigned this Jul 18, 2023
@memsharded memsharded added this to the 1.61 milestone Jul 19, 2023
@memsharded
Copy link
Member

Closed by #14323

@petermbauer
Copy link

This also hits us on Windows with Python 3.10. Is there already a planned release date for 1.61.0?

@memsharded
Copy link
Member

But in theory @petermbauer this shouldn't be a blocker that needs for the next release to be fixed. The PR that closed this ticket is #14323, but Conan was already allowing PyYaml 6.0, that doesn't have that problem:

From #14323

Conan 1.59 and 1.60 already depends on PyYAML>=3.11, <=6.0, so they include the valid 6.0 version. The problem reported in #14319 affects to previous PyYAML<6 versions, but as long as the new, working one is included, it shouldn't be a blocker for new installations of Conan, and strictly forbidding PyYAML<6 probably is too much, as there are users that might want to force cython version and keep an older PyYAML version.

Are you experiencing some problem because PyYaml being installed in a fresh install is not 6.0?

@petermbauer
Copy link

I tried to use PyYAML 6.0.1 which fixes the issue present in 5.4.1 and 6.0.0 but the <=6.0 requirement does not seem to allow this.
I can re-check this tomorrow if you think it should work though.

@memsharded
Copy link
Member

I understood that only pyyaml < 6 had the issue, and we tried to reproduce in fresh installations and it was not an issue for us, but maybe we are missing some cases. Yes, please if you can give it a try and report, that would be very useful

@petermbauer
Copy link

I understood that only pyyaml < 6 had the issue, and we tried to reproduce in fresh installations and it was not an issue for us, but maybe we are missing some cases.

6.0.0 also has this issue, it was fixed with 6.0.1 then: yaml/pyyaml#724 (comment)
This is why <=6.0 is unfortunately too strict.

@memsharded
Copy link
Member

Ok, thanks very much for the feedback.
Lets try to release a Conan 1.60.2 with this fix then.

@memsharded memsharded reopened this Jul 24, 2023
@memsharded memsharded modified the milestones: 1.61, 1.60.2 Jul 24, 2023
@petermbauer
Copy link

I took a closer look and tried a few things out: PyYAML 6.0 does not contain the actual fix but it provides wheels for Python 3.10+3.11 so a possible workaround is to use PyYAML 6.0 for Python >=3.10 and PyYAML 5.4.1 for Python <3.10.
So, as it looks now, fortunately this does not block us anymore. Sorry for the noise!

czoido added a commit that referenced this issue Jul 25, 2023
Changelog: Fix: Allow Pyyaml 6.0.X versions to avoid cython 3.0
problems. (backport #14323)
Docs: Omit

Closes: #14319
@czoido
Copy link
Contributor

czoido commented Jul 25, 2023

Closed by #14363 will be released in Conan 1.60.2 very soon

@czoido czoido closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants