Skip to content

Commit

Permalink
Fix case where pip requiremet version starts with != (#35645)
Browse files Browse the repository at this point in the history
Github provider has package starting with `!=` and the documentation
generation had a bug (for a long time) to split the package versions
wrongly in this case.
  • Loading branch information
potiuk committed Nov 15, 2023
1 parent 1e24a3c commit ffbba9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/github/__init__.py
Expand Up @@ -39,5 +39,5 @@
"2.5.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-github:{__version__}` requires Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-github:{__version__}` needs Apache Airflow 2.5.0+"
)
Expand Up @@ -566,7 +566,7 @@ def _convert_pip_requirements_to_table(requirements: Iterable[str], markdown: bo
headers = ["PIP package", "Version required"]
table_data = []
for dependency in requirements:
found = re.match(r"(^[^<=>~]*)([^<=>~]?.*)$", dependency)
found = re.match(r"(^[^<=>~!]*)([^<=>~!]?.*)$", dependency)
if found:
package = found.group(1)
version_required = found.group(2)
Expand Down
4 changes: 1 addition & 3 deletions docs/apache-airflow-providers-github/index.rst
Expand Up @@ -68,8 +68,6 @@
Detailed list of commits <commits>

.. THE REMAINDER OF THE FILE IS AUTOMATICALLY GENERATED. IT WILL BE OVERWRITTEN AT RELEASE TIME!
.. toctree::
:hidden:
:maxdepth: 1
Expand Down Expand Up @@ -108,5 +106,5 @@ The minimum Apache Airflow version supported by this provider package is ``2.5.0
PIP package Version required
================== ==================
``apache-airflow`` ``>=2.5.0``
``PyGithub!`` ``=1.58``
``PyGithub`` ``!=1.58``
================== ==================

0 comments on commit ffbba9e

Please sign in to comment.