From b15a9b1dea3678ca39259087947b5057cee6e0d3 Mon Sep 17 00:00:00 2001 From: Eashwar Ranganathan Date: Fri, 28 Nov 2025 14:20:43 -0500 Subject: [PATCH] Always emit deprecation warning for 'upload' and 'publish' --- src/upload.rs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/upload.rs b/src/upload.rs index 73de314cf..1d646d6b7 100644 --- a/src/upload.rs +++ b/src/upload.rs @@ -65,18 +65,17 @@ impl PublishOpt { /// Set to non interactive mode if we're running on CI pub fn non_interactive_on_ci(&mut self) { - if !self.non_interactive && env::var("CI").map(|v| v == "true").unwrap_or_default() { - let msg = "⚠️ Warning: The maturin upload and publish commands are deprecated and will be removed in the future. For more information see: https://github.com/PyO3/maturin/issues/2334"; - eprintln!("{msg}"); - - if env::var("GITHUB_ACTIONS") - .map(|v| v == "true") - .unwrap_or_default() - { - // Also emit a warning annotation on the GH action - println!("::warning::{msg}"); - } + let msg = "⚠️ Warning: The maturin upload and publish commands are deprecated and will be removed in the future. For more information see: https://github.com/PyO3/maturin/issues/2334"; + eprintln!("{msg}"); + if env::var("GITHUB_ACTIONS") + .map(|v| v == "true") + .unwrap_or_default() + { + // Also emit a warning annotation on the GH action + println!("::warning::{msg}"); + } + if !self.non_interactive && env::var("CI").map(|v| v == "true").unwrap_or_default() { eprintln!("🎛️ Running in non-interactive mode on CI"); self.non_interactive = true; }