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

Fix upload::canonicalize_name() regex subst #741

Merged
merged 2 commits into from
Dec 10, 2021

Conversation

ravenexp
Copy link
Contributor

Python Pattern.sub() corresponds to Rust Regex::replace_all(),
not Regex::replace().

This fixes a bug where the same Python package a_b_c is uploaded
as both a-b-c (wheel) and a-b_c (sdist).

@netlify
Copy link

netlify bot commented Dec 10, 2021

✔️ Deploy Preview for maturin-guide canceled.

🔨 Explore the source changes: 7d6efd3

🔍 Inspect the deploy log: https://app.netlify.com/sites/maturin-guide/deploys/61b347787685e200078f499a

@messense
Copy link
Member

Thanks for fix this, could you add a changelog entry please?

Python `Pattern.sub()` corresponds to Rust `Regex::replace_all()`,
not `Regex::replace()`.

This fixes a bug where the same Python package `a_b_c` is uploaded
as both `a-b-c` (wheel) and `a-b_c` (sdist).
@ravenexp ravenexp force-pushed the fix-canonicalize-name branch from c9f314c to 773b3b1 Compare December 10, 2021 12:24
@messense messense merged commit 2aa20e9 into PyO3:main Dec 10, 2021
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Dec 23, 2021
https://build.opensuse.org/request/show/942187
by user mia + dimstar_suse
- Update to 0.12.5
  * Fix docs for new and init commands in maturin --help
    gh#PyO3/maturin#734
  * Fix undefined auditwheel policy panic
    gh#PyO3/maturin#740
  * Fix upload::canonicalize_name() regex subst
    gh#PyO3/maturin#741
  * Bump serde from 1.0.130 to 1.0.131
    gh#PyO3/maturin#745
  * Bump sha2 from 0.9.8 to 0.10.0
    gh#PyO3/maturin#746
  * Add Cargo.lock to sdist when --locked or --frozen specified
    gh#PyO3/maturin#749
  * Implement auditwheel repair with patchelf
    gh#PyO3/maturin#742
  * Support pyo3 abi3-py310 feature
    gh#PyO3/maturin#750
- Changes in 0.12.4:
  * Bump anyhow from 1.0.50 to 1.0.51
    gh#PyO3/maturin#717
  * init: new command similar to cargo init
    gh#PyO3/maturin#719
  * Don't package non-path-dep crates in sdist for workspaces
    gh#PyO
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Jan 3, 2022
* Add support for repairing cross compiled linux wheels in [#754](PyO3/maturin#754)
* Add support for `manylinux_2_28` and `manylinux_2_31` in [#755](PyO3/maturin#755)
* Remove existing so file first in `maturin develop` command to avoid triggering SIGSEV in running process in [#760](PyO3/maturin#760)

* Fix docs for `new` and `init` commands in `maturin --help` in [#734](PyO3/maturin#734)
* Add support for x86_64 Haiku in [#735](PyO3/maturin#735)
* Fix undefined auditwheel policy panic in [#740](PyO3/maturin#740)
* Fix sdist upload for packages where the pkgname contains multiple underscores in [#741](PyO3/maturin#741)
* Implement auditwheel repair with patchelf in [#742](PyO3/maturin#742)
* Add `Cargo.lock` to sdist when `--locked` or `--frozen` specified in [#749](PyO3/maturin#749)
* Infer readme file if not specified in [#751](PyO3/maturin#751)

* Add a `maturin init` command as a companion to `maturin new` in [#719](PyO3/maturin#719)
* Don't package non-path-dep crates in sdist for workspaces in [#720](PyO3/maturin#720)
* Build release packages with `password-storage` feature in [#725](PyO3/maturin#725)
* Add support for x86_64 DargonFly BSD in [#727](PyO3/maturin#727)
* Add a Python import hook in [#729](PyO3/maturin#729)
* Allow pip warnings in `maturin develop` command in [#732](PyO3/maturin#732)
@ravenexp ravenexp deleted the fix-canonicalize-name branch May 1, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants