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

Pin Cython build constraint to < 3.0 #702

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

nitzmahone
Copy link
Member

@nitzmahone nitzmahone commented Mar 3, 2023

Temporary workaround for #601.

This is just a stopgap measure to ensure the libyaml extension build continues to function whenever Cython 3.0 is released (date TBD). We'll want to prioritize the extension build rewrite to ensure that PyYAML can support Python > 3.11, as I'd be amazed if they backport things to the Cython 0.x branch once 3.0 has released.

We should discuss if we want to just release this as 6.0.post1 or what, since there are no code changes to the actual library, just build/packaging metadata...

@keith
Copy link

keith commented Jul 17, 2023

Merging and releasing this would fix #601

@rahul-theorem
Copy link

Would it be possible to backport this fix to 5.x & release a hotfix as well? We're currently blocked on upgrading to pyyaml v6 (which we're hoping to resolve this week), but it'd be helpful for a few reasons to be able to pick this up in 5.4.2

@hssyoo
Copy link

hssyoo commented Jul 17, 2023

Hi @nitzmahone, the AWS CLI is also currently impacted by this (aws/aws-cli#8036). If we can get this PR merged and released as 6.0.1, it will resolve the issues faced by the AWS CLI and other impacted packages.

@DeanWay
Copy link

DeanWay commented Jul 17, 2023

This is just a stopgap measure to ensure the libyaml extension build continues to function whenever Cython 3.0 is released (date TBD).

Cython just released 3.0 so everything that has any kind of transitive dependency on PyYAML will now fail to install. This is now a necessary change.

@mharding-hpe
Copy link

This is causing a number of products in our organization to be unbuildable. Please consider this another plea for a quick merge and release of this now critical PR.

Copy link

@addyess addyess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just what we all need from pyyaml

@enmatt
Copy link

enmatt commented Jul 17, 2023

We've also been wrestling with this dependency issue this morning during our builds.

Copy link

@cgoessling cgoessling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be urgently appreciated.

@addyess
Copy link

addyess commented Jul 17, 2023

@ingydotnet, @xitology, and @perlpunk thanks for your quick review on this

@nitzmahone
Copy link
Member Author

Yep, I'll be doing a 6.0.1 release imminently to cover this (grumblesmurf that I somehow missed the Cython 3.0 release was actually happening since they've been in beta for so long).

No commitment to a 5.x backport/release, but if I can easily resurrect all the necessary wheel builds for it, I might consider it.

@antoniogomezalvarado
Copy link

antoniogomezalvarado commented Jul 17, 2023

For anyone that needs a quick fix for this do the following instead of installing PyYAML directly

git clone https://github.com/yaml/pyyaml.git && \
cd pyyaml && \
git checkout release/5.4.1 && \
sed -i.bak 's/Cython/Cython<3.0/g' pyproject.toml && \
python setup.py sdist && \
pip install --pre dist/PyYAML-5.4.1.tar.gz 

