You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2024/05/01 10:23:31 UTC

[PR] Use correct prefixes for distribution packages in provider documentation [airflow]

Taragolis opened a new pull request, #39341:
URL: https://github.com/apache/airflow/pull/39341

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   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 an 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/
   -->
   
   Since we change build packages to hatch it also affects name of distribution packages,
   previously it use `-` in sdist package prefix, however now it use `_` for both `sdist` and `wheel` distributions
   - `apache_airflow_providers_apache_flink-1.3.0.dev0.tar.gz`
   - `apache_airflow_providers_apache_flink-1.3.0.dev0-py3-none-any.whl`
   
   More generic solution rather than: https://github.com/apache/airflow/pull/39305
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Use correct prefixes for distribution packages in provider documentation [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on PR #39341:
URL: https://github.com/apache/airflow/pull/39341#issuecomment-2088588913

   > LGTM. Looks like this is due to recent pip support for underscore in packager names.
   
   This one about normalisation described in [PEP-625](https://peps.python.org/pep-0625/) and [wheel specification
   ](https://packaging.python.org/en/latest/specifications/binary-distribution-format/) 
   
   Due to normalisation in distribution files all `-` in distribution name should be replaced by `_`. This rule should be used in `wheel` packages, but for `sdist` it is depend on build backend.
   
   Some demonstration by [`packaging`](https://packaging.pypa.io/en/latest/utils.html)
   
   ```python
   Python 3.9.10 (main, Feb 25 2022, 16:54:01) 
   [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> from packaging.utils import parse_sdist_filename, parse_wheel_filename
   >>> 
   >>> 
   >>> parse_sdist_filename("apache-airflow-providers-apache-flink-1.3.0.tar.gz")
   ('apache-airflow-providers-apache-flink', <Version('1.3.0')>)
   >>> parse_sdist_filename("apache_airflow_providers_apache_flink-1.3.0.tar.gz")
   ('apache-airflow-providers-apache-flink', <Version('1.3.0')>)
   >>> 
   >>> 
   >>> parse_wheel_filename("apache_airflow_providers_apache_flink-1.3.0-py3-none-any.whl")
   ('apache-airflow-providers-apache-flink', <Version('1.3.0')>, (), frozenset({<py3-none-any @ 4308247616>}))
   >>> parse_wheel_filename("apache-airflow-providers-apache-flink-1.3.0-py3-none-any.whl")
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/Users/taragolis/.pyenv/versions/airflow-dev-env-39/lib/python3.9/site-packages/packaging/utils.py", line 114, in parse_wheel_filename
       raise InvalidWheelFilename(
   packaging.utils.InvalidWheelFilename: Invalid wheel filename (wrong number of parts): apache-airflow-providers-apache-flink-1.3.0-py3-none-any
   >>> 
   ```
   
   Previously we use `setuptools`, which I guess still do not support PEP-625. `hatch` support and follow by default PEP-625, so this another surprises after we switch to it. We already fix same issues in another places, it is hard to find it, fortunately @cjj2010 found it in docs.
   
   > isn't it same thing applies to all the providers?
   
   Yes, this applied to all providers.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Use correct prefixes for distribution packages in provider documentation [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal merged PR #39341:
URL: https://github.com/apache/airflow/pull/39341


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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