Skip to content

Commit

Permalink
Fixed PyYAML install issue due to Cython 3
Browse files Browse the repository at this point in the history
Details:

* Fixed issue with PyYAML 5.4 installation on Python>=3.10 that fails since
  the recent release of Cython 3.

Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed Jul 25, 2023
1 parent c3ed933 commit 2ca65cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
9 changes: 1 addition & 8 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,7 @@ dparse>=0.4.1,<0.5.0; python_version == '2.7'
# ver 0.6.2 min requirement by safety 2.2.0
dparse>=0.6.2; python_version >= '3.6'

# PyYAML is also pulled in by dparse
# PyYAML 5.3 fixed narrow build error on Python 2.7
# PyYAML 5.3.1 addressed issue 38100 reported by safety
# PyYAML 5.2 addressed issue 38639 reported by safety
# PyYAML 5.4.1 fixed install error on Python 3.10
PyYAML>=5.3.1; python_version == '2.7'
PyYAML>=5.3.1; python_version >= '3.6' and python_version <= '3.9'
PyYAML>=5.4.1; python_version >= '3.10'
# PyYAML is covered in requirements.txt

# Sphinx (no imports, invoked via sphinx-build script):
# Keep in sync with rtd-requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Released: not yet
* Circumvented the removal of Python 2.7 from the Github Actions plugin
setup-python, by using the Docker container python:2.7.18-buster instead.

* Fixed issue with PyYAML 5.4 installation on Python>=3.10 that fails since
the recent release of Cython 3.

**Enhancements:**

**Cleanup:**
Expand Down
5 changes: 1 addition & 4 deletions minimum-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ tabulate==0.8.2; python_version <= '3.9'
tabulate==0.8.8; python_version >= '3.10'
prompt-toolkit==1.0.15; python_version == '2.7'
prompt-toolkit==2.0.1; python_version >= '3.6'
# PyYAML is also pulled in by dparse
PyYAML==5.3.1; python_version == '2.7'
PyYAML==5.3.1; python_version >= '3.6' and python_version <= '3.9'
PyYAML==5.4.1; python_version >= '3.10'
PyYAML==5.3.1
yamlloader==0.5.5
mock==3.0.0
toposort==1.6
Expand Down
10 changes: 8 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ prompt-toolkit>=2.0.1; python_version >= '3.6'
# PyYAML 5.3 fixed narrow build error on Python 2.7
# PyYAML 5.3.1 addressed issue 38100 reported by safety
# PyYAML 5.2 addressed issue 38639 reported by safety
PyYAML>=5.3.1; python_version == '2.7'
PyYAML>=5.3.1; python_version >= '3.6'
# PyYAML 5.3 has wheel archives for Python 2.7, 3.5 - 3.9
# PyYAML 5.4 has wheel archives for Python 2.7, 3.6 - 3.9
# PyYAML 6.0 has wheel archives for Python 3.6 - 3.11
# PyYAML 5.4 and 6.0.0 fails install since Cython 3 was released, see issue
# https://github.com/yaml/pyyaml/issues/724.
PyYAML>=5.3.1; python_version <= '3.5'
PyYAML>=5.3.1,!=5.4.0,!=5.4.1; python_version >= '3.6' and python_version <= '3.11'
PyYAML>=5.3.1,!=5.4.0,!=5.4.1,!=6.0.0; python_version >= '3.12'

yamlloader>=0.5.5
packaging>=17.0; python_version == '2.7'
Expand Down

0 comments on commit 2ca65cf

Please sign in to comment.