mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-30 06:33:06 +00:00
Add minimum requirements for Python 3.10 support
This is needed for min_requirements.py, since it installs the oldest possible version of all the requirements. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
d87e46f3de
commit
44f138d539
@ -10,7 +10,9 @@ markupsafe < 2.1
|
|||||||
# See https://github.com/Mbed-TLS/mbedtls/pull/5067#discussion_r738794607 .
|
# See https://github.com/Mbed-TLS/mbedtls/pull/5067#discussion_r738794607 .
|
||||||
# Note that Jinja 3.0 drops support for Python 3.5, so we need to support
|
# Note that Jinja 3.0 drops support for Python 3.5, so we need to support
|
||||||
# Jinja 2.x as long as we're still using Python 3.5 anywhere.
|
# Jinja 2.x as long as we're still using Python 3.5 anywhere.
|
||||||
Jinja2 >= 2.10.1
|
# Jinja 2.10.1 doesn't support Python 3.10+
|
||||||
|
Jinja2 >= 2.10.1; python_version < '3.10'
|
||||||
|
Jinja2 >= 2.10.3; python_version >= '3.10'
|
||||||
# Jinja2 >=2.10, <3.0 needs a separate package for type annotations
|
# Jinja2 >=2.10, <3.0 needs a separate package for type annotations
|
||||||
types-Jinja2
|
types-Jinja2
|
||||||
|
|
||||||
|
@ -44,8 +44,9 @@ class Requirements:
|
|||||||
"""Adjust a requirement to the minimum specified version."""
|
"""Adjust a requirement to the minimum specified version."""
|
||||||
# allow inheritance #pylint: disable=no-self-use
|
# allow inheritance #pylint: disable=no-self-use
|
||||||
# If a requirement specifies a minimum version, impose that version.
|
# If a requirement specifies a minimum version, impose that version.
|
||||||
req = re.sub(r'>=|~=', r'==', req)
|
split_req = req.split(';', 1)
|
||||||
return req
|
split_req[0] = re.sub(r'>=|~=', r'==', split_req[0])
|
||||||
|
return ';'.join(split_req)
|
||||||
|
|
||||||
def add_file(self, filename: str) -> None:
|
def add_file(self, filename: str) -> None:
|
||||||
"""Add requirements from the specified file.
|
"""Add requirements from the specified file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user