🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.rc
Article #1963

Bug#1152404: python-maturin: please upgrade to using zip 9

#1963
From: Colin Watson
Date: Thu, 29 Oct 2026 11:30
194 lines
12135 bytes
On Wed, Oct 28, 2026 at 09:00:06PM +0100, Alexander Kjäll wrote:
>We needed to do a fast bump of zip to version 9, to handle a bunch of CVE's.
>
>Please bump this package to use zip 9 instead of zip 5.

When I tried this (using `cargo add zip@9.1.3` followed by `cargo test` 
in the upstream repository, for testing convenience), I got:

error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied
   --> src/compression.rs:97:58
    |
97 |     pub(crate) fn get_file_options(&self) -> zip::write::FileOptions<'static, ()> {
    |                                                          ^^^^^^^^^^^ ------- supplied 1 lifetime argument
    |                                                          |
    |                                                          expected 2 lifetime arguments
    |
note: struct defined here, with 2 lifetime parameters: `'k`, `'n`
   --> /home/cjwatson/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zip-9.1.3/src/write/options.rs:53:12
    |
53 | pub struct FileOptions<'k, 'n, T: sealed::FileOptionExtension> {
    |            ^^^^^^^^^^^ --  --
help: add missing lifetime argument
    |
97 |     pub(crate) fn get_file_options(&self) -> zip::write::FileOptions<'static, 'static, ()> {
    |                                                                             +++++++++

For more information about this error, try `rustc --explain E0107`.


OK, so I did that.  Then I get this mess:

error[E0599]: the method `to_string` exists for enum `Result<Cow<'_, str>, ZipError>`, but its trait bounds were not satisfied
    --> tests/common/integration.rs:568:37
     |
568 |         if !seen.insert(file.name().to_string()) {
     |                                     ^^^^^^^^^ method cannot be called on `Result<Cow<'_, str>, ZipError>` due to unsatisfied trait bounds
     |
    ::: /usr/src/rustc-1.97.1/library/core/src/result.rs:557:1
     |
557 | pub enum Result<T, E> {
     | --------------------- doesn't satisfy `Result<Cow<'_, str>, ZipError>: ToString` or `Result<Cow<'_, str>, ZipError>: std::fmt::Display`
     |
     = note: the following trait bounds were not satisfied:
             `Result<Cow<'_, str>, ZipError>: std::fmt::Display`
             which is required by `Result<Cow<'_, str>, ZipError>: ToString`

error[E0277]: `Result<Cow<'_, str>, ZipError>` doesn't implement `std::fmt::Display`
    --> tests/common/integration.rs:569:41
     |
569 |             bail!("Duplicate file: {}", file.name());
     |                                    --   ^^^^^^^^^^^ `Result<Cow<'_, str>, ZipError>` cannot be formatted with the default formatter
     |                                    |
     |                                    required by this formatting parameter
     |
     = help: the trait `std::fmt::Display` is not implemented for `Result<Cow<'_, str>, ZipError>`
     = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
     = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `bail` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0631]: type mismatch in closure arguments
    --> tests/common/other.rs:387:17
     |
381 |     let drop_platform_specific_files = |file: &&str| -> bool {
     |                                        --------------------- found signature defined here
...
387 |         .filter(drop_platform_specific_files)
     |          ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected due to this
     |          |
     |          required by a bound introduced by this call
     |
     = note: expected closure signature `for<'a> fn(&'a Result<Cow<'_, str>, ZipError>) -> _`
                found closure signature `fn(&&str) -> _`
note: required by a bound in `filter`
    --> /usr/src/rustc-1.97.1/library/core/src/iter/traits/iterator.rs:955:34
     |
952 |     fn filter<P>(self, predicate: P) -> Filter<Self, P>
     |        ------ required by a bound in this associated function
...
955 |         P: FnMut(&Self::Item) -> bool,
     |                                  ^^^^ required by this bound in `Iterator::filter`
help: consider wrapping the function in a closure
     |
387 |         .filter(|arg0: &Result<Cow<'_, str>, ZipError>| drop_platform_specific_files(/* &&str */))
     |                 +++++++++++++++++++++++++++++++++++++++                             +++++++++++++

error[E0599]: the method `map` exists for struct `Filter<impl Iterator<Item = Result<Cow<'_, str>, ZipError>>, {closure@tests/common/other.rs:381:40: 381:61}>`, but its trait bounds were not satisfied
    --> tests/common/other.rs:388:10
     |
381 |       let drop_platform_specific_files = |file: &&str| -> bool {
     |                                          --------------------- doesn't satisfy `<_ as FnOnce<(&Result<Cow<'_, str>, ZipError>,)>>::Output = bool`
...
385 |       Ok(wheel
     |  ________-
386 | |         .file_names()
387 | |         .filter(drop_platform_specific_files)
388 | |         .map(str::to_owned)
     | |         -^^^ method cannot be called due to unsatisfied trait bounds
     | |_________|
     |
     |
    ::: /usr/src/rustc-1.97.1/library/core/src/iter/adapters/filter.rs:21:1
     |
  21 |   pub struct Filter<I, P> {
     |   ----------------------- doesn't satisfy `_: Iterator`
     |
     = note: the following trait bounds were not satisfied:
             `<{closure@tests/common/other.rs:381:40: 381:61} as FnOnce<(&Result<Cow<'_, str>, ZipError>,)>>::Output = bool`
             which is required by `Filter<impl Iterator<Item = Result<Cow<'_, str>, ZipError>>, {closure@tests/common/other.rs:381:40: 381:61}>: Iterator`
             `Filter<impl Iterator<Item = Result<Cow<'_, str>, ZipError>>, {closure@tests/common/other.rs:381:40: 381:61}>: Iterator`
             which is required by `&mut Filter<impl Iterator<Item = Result<Cow<'_, str>, ZipError>>, {closure@tests/common/other.rs:381:40: 381:61}>: Iterator`

error[E0599]: no method named `contains` found for reference `&Result<Cow<'_, str>, ZipError>` in the current scope
    --> tests/common/other.rs:398:23
     |
398 |         .filter(|f| f.contains(".dist-info/sboms/"))
     |                       ^^^^^^^^ method not found in `&Result<Cow<'_, str>, ZipError>`
     |
     = help: items from traits can only be used if the trait is in scope
help: trait `Seq` which provides `contains` is implemented but not in scope; perhaps you want to import it
     |
   1 + use chumsky::container::Seq;
     |

error[E0599]: the method `to_string` exists for enum `Result<Cow<'_, str>, ZipError>`, but its trait bounds were not satisfied
    --> tests/common/other.rs:399:20
     |
399 |         .map(|f| f.to_string())
     |                    ^^^^^^^^^ method cannot be called on `Result<Cow<'_, str>, ZipError>` due to unsatisfied trait bounds
     |
    ::: /usr/src/rustc-1.97.1/library/core/src/result.rs:557:1
     |
557 | pub enum Result<T, E> {
     | --------------------- doesn't satisfy `Result<Cow<'_, str>, ZipError>: ToString` or `Result<Cow<'_, str>, ZipError>: std::fmt::Display`
     |
     = note: the following trait bounds were not satisfied:
             `Result<Cow<'_, str>, ZipError>: std::fmt::Display`
             which is required by `Result<Cow<'_, str>, ZipError>: ToString`

error[E0599]: no method named `ends_with` found for reference `&Result<Cow<'_, str>, ZipError>` in the current scope
    --> tests/common/other.rs:671:37
     |
671 |                 .filter(|name| name.ends_with(".so"))
     |                                     ^^^^^^^^^ method not found in `&Result<Cow<'_, str>, ZipError>`

error[E0369]: binary operation `==` cannot be applied to type `Vec<Result<Cow<'_, str>, ZipError>>`
    --> tests/common/other.rs:673:13
     |
673 | /             assert_eq!(
674 | |                 extensions,
675 | |                 [format!(
676 | |                     "pyo3_abi3_and_abi3t/pyo3_abi3_and_abi3t{expected_suffix}"
677 | |                 )]
678 | |             );
     | |             ^
     | |             |
     | |_____________Vec<Result<Cow<'_, str>, ZipError>>
     |               [std::string::String; 1]
     |
note: `Result<Cow<'_, str>, ZipError>` does not implement `PartialEq<std::string::String>`
    --> /usr/src/rustc-1.97.1/library/core/src/result.rs:557:1
     |
557 | pub enum Result<T, E> {
     | ^^^^^^^^^^^^^^^^^^^^^ `Result<Cow<'_, str>, ZipError>` is defined in another crate
     = note: this error originates in the macro `$crate::assert_eq` which comes from the expansion of the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no method named `starts_with` found for reference `&Result<Cow<'_, str>, ZipError>` in the current scope
    --> tests/common/other.rs:803:29
     |
803 |         .filter(|name| name.starts_with("bin_with_python_module/"))
     |                             ^^^^^^^^^^^ method not found in `&Result<Cow<'_, str>, ZipError>`

error[E0369]: binary operation `==` cannot be applied to type `Vec<Result<Cow<'_, str>, ZipError>>`
    --> tests/common/other.rs:812:5
     |
812 |     assert_eq!(package_files, expected);
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |     |
     |     Vec<Result<Cow<'_, str>, ZipError>>
     |     Vec<&str>
     |
note: `Result<Cow<'_, str>, ZipError>` does not implement `PartialEq<&str>`
    --> /usr/src/rustc-1.97.1/library/core/src/result.rs:557:1
     |
557 | pub enum Result<T, E> {
     | ^^^^^^^^^^^^^^^^^^^^^ `Result<Cow<'_, str>, ZipError>` is defined in another crate
     = note: this error originates in the macro `$crate::assert_eq` which comes from the expansion of the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0277, E0369, E0599, E0631.
For more information about an error, try `rustc --explain E0277`.


This is beyond me.  Help?

-- 
Colin Watson (he/him)                              [cjwatson@debian.org]
Technical Details
Message-ID: <NTwut-8BSp-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NTi89-8u56-7@gated-at.bofh.it> <NTi89-8u56-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Colin Watson <cjwatson@debian.org>
Newsgroups: linux.debian.bugs.rc
Subject: Bug#1152404: python-maturin: please upgrade to using zip 9
Date: Thu, 29 Oct 2026 12:30:01 +0100
Message-ID: <NTwut-8BSp-3@gated-at.bofh.it>
References: <NTi89-8u56-7@gated-at.bofh.it> <NTi89-8u56-7@gated-at.bofh.it>
X-Original-To: Alexander Kjäll <alexander.kjall@gmail.com>,
	1152404@bugs.debian.org
X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org  Thu Oct 29 11:23:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Colin Watson <cjwatson@debian.org>, 1152404@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: team+python@tracker.debian.org
X-Debian-Pr-Message: followup 1152404
X-Debian-Pr-Package: src:python-maturin
X-Debian-Pr-Keywords: ftbfs
X-Debian-Pr-Source: python-maturin
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Debian-User: cjwatson
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/836497
List-ID: <debian-bugs-rc.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-rc/>
Approved: robomod@news.nic.it
Lines: 194
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Thu, 29 Oct 2026 11:20:05 +0000
X-Original-Message-ID: <auMr5d4X5gj7t-xg@riva.ucam.org>
X-Original-References: <179321760644.1012842.15164488856053434654.reportbug@tone> <179321760644.1012842.15164488856053434654.reportbug@tone>