temeraire-cx pushed a commit to chaotic-cx/mesa-mirror that referenced this pull request Oct 25, 2023
Fixes an issue I am seeing on Fedora 39. For more details
about the upstream fix see yaml/pyyaml#702

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25878>
dhruvmanila added a commit to astral-sh/ruff that referenced this pull request Nov 3, 2023
bryan-bar added a commit to EnterpriseDB/edb-terraform that referenced this pull request Jan 16, 2024
- pyyaml <= 6.0.0 breaks when cython >= 3.0.0
  - release 6.0.1 sets a cython build-time constraint
    - [PR](yaml/pyyaml#702)
    - fix will not be [backported to 5.4 or lower](yaml/pyyaml#751)
- jinja major version constraint added
bryan-bar added a commit to EnterpriseDB/edb-terraform that referenced this pull request Jan 25, 2024
- pyyaml <= 6.0.0 breaks when cython >= 3.0.0
  - release 6.0.1 sets a cython build-time constraint
    - [PR](yaml/pyyaml#702)
    - fix will not be [backported to 5.4 or lower](yaml/pyyaml#751)
- jinja major version constraint added
mreso added a commit to pytorch/serve that referenced this pull request Feb 27, 2024
github-merge-queue bot pushed a commit to pytorch/serve that referenced this pull request Mar 6, 2024
* Remove install_dependencies from buld.sh call

* remove sudo from folly build

* Align cpp wf file with cpu wf file

* Make yaml statically linked dependency

* move cpp binaries to location based on ts.__file__

* Add FAQ to cpp readme

* Update readme to expect installed TS

* Fix libtorch install on mac

* Add cpp build faqs

* Remove llama.cpp as submodule and add through fetch_content

* Disable metal in llamacpp example

* Fix dangling pointer error in cpp worker

* Remove kineto from mac build

* Add llvm as mac cpp dependencies (req for clang-tidy)

* Enable fPIC for llama.cpp example

* Add sudo to clang-tidy link creation

* Add undefined symbol faq

* fix llv typo

* Add install from source to cpp_ci

* Correct install from source to cpp_ci

* bump up pyyaml version to avoid cython 3 issue yaml/pyyaml#702

* Move cpp ci to M1 mac

* Run workflow on self hosted runner

* Disable mac ci for cpp

* Fix workflow syntax

* Run on cpp-ci

* Remove sudo

* Add apt update for act docker

* print library_path in print_env_info.py

* print end in cpp ci workflow

* Run on github runner

* Add upterm session to workflow

* Move post mortem upterm session before build

* Remove first upterm session

* ci debugging

* Observe disk space

* move _build to /mnt on github runner

* fix permission denied

* use mount instead of ln

* Adjust llamacpp api

* Reactivate set -e

* Remove note on env variable in cpp readme

* Fix linting issue in print_env_info.py

* Cleanup ci-cpu-cpp.yml

* quieten wget

* Add build clean section in cpp/readme

* Readjust to llama.cpp api
noahp added a commit to noahp/connectedhomeip that referenced this pull request Apr 30, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
noahp added a commit to noahp/connectedhomeip that referenced this pull request Apr 30, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
noahp added a commit to noahp/connectedhomeip that referenced this pull request Apr 30, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
mergify bot pushed a commit to project-chip/connectedhomeip that referenced this pull request May 2, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
TheRealHaoLiu added a commit to TheRealHaoLiu/awx that referenced this pull request Jun 3, 2024
Avoid cython 3 due to yaml/pyyaml#702
TheRealHaoLiu added a commit to ansible/awx that referenced this pull request Jun 3, 2024
* Revert "Unpin cypthon (#15246)"

This reverts commit 659c3b6.

* Pin grpcio

Avoid cython 3 due to yaml/pyyaml#702

* Delete asyncpg.txt
raju-apple pushed a commit to raju-apple/connectedhomeip that referenced this pull request Jun 5, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
raju-apple pushed a commit to raju-apple/connectedhomeip that referenced this pull request Jun 5, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
andy31415 pushed a commit to project-chip/connectedhomeip that referenced this pull request Jun 6, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.

Co-authored-by: Noah Pendleton <2538614+noahp@users.noreply.github.com>
shubhamdp pushed a commit to shubhamdp/connectedhomeip that referenced this pull request Jun 21, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
agners pushed a commit to agners/connectedhomeip that referenced this pull request Jul 13, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.
yufengwangca pushed a commit to project-chip/connectedhomeip that referenced this pull request Jul 14, 2024
This updates 2 python packages to versions compatible with python3.12,
fixing the following errors when running
`./scripts/examples/gn_build_example.sh examples/chip-tool BUILDFOLDER`:

1. `pyyaml` 6.0 build error: `AttributeError: cython_sources`, fixed
   [here](yaml/pyyaml#702)
2. `construct` import error:

   ```
           File "/tmp/pip-install-ifgk4tul/construct_6d60304f85e249759f6c184ea89f1317/construct/core.py", line 3, in <module>
          import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
      ModuleNotFoundError: No module named 'imp'
   ```

   this was fixed
   [here](construct/construct@91cc0c6),
   in version `v2.10.57` of `construct`. I'm just
   updating to latest though.

Now running `./scripts/examples/gn_build_example.sh examples/chip-tool
BUILDFOLDER` succeeds when the host python is python3.12.

Co-authored-by: Noah Pendleton <2538614+noahp@users.noreply.github.com>
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
* Revert "Unpin cypthon (ansible#15246)"

This reverts commit 659c3b6.

* Pin grpcio

Avoid cython 3 due to yaml/pyyaml#702

* Delete asyncpg.txt
tushar5526 pushed a commit to tushar5526/lpci-mirror that referenced this pull request Oct 15, 2024
This fixes yaml/pyyaml#702, which was causing
errors when installing PyYAML.
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

Successfully merging this pull request may close these issues.