Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package urlscan for openSUSE:Factory checked 
in at 2026-08-17 16:59:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/urlscan (Old)
 and      /work/SRC/openSUSE:Factory/.urlscan.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "urlscan"

Mon Aug 17 16:59:31 2026 rev:21 rq:1371522 version:1.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/urlscan/urlscan.changes  2026-07-09 
22:19:16.345907773 +0200
+++ /work/SRC/openSUSE:Factory/.urlscan.new.1258/urlscan.changes        
2026-08-17 17:02:53.250288491 +0200
@@ -1,0 +2,8 @@
+Mon Aug 17 06:34:41 UTC 2026 - Dr. Werner Fink <[email protected]>
+
+- Update to urlscan 1.1.2:
+  * Fix bug in flake version regex
+  * Hardcode the version in __init__.py instead of deriving it
+    from git tags with hatch-vcs.
+
+-------------------------------------------------------------------

Old:
----
  urlscan-1.0.9.tar.gz

New:
----
  urlscan-1.1.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ urlscan.spec ++++++
--- /var/tmp/diff_new_pack.59yHMl/_old  2026-08-17 17:02:53.877310606 +0200
+++ /var/tmp/diff_new_pack.59yHMl/_new  2026-08-17 17:02:53.879310676 +0200
@@ -18,7 +18,7 @@
 
 %define pythons python3
 Name:           urlscan
-Version:        1.0.9
+Version:        1.1.2
 Release:        0
 Summary:        An other URL extractor/viewer
 License:        GPL-2.0-or-later

++++++ urlscan-1.0.9.tar.gz -> urlscan-1.1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/.github/workflows/main.yml 
new/urlscan-1.1.2/.github/workflows/main.yml
--- old/urlscan-1.0.9/.github/workflows/main.yml        2026-06-05 
15:49:24.000000000 +0200
+++ new/urlscan-1.1.2/.github/workflows/main.yml        2026-08-16 
17:27:54.000000000 +0200
@@ -15,8 +15,6 @@
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-        with:
-          fetch-depth: 0  # Ensures version gets set correctly
 
       - name: Set up Python
         uses: actions/setup-python@v5
@@ -26,7 +24,35 @@
       - name: Install Hatch
         run: |
           python -m pip install --upgrade pip
-          pip install hatch hatchling hatch-vcs
+          pip install hatch hatchling
+
+      # The version is hardcoded in urlscan/__init__.py, so a tag can disagree
+      # with it. Fail here rather than publishing the wrong version to PyPI.
+      - name: Verify tag matches __version__
+        if: startsWith(github.ref, 'refs/tags/')
+        run: |
+          version=$(hatch version 2>/dev/null | tail -n1 | tr -d '[:space:]')
+          if [ "$version" != "$GITHUB_REF_NAME" ]; then
+            echo "::error::tag $GITHUB_REF_NAME does not match __version__ 
$version"
+            exit 1
+          fi
+
+      # Non-tag builds go to TestPyPI, which rejects duplicate versions. Give
+      # each one a unique .devN suffix.
+      - name: Set dev version for TestPyPI
+        if: "!startsWith(github.ref, 'refs/tags/')"
+        run: |
+          python - <<'EOF'
+          import os, pathlib, re
+          init = pathlib.Path("urlscan/__init__.py")
+          text = init.read_text()
+          current = re.search(r'^__version__ = "(.+)"$', text, re.M).group(1)
+          major, minor, patch = (int(p) for p in current.split("."))
+          dev = f'{major}.{minor}.{patch + 
1}.dev{os.environ["GITHUB_RUN_NUMBER"]}'
+          init.write_text(text.replace(f'__version__ = "{current}"',
+                                       f'__version__ = "{dev}"', 1))
+          print(f"building {dev}")
+          EOF
 
       - name: Build package
         run: hatch build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/.gitignore new/urlscan-1.1.2/.gitignore
--- old/urlscan-1.0.9/.gitignore        2026-06-05 15:49:24.000000000 +0200
+++ new/urlscan-1.1.2/.gitignore        2026-08-16 17:27:54.000000000 +0200
@@ -8,5 +8,4 @@
 build
 dist
 test_emails/
-urlscan/_version.py
 MANIFEST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/Makefile new/urlscan-1.1.2/Makefile
--- old/urlscan-1.0.9/Makefile  1970-01-01 01:00:00.000000000 +0100
+++ new/urlscan-1.1.2/Makefile  2026-08-16 17:27:54.000000000 +0200
@@ -0,0 +1,45 @@
+# Print the version recorded in urlscan/__init__.py
+version:
+       @grep -Po '^__version__ = "\K[^"]+' urlscan/__init__.py
+
+# Bump __version__, refresh the man page date, commit, and create an annotated
+# tag. $EDITOR prefilled with version and commits since the last tag.
+# Usage: make release VERSION=1.1.0
+release:
+       @test -n "$(VERSION)" || { echo "Usage: make release VERSION=x.y.z"; 
exit 1; }
+       @echo "$(VERSION)" | grep -Pq '^\d+\.\d+\.\d+$$' || \
+               { echo "VERSION must be x.y.z"; exit 1; }
+       @test -z "$$(git status --porcelain -uno)" || \
+               { echo "Tracked files have uncommitted changes; commit or stash 
first"; exit 1; }
+       @git rev-parse -q --verify refs/tags/$(VERSION) >/dev/null && \
+               { echo "Tag $(VERSION) already exists"; exit 1; } || true
+       sed -i 's/^__version__ = ".*"$$/__version__ = "$(VERSION)"/' 
urlscan/__init__.py
+       # urlscan.1 is hand-written roff, so only the .TH date is refreshed 
here.
+       sed -i "s/^\.TH URLSCAN 1 \".*\"/.TH URLSCAN 1 \"$$(date '+%-d %B 
%Y')\"/" \
+               urlscan.1
+       @test "$$($(MAKE) -s version)" = "$(VERSION)" || \
+               { echo "Failed to set version"; exit 1; }
+       git commit -m "Bump version to $(VERSION)" urlscan/__init__.py urlscan.1
+       # Open the tag message prefilled with the version as the subject and one
+       # bullet per commit since the last tag.
+       @notes=$$(mktemp); \
+       prev=$$(git describe --tags --abbrev=0 2>/dev/null); \
+       { echo "$(VERSION)"; echo; \
+         git log --no-merges --invert-grep \
+               --grep='^Bump version to ' --format='* %s' \
+               $${prev:+$$prev..}HEAD; } > $$notes; \
+       git tag -a -e -F $$notes $(VERSION); status=$$?; \
+       rm -f $$notes; \
+       test $$status -eq 0 || exit $$status; \
+       test -n "$$(git for-each-ref --format='%(contents:body)' \
+               refs/tags/$(VERSION))" || { \
+               git tag -d $(VERSION) >/dev/null; \
+               echo "Tag message body is empty, so the release notes would be 
too."; \
+               echo "Tag not created. The version bump commit is still 
there;"; \
+               echo "undo it with: git reset --hard HEAD^"; \
+               exit 1; }
+       @echo
+       @echo "Tagged $(VERSION). Push with:"
+       @echo "    git push origin $$(git rev-parse --abbrev-ref HEAD) 
--follow-tags"
+
+.PHONY: version release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/README.md new/urlscan-1.1.2/README.md
--- old/urlscan-1.0.9/README.md 2026-06-05 15:49:24.000000000 +0200
+++ new/urlscan-1.1.2/README.md 2026-08-16 17:27:54.000000000 +0200
@@ -232,14 +232,23 @@
 - flake.nix is available for a development shell or building/testing the 
package
   if desired. `nix develop`
 - To update TLD list: `wget https://data.iana.org/TLD/tlds-alpha-by-domain.txt`
+- The version is hardcoded in `urlscan/__init__.py` (`make version` or
+  `urlscan -V`). Anything else needing a version number reads from there.
 - GitHub Action will upload to TestPyPi on each push to `main`. To create a
-  GitHub and PyPi release, create a new tag (formatting below) and push tags.
+  GitHub and PyPi release, run `make release VERSION=x.y.z`. It bumps
+  `__version__`, refreshes the man page date, commits, and opens an editor for
+  the annotated tag, prefilled with the version as the subject and one bullet
+  per commit since the last tag.
+
+        <tag name on first line, prefilled>
 
-        <tag name on first line>
-        
         * Release note 1
         * Release note 2
         * ...
 
+  Then push the commit and tag: `git push origin main --follow-tags`. The
+  GitHub Action fails the build if a pushed tag does not match `__version__`,
+  so nothing mismatched can reach PyPi.
+
 [1]: http://urwid.org/manual/displayattributes.html#display-attributes  "Urwid 
display attributes"
 [2]: https://hatch.pypa.io/latest/  "Hatch"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/flake.nix new/urlscan-1.1.2/flake.nix
--- old/urlscan-1.0.9/flake.nix 2026-06-05 15:49:24.000000000 +0200
+++ new/urlscan-1.1.2/flake.nix 2026-08-16 17:27:54.000000000 +0200
@@ -40,19 +40,16 @@
       commonPackages,
     }: {
       default = pkgs.python3Packages.buildPythonApplication {
-        name = "urlscan";
         pname = "urlscan";
+        version = builtins.head (builtins.match
+          ".*__version__ = \"([^\"]+)\".*"
+          (builtins.readFile ./urlscan/__init__.py));
         format = "pyproject";
         src = ./.;
         nativeBuildInputs = builtins.attrValues {
           inherit
-            (pkgs)
-            git
-            ;
-          inherit
             (pkgs.python3Packages)
             hatchling
-            hatch-vcs
             ;
         };
         propagatedBuildInputs = commonPackages;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/pyproject.toml 
new/urlscan-1.1.2/pyproject.toml
--- old/urlscan-1.0.9/pyproject.toml    2026-06-05 15:49:24.000000000 +0200
+++ new/urlscan-1.1.2/pyproject.toml    2026-08-16 17:27:54.000000000 +0200
@@ -1,5 +1,5 @@
 [build-system]
-requires = ["hatchling", "hatch-vcs"]
+requires = ["hatchling"]
 build-backend = "hatchling.build"
 
 [project]
@@ -46,14 +46,7 @@
 Homepage = "https://github.com/firecat53/urlscan";
 
 [tool.hatch.version]
-source = "vcs"
-fallback-version = "0.0.0"
-
-[tool.hatch.version.raw-options]
-local_scheme = "no-local-version"
-
-[tool.hatch.build.hooks.vcs]
-version-file = "urlscan/_version.py"
+path = "urlscan/__init__.py"
 
 [tool.hatch.build.targets.wheel.shared-data]
 LICENSE = "share/doc/urlscan/LICENSE"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/urlscan/__init__.py 
new/urlscan-1.1.2/urlscan/__init__.py
--- old/urlscan-1.0.9/urlscan/__init__.py       2026-06-05 15:49:24.000000000 
+0200
+++ new/urlscan-1.1.2/urlscan/__init__.py       2026-08-16 17:27:54.000000000 
+0200
@@ -1 +1,3 @@
+__version__ = "1.1.2"
+
 __all__ = ['browser', 'urlchoose', 'urlscan']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/urlscan/__main__.py 
new/urlscan-1.1.2/urlscan/__main__.py
--- old/urlscan-1.0.9/urlscan/__main__.py       2026-06-05 15:49:24.000000000 
+0200
+++ new/urlscan-1.1.2/urlscan/__main__.py       2026-08-16 17:27:54.000000000 
+0200
@@ -28,7 +28,7 @@
 from email import policy
 from email.parser import BytesParser
 from urlscan import urlchoose, urlscan
-from urlscan._version import version
+from urlscan import __version__
 
 
 def parse_arguments():
@@ -175,7 +175,7 @@
     """
     args = parse_arguments()
     if args.version is True:
-        print(version)
+        print(__version__)
         return
     if args.genconf is True:
         urlchoose.URLChooser([], genconf=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/urlscan-1.0.9/urlscan.1 new/urlscan-1.1.2/urlscan.1
--- old/urlscan-1.0.9/urlscan.1 2026-06-05 15:49:24.000000000 +0200
+++ new/urlscan-1.1.2/urlscan.1 2026-08-16 17:27:54.000000000 +0200
@@ -1,6 +1,6 @@
 .\"                                      Hey, EMACS: -*- nroff -*-
 
-.TH URLSCAN 1 "1 June 2024"
+.TH URLSCAN 1 "16 August 2026"
 
 .SH NAME
 urlscan \- browse the URLs in an email message from a terminal

Reply via email to