Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct prefixes for distribution packages in provider documentation #39341

Merged

Conversation

Taragolis
Copy link
Contributor

@Taragolis Taragolis commented May 1, 2024

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: #39305

diff after local run breeze release-management prepare-provider-documentation apache.flink --reapply-templates-only

124c124
< * `The apache-airflow-providers-apache-flink 1.3.0 sdist package <https://downloads.apache.org/airflow/providers/apache-airflow-providers-apache-flink-1.3.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache-airflow-providers-apache-flink-1.3.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache-airflow-providers-apache-flink-1.3.0.tar.gz.sha512>`__)
---
> * `The apache-airflow-providers-apache-flink 1.3.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_apache_flink-1.3.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_apache_flink-1.3.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_apache_flink-1.3.0.tar.gz.sha512>`__)

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

Copy link
Collaborator

@dirrao dirrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Looks like this is due to recent pip support for underscore in packager names. isn't it same thing applies to all the providers?

@eladkal eladkal merged commit 413698e into apache:main May 1, 2024
69 checks passed
@Taragolis
Copy link
Contributor Author

LGTM. Looks like this is due to recent pip support for underscore in packager names.

This one about normalisation described in PEP-625 and wheel specification

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

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.

@Taragolis Taragolis deleted the use-correct-prefixes-for-dist-packages branch May 1, 2024 14:59
RodrigoGanancia pushed a commit to RodrigoGanancia/airflow that referenced this pull request May 10, 2024
potiuk added a commit to potiuk/airflow that referenced this pull request May 10, 2024
Follow-up after a few recent changes in provider templates.

The template changes from apache#39552 have not been applied to the new
apache.iceberg provider. Also we are preparing to re-release providers
with 2.7.0 compatibility and there was a change in naming of packages
updated in the provider doucmentation naming convention that has
not been reflected in generated index and fixed in apache#39341 - but it
has not been applied to all the providers.

This PR is a result of `breeze release-management
prepare-provider-documentation --reapply-templates-only` that is
supposed to consistently apply template changes to all providers.
potiuk added a commit to potiuk/airflow that referenced this pull request May 11, 2024
Follow-up after a few recent changes in provider templates.

The template changes from apache#39552 have not been applied to the new
apache.iceberg provider. Also we are preparing to re-release providers
with 2.7.0 compatibility and there was a change in naming of packages
updated in the provider doucmentation naming convention that has
not been reflected in generated index and fixed in apache#39341 - but it
has not been applied to all the providers.

This PR is a result of `breeze release-management
prepare-provider-documentation --reapply-templates-only` that is
supposed to consistently apply template changes to all providers.
potiuk added a commit to potiuk/airflow that referenced this pull request May 11, 2024
Follow-up after a few recent changes in provider templates.

The template changes from apache#39552 have not been applied to the new
apache.iceberg provider. Also we are preparing to re-release providers
with 2.7.0 compatibility and there was a change in naming of packages
updated in the provider doucmentation naming convention that has
not been reflected in generated index and fixed in apache#39341 - but it
has not been applied to all the providers.

This PR is a result of `breeze release-management
prepare-provider-documentation --reapply-templates-only` that is
supposed to consistently apply template changes to all providers.
potiuk added a commit that referenced this pull request May 11, 2024
Follow-up after a few recent changes in provider templates.

The template changes from #39552 have not been applied to the new
apache.iceberg provider. Also we are preparing to re-release providers
with 2.7.0 compatibility and there was a change in naming of packages
updated in the provider doucmentation naming convention that has
not been reflected in generated index and fixed in #39341 - but it
has not been applied to all the providers.

This PR is a result of `breeze release-management
prepare-provider-documentation --reapply-templates-only` that is
supposed to consistently apply template changes to all providers.
pateash pushed a commit to pateash/airflow that referenced this pull request May 13, 2024
Follow-up after a few recent changes in provider templates.

The template changes from apache#39552 have not been applied to the new
apache.iceberg provider. Also we are preparing to re-release providers
with 2.7.0 compatibility and there was a change in naming of packages
updated in the provider doucmentation naming convention that has
not been reflected in generated index and fixed in apache#39341 - but it
has not been applied to all the providers.

This PR is a result of `breeze release-management
prepare-provider-documentation --reapply-templates-only` that is
supposed to consistently apply template changes to all providers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants