#2 Update to 23.11.0
Merged a month ago by adamwill. Opened a month ago by adamwill.
rpms/ adamwill/python-towncrier 23110  into  rawhide

file modified
+1
@@ -3,3 +3,4 @@ 

  /towncrier-21.3.0.tar.gz

  /towncrier-21.9.0.tar.gz

  /towncrier-22.12.0.tar.gz

+ /towncrier-23.11.0.tar.gz

file modified
+4 -7
@@ -7,17 +7,15 @@ 

  fragments" which contain information useful to end users.}

  

  Name:           python-%{srcname}

- Version:        22.12.0

+ Version:        23.11.0

  Release:        %autorelease

  Summary:        Building newsfiles for your project

  

  License:        MIT

  URL:            https://github.com/hawkowl/towncrier

  Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz

- # Relax setuptools, wheel, incremental deps

- Patch0:         towncrier-relax-deps.patch

- # Remove test expecting towncrier in path

- Patch1:         towncrier-remove-version-test.patch

+ # Relax hatchling, incremental deps

+ Patch:          towncrier-relax-deps.patch

  

  BuildArch:      noarch

  BuildRequires:  python3-devel
@@ -46,8 +44,7 @@ 

  %pyproject_save_files %{srcname}

  

  %check

- rm -rfv $PWD/build/lib/towncrier/test/test_check.py $PWD/build/lib/towncrier/test/test_project.py

- PYTHONPATH=$PWD/build/lib %{_bindir}/trial towncrier

+ %{py3_test_envvars} %{_bindir}/trial towncrier

While touching this, I wonder why this needs to be %{_bindir}/trial rather than trial. (Not a blocker.)

  

  %files -n python3-%{srcname} -f %{pyproject_files}

  %doc README.rst

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (towncrier-22.12.0.tar.gz) = 6fad515b2368f2c1ee27673080607460949d6651d3c9b9ab106b8e7f0298d0748a4ec1424f73bb7bf8a81eef5b0fa74de6a0b7295f02f02f354f20a99eb30814

+ SHA512 (towncrier-23.11.0.tar.gz) = 6226ef75c163748872f0f5d60c03629365cf0a942412ca791ea28762a227942d974f8573205551678735380629eadf2bf726478b0ef1d4d1e6ee14b47e25fbae

file modified
+6 -10
@@ -1,16 +1,12 @@ 

- diff -up towncrier-22.12.0/pyproject.toml.orig towncrier-22.12.0/pyproject.toml

- --- towncrier-22.12.0/pyproject.toml.orig	2023-03-19 10:40:22.959559977 +0100

- +++ towncrier-22.12.0/pyproject.toml	2023-03-19 10:41:25.976090904 +0100

- @@ -79,9 +79,9 @@ ignore_missing_imports = true

-  

+ --- towncrier-23.11.0/pyproject.toml	2023-11-08 06:21:07.000000000 -0800

+ +++ towncrier-23.11.0/pyproject.toml.new	2024-04-17 15:24:50.534563349 -0700

+ @@ -1,7 +1,7 @@

   [build-system]

   requires = [

- -    "setuptools ~= 44.1.1",

- -    "wheel ~= 0.36.2",

+ -    "hatchling ~= 1.17.1",

I'm not sure why we are replacing setuptools with hatchling in the first place, but that can be an issue for a separate PR

I'm not sure why we are replacing setuptools with hatchling

Upstream did that. This only updates the patch. Reviewing a diff of a diff makes it hard to see.

  -    "incremental == 22.10.0",

- +    "setuptools >= 44.1.1",

- +    "wheel >= 0.36.2",

+ +    "hatchling >= 1.17.1",

  +    "incremental >= 22.10.0",

   ]

-  build-backend = "setuptools.build_meta"

+  build-backend = "hatchling.build"

   

@@ -1,13 +0,0 @@ 

- diff -up towncrier-21.9.0/src/towncrier/test/test_project.py.orig towncrier-21.9.0/src/towncrier/test/test_project.py

- --- towncrier-21.9.0/src/towncrier/test/test_project.py.orig	2022-02-10 19:29:38.000000000 +0100

- +++ towncrier-21.9.0/src/towncrier/test/test_project.py	2022-06-23 20:49:23.732509545 +0200

- @@ -120,9 +120,3 @@ class InvocationTests(TestCase):

-          finally:

-              os.chdir(orig_dir)

-  

- -    def test_version(self):

- -        """

- -        `--version` command line option is available to show the current production version.

- -        """

- -        out = check_output(["towncrier", "--version"])

- -        self.assertTrue(out.startswith(b"towncrier, version 2"))

no initial comment

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/dbd3d45f2df04d9482ed3f4190c057c9

While touching this, I wonder why this needs to be %{_bindir}/trial rather than trial. (Not a blocker.)

I'm not sure why we are replacing setuptools with hatchling in the first place, but that can be an issue for a separate PR

I'm not sure why we are replacing setuptools with hatchling

Upstream did that. This only updates the patch. Reviewing a diff of a diff makes it hard to see.

I'm not sure why we are replacing setuptools with hatchling

Upstream did that. This only updates the patch. Reviewing a diff of a diff makes it hard to see.

🤦

While touching this, I wonder why this needs to be %{_bindir}/trial rather than trial. (Not a blocker.)

Yeah, ideally the change as part of the Update to 23.11.0 commit can be reverted and this be fixed in a second commit (with [skip changelog]. Even though %{py3_test_envvars} modifies $PATH to include %{buildroot}%{_bindir}, I'd probably change this to %{buildroot}%{_bindir}/trial for explicitness (you want to test the version currently being packaged, not any other version that may be installed).

trial doesn't come from towncrier, it's part of twisted, I think.

I wanted to make the changes as minimal as possible to achieve the version upgrade and keep the tests working, I think tweaks like that could come after.

to be clear, I did not change the way trial is invoked as part of this PR at all. All I did was replace the custom env var set attempt (PYTHONPATH=$PWD/build/lib) with the standard %{py3_test_envvars}. PYTHONPATH=$PWD/build/lib doesn't seem to work any more, and anyway, it's not really right, we want to test what has been installed at this point, not what it in the sources. So it seemed to make the most sense just to switch to %{py3_test_envvars}. But the rest of the line after that point is unchanged, it already was %{_bindir}/trial towncrier.

Okay, I am being completely oblivious today. I'm sorry. What you did makes sense to me. I think the only other thing is referencing rhbz#2122042 in the commit message.

For the record, I believe the change from $PWD/build/lib to %{py3_test_envvars} is well justified to happen here, as the original is setuptools-specific. My comment about the other part of that command was merely an observation of the status quo rather than feedback for the change itself, sorry for not making that more obvious :D

python-memray, the only dependent package I found in Fedora, still builds fine with this version (verified in mock). I am not sure the package even actually uses towncrier during the build, but I did not bother to check.

the reason I was poking it at all was to see how my huge news snippet in https://github.com/fedora-infra/bodhi/pull/5630 looks. i ran it locally (with an ugly hack to make it find a version - that doesn't seem to work with the old version or the new one when running on a current bodhi git checkout, I was hoping the new version would help :/) and it seems to work okay. hardly an extensive check, though.

oh, yeah, I was gonna do that. let's.

Pull-Request has been merged by adamwill

a month ago