You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/26 14:50:32 UTC

[GitHub] [airflow] ashb opened a new pull request #11854: Use packaging.version, not semver module for version comparisons

ashb opened a new pull request #11854:
URL: https://github.com/apache/airflow/pull/11854


   Semver module doesn't like python version specifiers such as `0.0.2a1`
   -- since packaging module is already a dep from setuptools, and is what
   the python ecosystem uses to do version handling it makes sense to use
   it.
   
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on pull request #11854: Use packaging.version, not semver module for version comparisons

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #11854:
URL: https://github.com/apache/airflow/pull/11854#issuecomment-716613052


   GHA queues are a disaster right now, I've used this, locally so merging it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #11854: Use packaging.version, not semver module for version comparisons

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #11854:
URL: https://github.com/apache/airflow/pull/11854#discussion_r512021251



##########
File path: provider_packages/prepare_provider_packages.py
##########
@@ -880,16 +881,10 @@ def check_if_release_version_ok(
             else:
                 current_release_version = "0.0.1"  # TODO: replace with maintained version
     if previous_release_version:
-        if backport_packages:
-            if previous_release_version > current_release_version:
-                print(f"The release {current_release_version} must be not less than "
-                      f"{previous_release_version} - last release for the package", file=sys.stderr)
-                sys.exit(2)
-        else:
-            if semver.compare(previous_release_version, current_release_version) > 0:

Review comment:
       Using packaging.version we don't need to handle CalVer separately anymore




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb edited a comment on pull request #11854: Use packaging.version, not semver module for version comparisons

Posted by GitBox <gi...@apache.org>.
ashb edited a comment on pull request #11854:
URL: https://github.com/apache/airflow/pull/11854#issuecomment-716613052


   GHA queues are a disaster right now, I've used this, locally so merging it. (Hopefully I won't regret it)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb merged pull request #11854: Use packaging.version, not semver module for version comparisons

Posted by GitBox <gi...@apache.org>.
ashb merged pull request #11854:
URL: https://github.com/apache/airflow/pull/11854


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org