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-07-09 22:18:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/urlscan (Old) and /work/SRC/openSUSE:Factory/.urlscan.new.1991 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "urlscan" Thu Jul 9 22:18:46 2026 rev:20 rq:1364541 version:1.0.9 Changes: -------- --- /work/SRC/openSUSE:Factory/urlscan/urlscan.changes 2026-04-07 16:50:47.973233908 +0200 +++ /work/SRC/openSUSE:Factory/.urlscan.new.1991/urlscan.changes 2026-07-09 22:19:16.345907773 +0200 @@ -1,0 +2,7 @@ +Tue Jun 30 09:02:56 UTC 2026 - Dirk Müller <[email protected]> + +- update to 1.0.9: + * Fix webbrowser opening issue for python 3.14 + * Fix text browser usage + +------------------------------------------------------------------- Old: ---- urlscan-1.0.8.tar.gz New: ---- urlscan-1.0.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ urlscan.spec ++++++ --- /var/tmp/diff_new_pack.hjtskH/_old 2026-07-09 22:19:16.941928043 +0200 +++ /var/tmp/diff_new_pack.hjtskH/_new 2026-07-09 22:19:16.945928178 +0200 @@ -18,7 +18,7 @@ %define pythons python3 Name: urlscan -Version: 1.0.8 +Version: 1.0.9 Release: 0 Summary: An other URL extractor/viewer License: GPL-2.0-or-later ++++++ urlscan-1.0.8.tar.gz -> urlscan-1.0.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlscan-1.0.8/flake.lock new/urlscan-1.0.9/flake.lock --- old/urlscan-1.0.8/flake.lock 2026-01-25 19:10:48.000000000 +0100 +++ new/urlscan-1.0.9/flake.lock 2026-06-05 15:49:24.000000000 +0200 @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1769364097, - "narHash": "sha256-5g1N/mlTvFfUfcjIBk6DAZUetdAl2v5zL13tPhbUqxc=", + "lastModified": 1780664963, + "narHash": "sha256-quhmCnVkBYGLiBkRsSr8p4lgMf4dkfhDEnOOaTeL6w0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "421c5819ef9fcdfacb40c26c909d38d3fc9892fa", + "rev": "e8a1394ebfa6a0267ac1c26959e5672e755f6f85", "type": "github" }, "original": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlscan-1.0.8/pyproject.toml new/urlscan-1.0.9/pyproject.toml --- old/urlscan-1.0.8/pyproject.toml 2026-01-25 19:10:48.000000000 +0100 +++ new/urlscan-1.0.9/pyproject.toml 2026-06-05 15:49:24.000000000 +0200 @@ -32,6 +32,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Utilities", ] dependencies = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlscan-1.0.8/urlscan/assets/tlds-alpha-by-domain.txt new/urlscan-1.0.9/urlscan/assets/tlds-alpha-by-domain.txt --- old/urlscan-1.0.8/urlscan/assets/tlds-alpha-by-domain.txt 2026-01-25 19:10:48.000000000 +0100 +++ new/urlscan-1.0.9/urlscan/assets/tlds-alpha-by-domain.txt 2026-06-05 15:49:24.000000000 +0200 @@ -1,4 +1,4 @@ -# Version 2026012500, Last Updated Sun Jan 25 07:07:02 2026 UTC +# Version 2026060500, Last Updated Fri Jun 5 07:07:02 2026 UTC AAA AARP ABB @@ -486,7 +486,6 @@ GOLD GOLDPOINT GOLF -GOO GOODYEAR GOOG GOOGLE @@ -742,6 +741,7 @@ MEMORIAL MEN MENU +MERCK MERCKMSD MG MH @@ -1250,7 +1250,6 @@ WINE WINNERS WME -WOLTERSKLUWER WOODSIDE WORK WORKS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urlscan-1.0.8/urlscan/urlchoose.py new/urlscan-1.0.9/urlscan/urlchoose.py --- old/urlscan-1.0.8/urlscan/urlchoose.py 2026-01-25 19:10:48.000000000 +0100 +++ new/urlscan-1.0.9/urlscan/urlchoose.py 2026-06-05 15:49:24.000000000 +0200 @@ -45,6 +45,10 @@ COPY_COMMANDS = ("xsel -ib", "xclip -i -selection clipboard") COPY_COMMANDS_PRIMARY = ("xsel -i", "xclip -i") +# Text-mode browsers take over the terminal and render to stdout, so they +# must be run in the foreground with the urwid screen suspended. +TERMINAL_BROWSERS = ('elinks', 'links', 'w3m', 'lynx') + def shorten_url(url, cols, shorten): """Shorten long URLs to fit on one line. @@ -379,13 +383,13 @@ """<Enter> or <space>""" load_text = "Loading URL..." if self.link_open_modes[0] != (self.run or self.runsafe) \ else f"Executing: {self.run or self.runsafe}" - if os.environ.get('BROWSER') not in ['elinks', 'links', 'w3m', 'lynx']: + if os.environ.get('BROWSER') not in TERMINAL_BROWSERS: self._footer_display(load_text, 5) def _background_queue(self, mode): """Open URLs in background""" for url in self.queue: - self.mkbrowseto(url, mode=mode)() + self.mkbrowseto(url, mode=mode, background=True)() self.draw_screen() def _queue(self, mode=2): @@ -397,10 +401,10 @@ load_text = "Loading URLs in queue..." \ if self.link_open_modes[0] != (self.run or self.runsafe) \ else f"Executing: {self.run or self.runsafe}" - if os.environ.get('BROWSER') in ['elinks', 'links', 'w3m', 'lynx']: + if os.environ.get('BROWSER') in TERMINAL_BROWSERS: self._footer_display("Opening multiple links not support in text browsers", 5) - else: - self._footer_display(load_text, 5) + return + self._footer_display(load_text, 5) thr = Thread(target=self._background_queue, args=(mode,)) thr.start() self.queue = [] @@ -818,21 +822,40 @@ self.header.format(self.link_open_modes[0], len(self.queue))), 'header') self.top.base_widget.header = self.headerwid - def mkbrowseto(self, url, mode=0): + def mkbrowseto(self, url, mode=0, background=False): """Create the urwid callback function to open the web browser or call another function with the URL. + Args: background (default False) + If False, runs browser in a thread so it doesn't block the + urwid event loop. + """ def browse(*args): # pylint: disable=unused-argument # double ()() to ensure self.search evaluated at runtime, not when # browse() is _created_. [0] is self.search, [1] is self.enter # self.enter prevents opening URL when in search mode + if self._get_search()[0]() is True: + if self._get_search()[1]() is True: + self.search = False + self.enter = False + return + if self.link_open_modes[0] == "Web Browser" \ + and os.environ.get('BROWSER') in TERMINAL_BROWSERS: + # Text-mode browsers need control of the real terminal and + # their own stdout, so suspend the urwid screen and run them + # in the foreground. + self.loop.stop() + try: + subprocess.run([os.environ['BROWSER'], url], check=False) + finally: + self.loop.start() + self.draw_screen() + if self.single is True: + self._quit() + return with redirect_output(): - if self._get_search()[0]() is True: - if self._get_search()[1]() is True: - self.search = False - self.enter = False - elif self.link_open_modes[0] == "Web Browser": + if self.link_open_modes[0] == "Web Browser": webbrowser.open(url, new=mode) elif self.link_open_modes[0] == "Xdg-Open": subprocess.run(shlex.split(f'xdg-open "{url}"'), check=False) @@ -853,7 +876,15 @@ if self.single is True: self._quit() - return browse + + if background or os.environ.get('BROWSER') in TERMINAL_BROWSERS: + return browse + + def browse_async(*args): # pylint: disable=unused-argument + # daemon=True so quitting urlscan doesn't wait for a still-open + # browser to close. + Thread(target=browse, args=args, daemon=True).start() + return browse_async def process_urls(self, extractedurls, dedupe, shorten): """Process the 'extractedurls' and ready them for either the curses browser
