public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/hatch] f45: Update to 1.18.0 (close RHBZ#2513768)
@ 2026-08-19  9:30 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-08-19  9:30 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/hatch
Branch : f45
Commit : 29a63136d1da44863ac8603d885bf142b33dcaf0
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-08-19T10:04:48+01:00
Stats  : +155/-21 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/hatch/c/29a63136d1da44863ac8603d885bf142b33dcaf0?branch=f45

Log:
Update to 1.18.0 (close RHBZ#2513768)

---
diff --git a/2399.patch b/2399.patch
new file mode 100644
index 0000000..d366d23
--- /dev/null
+++ b/2399.patch
@@ -0,0 +1,60 @@
+From 9eeb6f4564b80bbe4a97adf82727c71456665097 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Wed, 19 Aug 2026 06:59:22 +0100
+Subject: [PATCH] =?UTF-8?q?Fix=20a=20couple=20of=20tests=20when=20no=20?=
+ =?UTF-8?q?=E2=80=9Cpython=E2=80=9D=20in=20path?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+These CLI tests assume a “python” executable is available outside of a
+virtualenv, which is not necessarily true (e.g. Fedora has only
+“python3” if the `python-unversioned-command` package is not installed).
+Use the basename from `sys.executable` in the script configs for these
+tests instead.
+---
+ tests/cli/run/test_run.py | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/tests/cli/run/test_run.py b/tests/cli/run/test_run.py
+index 5323fd7b9..4b9074a7a 100644
+--- a/tests/cli/run/test_run.py
++++ b/tests/cli/run/test_run.py
+@@ -1,4 +1,5 @@
+ import os
++import pathlib
+ import signal
+ import sys
+ import sysconfig
+@@ -722,7 +723,14 @@ def test_scripts_no_environment(hatch, helpers, temp_dir, config_file):
+ 
+     project = Project(project_path)
+     config = dict(project.raw_config)
+-    config["tool"]["hatch"]["scripts"] = {"py": "python -c {args}"}
++    # Try to handle testing on systems where there is no "python", only e.g.
++    # "python3". Ideally we would use the absolute path from sys.executable
++    # path, but then we are much more likely to have problems due to things
++    # like whitespace in the directory path, considering we are not attempting
++    # shell escaping. Even the executable name could have these issues, but
++    # this should be good enough for testing purposes.
++    py = pathlib.Path(sys.executable).name
++    config["tool"]["hatch"]["scripts"] = {"py": f"{py} -c {{args}}"}
+     project.save_config(config)
+ 
+     with project_path.as_cwd(env_vars={ConfigEnvVars.DATA: str(data_path)}):
+@@ -761,7 +769,14 @@ def test_interrupt_signal_not_inherited(hatch, temp_dir, config_file):
+ 
+     project = Project(project_path)
+     config = dict(project.raw_config)
+-    config["tool"]["hatch"]["scripts"] = {"py": "python -c {args}"}
++    # Try to handle testing on systems where there is no "python", only e.g.
++    # "python3". Ideally we would use the absolute path from sys.executable
++    # path, but then we are much more likely to have problems due to things
++    # like whitespace in the directory path, considering we are not attempting
++    # shell escaping. Even the executable name could have these issues, but
++    # this should be good enough for testing purposes.
++    py = pathlib.Path(sys.executable).name
++    config["tool"]["hatch"]["scripts"] = {"py": f"{py} -c {{args}}"}
+     project.save_config(config)
+ 
+     original_handler = signal.getsignal(signal.SIGINT)

diff --git a/2400.patch b/2400.patch
new file mode 100644
index 0000000..2f3a55c
--- /dev/null
+++ b/2400.patch
@@ -0,0 +1,58 @@
+From a84cf8aa462e39f1cf460f4b4feabdcab5183095 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Wed, 19 Aug 2026 08:22:20 +0100
+Subject: [PATCH] Mark a few more tests that require Internet access
+
+---
+ tests/cli/build/test_build.py     | 4 ++++
+ tests/cli/version/test_version.py | 1 +
+ 2 files changed, 5 insertions(+)
+
+diff --git a/tests/cli/build/test_build.py b/tests/cli/build/test_build.py
+index 70c0cdda8..7ba6e956d 100644
+--- a/tests/cli/build/test_build.py
++++ b/tests/cli/build/test_build.py
+@@ -1465,6 +1465,7 @@ def test_no_workspace_members(self, hatch, temp_dir, helpers):
+             """
+         )
+ 
++    @pytest.mark.requires_internet
+     def test_default(self, hatch, temp_dir):
+         workspace_root = self._create_workspace(hatch, temp_dir)
+ 
+@@ -1491,6 +1492,7 @@ def test_default(self, hatch, temp_dir):
+         for member_name in ("member1", "member2"):
+             assert not (workspace_root / "packages" / member_name / "dist").is_dir()
+ 
++    @pytest.mark.requires_internet
+     def test_virtual_root(self, hatch, temp_dir):
+         workspace_root = temp_dir / "workspace"
+         workspace_root.mkdir()
+@@ -1523,6 +1525,7 @@ def test_virtual_root(self, hatch, temp_dir):
+             "member2-0.0.1.tar.gz",
+         ]
+ 
++    @pytest.mark.requires_internet
+     def test_explicit_targets(self, hatch, temp_dir):
+         workspace_root = self._create_workspace(hatch, temp_dir)
+ 
+@@ -1540,6 +1543,7 @@ def test_explicit_targets(self, hatch, temp_dir):
+             "workspace_root-0.0.1-py3-none-any.whl",
+         ]
+ 
++    @pytest.mark.requires_internet
+     def test_explicit_directory(self, hatch, temp_dir):
+         workspace_root = self._create_workspace(hatch, temp_dir)
+         build_directory = temp_dir / "artifacts"
+diff --git a/tests/cli/version/test_version.py b/tests/cli/version/test_version.py
+index eaff5a53a..ca0d914cf 100644
+--- a/tests/cli/version/test_version.py
++++ b/tests/cli/version/test_version.py
+@@ -37,6 +37,7 @@ def test_configured_project(self, hatch, temp_dir, helpers, config_file):
+         )
+ 
+ 
++@pytest.mark.requires_internet
+ def test_other_backend_show(hatch, temp_dir, helpers):
+     project_name = "My.App"
+ 

diff --git a/hatch-build.1 b/hatch-build.1
index ac1a923..41fdd5d 100644
--- a/hatch-build.1
+++ b/hatch-build.1
@@ -1,4 +1,4 @@
-.TH HATCH\-BUILD "1" "June 2026" "" "User Commands"
+.TH HATCH\-BUILD "1" "August 2026" "" "User Commands"
 .SH NAME
 .B hatch\ build
 \(en Build a project
@@ -14,6 +14,13 @@ overriding project defaults.
 This may be selected multiple times
 e.g. \fB\-t\ sdist \-t\ wheel\fR
 .TP
+.B \-a\fR, \fB\-\-all
+Whether or not to build the workspace root and every
+workspace member defined by the selected environment.
+Artifacts are written to the workspace root\(cqs
+.B dist
+directory by default
+.TP
 .B \-\-hooks\-only
 Whether or not to only execute build hooks
 [env var:

diff --git a/hatch.spec b/hatch.spec
index 3af7f63..10d30a4 100644
--- a/hatch.spec
+++ b/hatch.spec
@@ -4,7 +4,7 @@
 #global snapdate YYYYMMDD
 
 Name:           hatch
-Version:        1.17.1%{?commit:^%{snapdate}.%{sub %{commit} 1 7}}
+Version:        1.18.0%{?commit:^%{snapdate}.%{sub %{commit} 1 7}}
 Release:        %autorelease
 Summary:        A modern project, package, and virtual env manager
 
@@ -74,6 +74,20 @@ Source1600:     hatch-status.1
 Source1700:     hatch-test.1
 Source1800:     hatch-version.1
 
+# Fix a couple of tests when no “python” in path
+#
+# These CLI tests assume a “python” executable is available outside of a
+# virtualenv, which is not necessarily true (e.g. Fedora has only “python3” if
+# the `python-unversioned-command` package is not installed). Use the value of
+# `sys.executable` in the script configs for these tests instead.
+#
+# https://github.com/pypa/hatch/pull/2399
+Patch:          %{url}/pull/2399.patch
+
+# Mark a few more tests that require Internet access
+# https://github.com/pypa/hatch/pull/2400
+Patch:          %{url}/pull/2400.patch
+
 BuildSystem:    pyproject
 BuildOption(install): --assert-license hatch
 %if %{with tests}
@@ -211,24 +225,19 @@ k="${k-}${k+ and }not (TestDistributionVersions and test_pypy_custom)"
 k="${k-}${k+ and }not test_project_location_basic_set_first_project"
 k="${k-}${k+ and }not test_project_location_complex_set_first_project"
 
-# Nearly all of these require network access:
-ignore="${ignore-} --ignore=tests/cli/build/test_build.py"
-ignore="${ignore-} --ignore=tests/cli/project/test_metadata.py"
-ignore="${ignore-} --ignore=tests/workspaces/test_config.py"
-ignore="${ignore-} --ignore=tests/cli/clean/test_clean.py"
-# These require network access, from tests/cli/version/test_version.py:
-k="${k-}${k+ and }not test_other_backend_show"
-k="${k-}${k+ and }not test_plugin_dependencies_unmet"
-k="${k-}${k+ and }not test_set_dynamic"
-k="${k-}${k+ and }not test_set_dynamic_downgrade"
-k="${k-}${k+ and }not test_show_dynamic"
-k="${k-}${k+ and }not test_verbose_output_to_stderr"
-
-# Test TestUserAgent::test_user_agent_header_format fails on a pre-release
-# Python
-# https://github.com/pypa/hatch/issues/2167
-# https://bugzilla.redhat.com/show_bug.cgi?id=2432349
-k="${k-}${k+ and }not (TestUserAgent and test_user_agent_header_format)"
+# This is already gated by pytest.mark.requires_internet, so it won’t be
+# attempted while offline, but skipping it explicitly preserves our ability to
+# do local mock builds with --enable-network for diagnostic purposes.
+#
+# When there is no pre-compiled wheel for pydantic-core, this would try to
+# compile it, which needs at least a C compiler installed. (Rust/cargo would be
+# downloaded magically via rustup.)
+k="${k-}${k+ and }not (TestWorkspaceConfiguration and test_workspace_multi_service_application)"
+
+# When using flit-core, project metadata lacks "'import-names': [ 'foo' ]"
+# from PEP 794 / Core Metadata 2.5 until python-flit-core is updated to 4.x.
+k="${k-}${k+ and }not (TestPrepareMetadata and test_editable[flit-core])"
+k="${k-}${k+ and }not (TestPrepareMetadata and test_wheel[flit-core])"
 
 %pytest -k "${k-}" ${ignore-} --verbosity=2
 %endif

diff --git a/sources b/sources
index f9782b8..cee5256 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (hatch-hatch-v1.17.1.tar.gz) = 07c4d8437c5e53625e29d05525e1bbdd8b44cd27ab5d4dfdabad88657552141105f136d2174ab58ef244e8f2cc22e5a1316e675f4e0629565eec553346ab5f6f
+SHA512 (hatch-hatch-v1.18.0.tar.gz) = 2f7b4252b14beca0ee205115016a4fdaa54fa28bd725bffd495d75b787daa22922bf6d794b2684ce379aa06ca0f4abc82ab51ca9f813846730cbcf2f3c6d71c5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-19  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19  9:30 [rpms/hatch] f45: Update to 1.18.0 (close RHBZ#2513768) Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox