Notification time stamped 2023-01-01 00:17:05 UTC
From eef9ad886c83bacc5c1e1e29f23ca5ca47f7343e Mon Sep 17 00:00:00 2001
From: Benjamin A. Beasley <code(a)musicinmybrain.net>
Date: Dec 31 2022 17:07:34 +0000
Subject: Patch tests for hatchling 1.12
---
diff --git a/hatch.spec b/hatch.spec
index 6fb4e7e..b9c66e5 100644
--- a/hatch.spec
+++ b/hatch.spec
@@ -54,6 +54,15 @@ Source1100: hatch-shell.1
Source1200: hatch-status.1
Source1300: hatch-version.1
+# Partial backport of upstream commit 0201239cea9e5ada8133f076a243f95c467426e3
+# so that test TestTemplate.test_create_necessary_directories continues to pass
+# with hatchling 1.12, but without the changelog entry. For hatch (vs.
+# hatchling) the only change is in the test.
+#
+# Remove unnecessary encoding declaration
+# https://github.com/pypa/hatch/pull/659
+Patch: pr-659.patch
+
BuildArch: noarch
BuildRequires: python3-devel
diff --git a/pr-659.patch b/pr-659.patch
new file mode 100644
index 0000000..0468b14
--- /dev/null
+++ b/pr-659.patch
@@ -0,0 +1,32 @@
+diff --git a/backend/src/hatchling/version/core.py b/backend/src/hatchling/version/core.py
+index 38c26aca..cad01f94 100644
+--- a/backend/src/hatchling/version/core.py
++++ b/backend/src/hatchling/version/core.py
+@@ -5,7 +5,6 @@
+
+ DEFAULT_PATTERN = r'(?i)^(__version__|VERSION) *= *([\'"])v?(?P<version>.+?)\2'
+ DEFAULT_TEMPLATE = """\
+-# -*- coding: utf-8 -*-
+ # This file is auto-generated by Hatchling. As such, do not:
+ # - modify
+ # - track in version control e.g. be sure to add to .gitignore
+diff --git a/tests/backend/builders/hooks/test_version.py b/tests/backend/builders/hooks/test_version.py
+index 3b916d3e..b0350029 100644
+--- a/tests/backend/builders/hooks/test_version.py
++++ b/tests/backend/builders/hooks/test_version.py
+@@ -91,7 +91,6 @@ def update(self, metadata):
+ assert expected_file.is_file()
+ assert expected_file.read_text() == helpers.dedent(
+ """
+- # -*- coding: utf-8 -*-
+ # This file is auto-generated by Hatchling. As such, do not:
+ # - modify
+ # - track in version control e.g. be sure to add to .gitignore
+@@ -132,7 +131,6 @@ def update(self, metadata):
+ assert expected_file.is_file()
+ assert expected_file.read_text() == helpers.dedent(
+ """
+- # -*- coding: utf-8 -*-
+ # This file is auto-generated by Hatchling. As such, do not:
+ # - modify
+ # - track in version control e.g. be sure to add to .gitignore
https://src.fedoraproject.org/rpms/hatch/c/eef9ad886c83bacc5c1e1e29f23ca5ca…