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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
