Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 60ad0d6c8c | |||
| 0908db9870 | |||
| fb071ecf90 | |||
| 9854984349 | |||
| 4add4cf921 | |||
| 5f2ca434fc |
50
fix-cli-test-fails-with-yes.patch
Normal file
50
fix-cli-test-fails-with-yes.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From de71f131cd845ba76ae288292d7c3338716b82fd Mon Sep 17 00:00:00 2001
|
||||
From: Firas AlShafei <f.alshafei@gmail.com>
|
||||
Date: Thu, 22 May 2025 21:20:19 -0500
|
||||
Subject: [PATCH] ci: add --yes flag to build tests to prevent interactive
|
||||
prompt failures
|
||||
|
||||
---
|
||||
src/towncrier/test/test_build.py | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: towncrier-24.8.0/src/towncrier/test/test_build.py
|
||||
===================================================================
|
||||
--- towncrier-24.8.0.orig/src/towncrier/test/test_build.py
|
||||
+++ towncrier-24.8.0/src/towncrier/test/test_build.py
|
||||
@@ -1143,7 +1143,7 @@ class TestCli(TestCase):
|
||||
),
|
||||
)
|
||||
|
||||
- result = runner.invoke(_main, ["--date", "01-01-2001"], catch_exceptions=False)
|
||||
+ result = runner.invoke(_main, ["--date", "01-01-2001", "--yes"], catch_exceptions=False)
|
||||
|
||||
with open("foo/newsfragments/123.feature", "w") as f:
|
||||
f.write("Adds levitation")
|
||||
@@ -1319,7 +1319,7 @@ class TestCli(TestCase):
|
||||
dedent=True,
|
||||
)
|
||||
|
||||
- result = runner.invoke(_main, ["--date", "01-01-2001"], catch_exceptions=False)
|
||||
+ result = runner.invoke(_main, ["--date", "01-01-2001", "--yes"], catch_exceptions=False)
|
||||
self.assertEqual(0, result.exit_code, result.output)
|
||||
output = read("NEWS.rst")
|
||||
|
||||
@@ -1373,7 +1373,7 @@ class TestCli(TestCase):
|
||||
dedent=True,
|
||||
)
|
||||
|
||||
- result = runner.invoke(_main, ["--date", "01-01-2001"], catch_exceptions=False)
|
||||
+ result = runner.invoke(_main, ["--date", "01-01-2001", "--yes"], catch_exceptions=False)
|
||||
self.assertEqual(0, result.exit_code, result.output)
|
||||
output = read("NEWS.md")
|
||||
|
||||
@@ -1425,7 +1425,7 @@ class TestCli(TestCase):
|
||||
dedent=True,
|
||||
)
|
||||
|
||||
- result = runner.invoke(_main, ["--date", "01-01-2001"], catch_exceptions=False)
|
||||
+ result = runner.invoke(_main, ["--date", "01-01-2001", "--yes"], catch_exceptions=False)
|
||||
self.assertEqual(0, result.exit_code, result.output)
|
||||
output = read("NEWS.md")
|
||||
|
||||
@@ -1,3 +1,107 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 21 04:35:04 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update URL.
|
||||
- Add patch support-click-8.2.patch:
|
||||
* Support Click 8.2+ changes.
|
||||
- Add patch fix-cli-test-fails-with-yes.patch:
|
||||
* Invoke ourselves with --yes to avoid interactive prompts.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 8 11:25:44 UTC 2025 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Fix dependencies
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 8 13:29:25 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 24.8.0:
|
||||
* Add .gitkeep as an ignored filename.
|
||||
* Config ignore option now supports wildcard matching via
|
||||
fnmatch.
|
||||
* Add a config for enforcing issue names using regex.
|
||||
* The template file is now ignored based only on the file name.
|
||||
* Control of the header formatting is once again completely up
|
||||
to the user when they are writing markdown files (fixes a
|
||||
regression introduced in
|
||||
[#610](https://github.com/twisted/towncrier/pull/610)).
|
||||
* Fixed an issue where issue_template failed recognizing the
|
||||
issue name of files with a non-category suffix (.md)
|
||||
* Fixed a bug where orphan news fragments (e.g.
|
||||
+abc1234.feature) would fail when an issue_pattern is
|
||||
configured. Orphan news fragments are now excempt from
|
||||
issue_pattern checks.
|
||||
* Moved towncrier version definition from
|
||||
src/towncrier/_version.py to pyproject.toml
|
||||
towncrier.__version__ was removed, after being deprecated in
|
||||
23.6.0. (#640)
|
||||
* #640, #657
|
||||
* When the template file is stored in the same directory with
|
||||
the news fragments, it is automatically ignored when checking
|
||||
for valid fragment file names.
|
||||
* #629, #630
|
||||
* towncrier build now handles removing news fragments which are
|
||||
not part of the git repository. For example, uncommitted or
|
||||
unstaged files. (#357)
|
||||
* Inferring the version of a Python package now tries to use
|
||||
the metadata of the installed package before importing the
|
||||
package explicitly (which only looks for
|
||||
[package].__version__). (#432)
|
||||
* If no filename is given when doing towncrier create,
|
||||
interactively ask for the issue number and fragment type (and
|
||||
then launch an interactive editor for the fragment content).
|
||||
Now by default, when creating a fragment it will be appended
|
||||
with the filename option's extension (unless an extension is
|
||||
explicitly provided). For example, towncrier create
|
||||
123.feature will create news/123.feature.rst. This can be
|
||||
changed in configuration file by setting add_extension =
|
||||
false. A new line is now added by default to the end of the
|
||||
fragment contents. This can be reverted in the configuration
|
||||
file by setting add_newline = false. (#482)
|
||||
* The temporary file towncrier create creates now uses the
|
||||
correct .rst or .md extension, which may help your editor
|
||||
with with syntax highlighting. (#594)
|
||||
* Running towncrier will now traverse back up directories
|
||||
looking for the configuration file. (#601)
|
||||
* The towncrier create action now uses sections defined in your
|
||||
config (either interactively, or via the new --section
|
||||
option). (#603)
|
||||
* News fragments are now sorted by issue number even if they
|
||||
have non-digit characters. For example: - some issue (gh-3,
|
||||
gh-10) - another issue (gh-4) - yet another issue (gh-11)
|
||||
The sorting algorithm groups the issues first by non-text
|
||||
characters and then by number. (#608)
|
||||
* The title_format configuration option now uses a markdown
|
||||
format for markdown templates. (#610)
|
||||
* newsfragment categories can now be marked with check = false,
|
||||
causing them to be ignored in towncrier check (#617)
|
||||
* towncrier check will now fail if any news fragments have
|
||||
invalid filenames. Added a new configuration option called
|
||||
ignore that allows you to specify a list of filenames that
|
||||
should be ignored. If this is set, towncrier build will also
|
||||
fail if any filenames are invalid, except for those in the
|
||||
list. (#622)
|
||||
* Add explicit encoding to read_text.
|
||||
* The default Markdown template now renders a title containing
|
||||
the release version and date, even when the name
|
||||
configuration is left empty.
|
||||
* Orphan news fragments, fragments not associated with an
|
||||
issue, consisting of only digits (e.g. '+12345678.feature')
|
||||
now retain their leading marker character.
|
||||
* Orphan news fragments, fragments not associated with an
|
||||
issue, will now still show in categories that are marked to
|
||||
not show content, since they do not have an issue number to
|
||||
show.
|
||||
* Clarify version discovery behavior.
|
||||
* The tutorial now introduces the filename option in the
|
||||
appropriate paragraph and mentions its default value.
|
||||
* Add docs to explain how towncrier create +.feature.rst
|
||||
(orphan fragments) works.
|
||||
* #491, #561, #562, #568, #569, #571, #574, #575, #582, #591,
|
||||
#596, #597, #625
|
||||
* build now treats a missing fragments directory the same as an
|
||||
empty one, consistent with other operations.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 19 08:05:27 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-towncrier
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,39 +18,42 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-towncrier
|
||||
Version: 23.11.0
|
||||
Version: 24.8.0
|
||||
Release: 0
|
||||
Summary: Building newsfiles for your project
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/hawkowl/towncrier
|
||||
URL: https://github.com/twisted/towncrier
|
||||
Source: https://files.pythonhosted.org/packages/source/t/towncrier/towncrier-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM Based on gh#twisted/towncrier#709/commits/2fee0e7f103161175424867c9716339a196bc957
|
||||
Patch0: support-click-8.2.patch
|
||||
# PATCH-FIX-UPSTREAM Based on gh#twisted/towncrier#709/commits/de71f131cd845ba76ae288292d7c3338716b82fd
|
||||
Patch1: fix-cli-test-fails-with-yes.patch
|
||||
BuildRequires: %{python_module Jinja2}
|
||||
BuildRequires: %{python_module click}
|
||||
BuildRequires: %{python_module hatchling}
|
||||
BuildRequires: %{python_module importlib-resources}
|
||||
BuildRequires: %{python_module incremental}
|
||||
BuildRequires: %{python_module importlib-metadata >= 4.6 if %python-base < 3.10}
|
||||
BuildRequires: %{python_module importlib-resources >= 5 if %python-base < 3.10}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: %{python_module tomli if %python-base < 3.11}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: git-core
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: git-core
|
||||
Requires: python-Jinja2
|
||||
Requires: python-click
|
||||
Requires: python-importlib-resources
|
||||
Requires: python-incremental
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%if 0%{?python_version_nodots} < 310
|
||||
Requires: python-importlib-metadata >= 4.6
|
||||
Requires: python-importlib-resources >= 5
|
||||
%endif
|
||||
%if 0%{?python_version_nodots} < 311
|
||||
Requires: python-tomli
|
||||
%endif
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module Jinja2}
|
||||
BuildRequires: %{python_module Twisted}
|
||||
BuildRequires: %{python_module click}
|
||||
BuildRequires: %{python_module incremental}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module tomli}
|
||||
BuildRequires: git-core
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
@@ -58,7 +61,7 @@ BuildRequires: git-core
|
||||
Building newsfiles for your project.
|
||||
|
||||
%prep
|
||||
%setup -q -n towncrier-%{version}
|
||||
%autosetup -p1 -n towncrier-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
36
support-click-8.2.patch
Normal file
36
support-click-8.2.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 2fee0e7f103161175424867c9716339a196bc957 Mon Sep 17 00:00:00 2001
|
||||
From: Firas AlShafei <f.alshafei@gmail.com>
|
||||
Date: Thu, 22 May 2025 21:17:15 -0500
|
||||
Subject: [PATCH] ci: fix clirunner
|
||||
|
||||
- Adapt CliRunner for different Click library versions to correctly handle error messages.
|
||||
---
|
||||
src/towncrier/test/test_check.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: towncrier-24.8.0/src/towncrier/test/test_check.py
|
||||
===================================================================
|
||||
--- towncrier-24.8.0.orig/src/towncrier/test/test_check.py
|
||||
+++ towncrier-24.8.0/src/towncrier/test/test_check.py
|
||||
@@ -245,7 +245,12 @@ class TestChecker(TestCase):
|
||||
"""
|
||||
No failure when output is piped causing None encoding for stdout.
|
||||
"""
|
||||
- runner = CliRunner()
|
||||
+ try:
|
||||
+ runner = CliRunner(mix_stderr=False)
|
||||
+ except TypeError:
|
||||
+ # Fallback for older Click versions (or unexpected signature)
|
||||
+ print("TypeError with mix_stderr=False, falling back to echo_stdin=True")
|
||||
+ runner = CliRunner(echo_stdin=True)
|
||||
|
||||
with runner.isolated_filesystem():
|
||||
create_project("pyproject.toml", main_branch="master")
|
||||
@@ -257,7 +262,6 @@ class TestChecker(TestCase):
|
||||
call(["git", "add", fragment_path])
|
||||
call(["git", "commit", "-m", "add a newsfragment"])
|
||||
|
||||
- runner = CliRunner(mix_stderr=False)
|
||||
result = runner.invoke(towncrier_check, ["--compare-with", "master"])
|
||||
|
||||
self.assertEqual(0, result.exit_code)
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:13937c247e3f8ae20ac44d895cf5f96a60ad46cfdcc1671759530d7837d9ee5d
|
||||
size 51483
|
||||
3
towncrier-24.8.0.tar.gz
Normal file
3
towncrier-24.8.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:013423ee7eed102b2f393c287d22d95f66f1a3ea10a4baa82d298001a7f18af3
|
||||
size 61635
|
||||
Reference in New Issue
Block a user