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

normalized sdist names #6621

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

dimbleby
Copy link
Contributor

@neersighted neersighted added the status/waiting-on-core Requires changes to poetry-core first label Oct 3, 2022
@dimbleby dimbleby force-pushed the normalized-dist-names branch 2 times, most recently from 2529d75 to 63fba79 Compare October 5, 2022 21:14
@neersighted neersighted added kind/bug Something isn't working as expected area/build-system Related to PEP 517 packaging (see poetry-core) area/publishing Related to PyPI/PEP 503 publishing impact/backport Requires backport to stable branch impact/changelog Requires a changelog entry backport/1.2 and removed status/waiting-on-core Requires changes to poetry-core first labels Oct 5, 2022
@neersighted
Copy link
Member

#6714 was a little more correct overall in doing the bump all at once and solving the deprecation warnings -- however, this PR does have slightly more correct use of distribution_name -- could you please rebase it and rephrase the commit to be a correctness fix?

@dimbleby
Copy link
Contributor Author

dimbleby commented Oct 6, 2022

I've left in the noise where we took equivalent-but-different decisions because I am too lazy to change such things, if you care then feel free to update

@neersighted neersighted enabled auto-merge (squash) October 6, 2022 21:32
@neersighted neersighted merged commit 8e8aa44 into python-poetry:master Oct 6, 2022
@dimbleby dimbleby deleted the normalized-dist-names branch October 6, 2022 23:01
dlaehnemann added a commit to bioconda/bioconda-recipes that referenced this pull request Mar 20, 2023
… underscores)

The official specs for sdist file names require that the package name is in snake case, see these places:
* https://peps.python.org/pep-0625/#specification
* https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
* https://peps.python.org/pep-0491/#escaping-and-unicode

[`poetry` switched to conforming to these specs with version `1.2.2`](https://github.com/python-poetry/poetry/releases/tag/1.2.2), see:
* poetry-core pull request with the actual code changes: python-poetry/poetry-core#484
* poetry pull request pulling them in: python-poetry/poetry#6621

Thus, all (bio-)conda recipes whose sources are built with `poetry` and uploaded to pypi are likely to face the same issue.

As `snakemake-wrapper-utils` only contains hyphens (`-`) as non-word characters, the suggested `replace("-","_")` should be safe and enough.

But a thorough solution should be implemented in `grayskull` (that does conda recipe templating for pypi packages), and in the tooling of `conda-forge` and `bioconda`. One solution to make such recipes more future-proof would be to make tooling respect the [official guidance to query the pypi JSON API to get download urls](https://warehouse.pypa.io/api-reference/integration-guide.html#official-guidance). Examples of how to do this are here:
* [stackoverflow answer with example code of querying the pypi JSON API for a download URL](https://stackoverflow.com/a/48327216)
* [link to the pypi code for generating the currently used standardized redirect links at `pypi.io`, that also uses the JSON API](pypi/warehouse#13240 (comment))
dlaehnemann added a commit to bioconda/bioconda-recipes that referenced this pull request Mar 20, 2023
* update snakemake-wrapper-utils to 0.5.2

* make package name in sdist `.tar.gz` filename conform to specs (using underscores)

The official specs for sdist file names require that the package name is in snake case, see these places:
* https://peps.python.org/pep-0625/#specification
* https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
* https://peps.python.org/pep-0491/#escaping-and-unicode

[`poetry` switched to conforming to these specs with version `1.2.2`](https://github.com/python-poetry/poetry/releases/tag/1.2.2), see:
* poetry-core pull request with the actual code changes: python-poetry/poetry-core#484
* poetry pull request pulling them in: python-poetry/poetry#6621

Thus, all (bio-)conda recipes whose sources are built with `poetry` and uploaded to pypi are likely to face the same issue.

As `snakemake-wrapper-utils` only contains hyphens (`-`) as non-word characters, the suggested `replace("-","_")` should be safe and enough.

But a thorough solution should be implemented in `grayskull` (that does conda recipe templating for pypi packages), and in the tooling of `conda-forge` and `bioconda`. One solution to make such recipes more future-proof would be to make tooling respect the [official guidance to query the pypi JSON API to get download urls](https://warehouse.pypa.io/api-reference/integration-guide.html#official-guidance). Examples of how to do this are here:
* [stackoverflow answer with example code of querying the pypi JSON API for a download URL](https://stackoverflow.com/a/48327216)
* [link to the pypi code for generating the currently used standardized redirect links at `pypi.io`, that also uses the JSON API](pypi/warehouse#13240 (comment))

* closing bracket; use jinja2 `replace()` filter instead of python `str.replace()`

* update sha256 according to https://pypi.org/pypi/snakemake-wrapper-utils/0.5.2/json
cokelaer pushed a commit to cokelaer/bioconda-recipes that referenced this pull request Apr 28, 2023
* update snakemake-wrapper-utils to 0.5.2

* make package name in sdist `.tar.gz` filename conform to specs (using underscores)

The official specs for sdist file names require that the package name is in snake case, see these places:
* https://peps.python.org/pep-0625/#specification
* https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
* https://peps.python.org/pep-0491/#escaping-and-unicode

[`poetry` switched to conforming to these specs with version `1.2.2`](https://github.com/python-poetry/poetry/releases/tag/1.2.2), see:
* poetry-core pull request with the actual code changes: python-poetry/poetry-core#484
* poetry pull request pulling them in: python-poetry/poetry#6621

Thus, all (bio-)conda recipes whose sources are built with `poetry` and uploaded to pypi are likely to face the same issue.

As `snakemake-wrapper-utils` only contains hyphens (`-`) as non-word characters, the suggested `replace("-","_")` should be safe and enough.

But a thorough solution should be implemented in `grayskull` (that does conda recipe templating for pypi packages), and in the tooling of `conda-forge` and `bioconda`. One solution to make such recipes more future-proof would be to make tooling respect the [official guidance to query the pypi JSON API to get download urls](https://warehouse.pypa.io/api-reference/integration-guide.html#official-guidance). Examples of how to do this are here:
* [stackoverflow answer with example code of querying the pypi JSON API for a download URL](https://stackoverflow.com/a/48327216)
* [link to the pypi code for generating the currently used standardized redirect links at `pypi.io`, that also uses the JSON API](pypi/warehouse#13240 (comment))

* closing bracket; use jinja2 `replace()` filter instead of python `str.replace()`

* update sha256 according to https://pypi.org/pypi/snakemake-wrapper-utils/0.5.2/json
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/build-system Related to PEP 517 packaging (see poetry-core) area/publishing Related to PyPI/PEP 503 publishing impact/backport Requires backport to stable branch impact/changelog Requires a changelog entry kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants