Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Pallets-Sphinx-Themes for 
openSUSE:Factory checked in at 2023-01-08 21:25:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Pallets-Sphinx-Themes (Old)
 and      /work/SRC/openSUSE:Factory/.python-Pallets-Sphinx-Themes.new.1563 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Pallets-Sphinx-Themes"

Sun Jan  8 21:25:06 2023 rev:2 rq:1056716 version:2.0.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-Pallets-Sphinx-Themes/python-Pallets-Sphinx-Themes.changes
        2022-09-14 13:45:29.157970360 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-Pallets-Sphinx-Themes.new.1563/python-Pallets-Sphinx-Themes.changes
      2023-01-08 21:25:06.807095236 +0100
@@ -1,0 +2,6 @@
+Fri Jan  6 22:00:08 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.0.3:
+  * Fix compatibility with ``packaging>=22``.
+
+-------------------------------------------------------------------

Old:
----
  Pallets-Sphinx-Themes-2.0.2.tar.gz

New:
----
  Pallets-Sphinx-Themes-2.0.3.tar.gz

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

Other differences:
------------------
++++++ python-Pallets-Sphinx-Themes.spec ++++++
--- /var/tmp/diff_new_pack.9sSnM4/_old  2023-01-08 21:25:07.475099206 +0100
+++ /var/tmp/diff_new_pack.9sSnM4/_new  2023-01-08 21:25:07.479099229 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Pallets-Sphinx-Themes
 #
-# Copyright (c) 2022 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,25 +12,25 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-Pallets-Sphinx-Themes
-Version:        2.0.2
+Version:        2.0.3
 Release:        0
 Summary:        Themes for the Pallets projects.
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
-Url:            https://github.com/pallets/pallets-sphinx-themes/
+URL:            https://github.com/pallets/pallets-sphinx-themes/
 Source:         
https://files.pythonhosted.org/packages/source/P/Pallets-Sphinx-Themes/Pallets-Sphinx-Themes-%{version}.tar.gz
-BuildRequires:  %{python_module packaging}
 BuildRequires:  %{python_module Sphinx}
+BuildRequires:  %{python_module packaging}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
-Requires:       python-packaging
 Requires:       python-Sphinx
+Requires:       python-packaging
 BuildRequires:  python-rpm-macros
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
@@ -41,7 +41,6 @@
 the appropriate theme to make your documentation look consistent.
 Available themes: flask, jinja, werkzeug, click
 
-
 %prep
 %setup -q -n Pallets-Sphinx-Themes-%{version}
 

++++++ Pallets-Sphinx-Themes-2.0.2.tar.gz -> Pallets-Sphinx-Themes-2.0.3.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Pallets-Sphinx-Themes-2.0.2/CHANGES.rst 
new/Pallets-Sphinx-Themes-2.0.3/CHANGES.rst
--- old/Pallets-Sphinx-Themes-2.0.2/CHANGES.rst 2021-11-10 18:59:23.000000000 
+0100
+++ new/Pallets-Sphinx-Themes-2.0.3/CHANGES.rst 2022-12-24 18:12:26.000000000 
+0100
@@ -1,3 +1,11 @@
+Version 2.0.3
+-------------
+
+Released 2022-12-24
+
+-   Fix compatibility with ``packaging>=22``.
+
+
 Version 2.0.2
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Pallets-Sphinx-Themes-2.0.2/PKG-INFO 
new/Pallets-Sphinx-Themes-2.0.3/PKG-INFO
--- old/Pallets-Sphinx-Themes-2.0.2/PKG-INFO    2021-11-10 18:59:54.198879200 
+0100
+++ new/Pallets-Sphinx-Themes-2.0.3/PKG-INFO    2022-12-24 18:13:29.126101300 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Pallets-Sphinx-Themes
-Version: 2.0.2
+Version: 2.0.3
 Summary: Sphinx themes for Pallets and related projects.
 Home-page: https://github.com/pallets/pallets-sphinx-themes/
 Author: Pallets
@@ -11,7 +11,6 @@
 Project-URL: Issue Tracker, 
https://github.com/pallets/pallets-sphinx-themes/issues/
 Project-URL: Twitter, https://twitter.com/PalletsTeam
 Project-URL: Chat, https://discord.gg/pallets
-Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Framework :: Sphinx
 Classifier: Framework :: Sphinx :: Theme
@@ -55,5 +54,3 @@
     ]
 
     html_theme = "flask"
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Pallets-Sphinx-Themes-2.0.2/setup.cfg 
new/Pallets-Sphinx-Themes-2.0.3/setup.cfg
--- old/Pallets-Sphinx-Themes-2.0.2/setup.cfg   2021-11-10 18:59:54.198879200 
+0100
+++ new/Pallets-Sphinx-Themes-2.0.3/setup.cfg   2022-12-24 18:13:29.126101300 
+0100
@@ -1,6 +1,6 @@
 [metadata]
 name = Pallets-Sphinx-Themes
-version = 2.0.2
+version = 2.0.3
 url = https://github.com/pallets/pallets-sphinx-themes/
 project_urls = 
        Donate = https://palletsprojects.com/donate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Pallets-Sphinx-Themes-2.0.2/src/Pallets_Sphinx_Themes.egg-info/PKG-INFO 
new/Pallets-Sphinx-Themes-2.0.3/src/Pallets_Sphinx_Themes.egg-info/PKG-INFO
--- old/Pallets-Sphinx-Themes-2.0.2/src/Pallets_Sphinx_Themes.egg-info/PKG-INFO 
2021-11-10 18:59:54.000000000 +0100
+++ new/Pallets-Sphinx-Themes-2.0.3/src/Pallets_Sphinx_Themes.egg-info/PKG-INFO 
2022-12-24 18:13:29.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Pallets-Sphinx-Themes
-Version: 2.0.2
+Version: 2.0.3
 Summary: Sphinx themes for Pallets and related projects.
 Home-page: https://github.com/pallets/pallets-sphinx-themes/
 Author: Pallets
@@ -11,7 +11,6 @@
 Project-URL: Issue Tracker, 
https://github.com/pallets/pallets-sphinx-themes/issues/
 Project-URL: Twitter, https://twitter.com/PalletsTeam
 Project-URL: Chat, https://discord.gg/pallets
-Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Framework :: Sphinx
 Classifier: Framework :: Sphinx :: Theme
@@ -55,5 +54,3 @@
     ]
 
     html_theme = "flask"
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Pallets-Sphinx-Themes-2.0.2/src/Pallets_Sphinx_Themes.egg-info/entry_points.txt
 
new/Pallets-Sphinx-Themes-2.0.3/src/Pallets_Sphinx_Themes.egg-info/entry_points.txt
--- 
old/Pallets-Sphinx-Themes-2.0.2/src/Pallets_Sphinx_Themes.egg-info/entry_points.txt
 2021-11-10 18:59:54.000000000 +0100
+++ 
new/Pallets-Sphinx-Themes-2.0.3/src/Pallets_Sphinx_Themes.egg-info/entry_points.txt
 2022-12-24 18:13:29.000000000 +0100
@@ -1,4 +1,3 @@
 [pygments.styles]
 jinja = pallets_sphinx_themes.themes.jinja:JinjaStyle
 pocoo = pallets_sphinx_themes.themes.pocoo:PocooStyle
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Pallets-Sphinx-Themes-2.0.2/src/pallets_sphinx_themes/versions.py 
new/Pallets-Sphinx-Themes-2.0.3/src/pallets_sphinx_themes/versions.py
--- old/Pallets-Sphinx-Themes-2.0.2/src/pallets_sphinx_themes/versions.py       
2021-11-10 18:13:06.000000000 +0100
+++ new/Pallets-Sphinx-Themes-2.0.3/src/pallets_sphinx_themes/versions.py       
2022-12-24 00:44:01.000000000 +0100
@@ -53,7 +53,7 @@
         if version.slug == slug:
             versions[i] = version._replace(current=True)
 
-        if not seen_latest and _is_version(version.slug):
+        if not seen_latest and version.version is not None:
             seen_latest = True
             versions[i] = version._replace(latest=True)
 
@@ -63,47 +63,45 @@
 def readthedocs_versions(app):
     config_versions = app.config.html_context["versions"]
     current_slug = app.config.html_context["current_version"]
-    versions = []
+    number_versions = []
+    name_versions = []
 
     for slug, _ in config_versions:
         dev = slug in {"main", "master", "default", "latest"}
+        version = _parse_version(slug)
 
-        if dev:
-            name = "Development"
-        elif not _is_version(slug):
-            name = slug.title()
-        else:
+        if version is not None:
             name = slug
+            append_to = number_versions
+        else:
+            name = "Development" if dev else slug.title()
+            append_to = name_versions
 
-        versions.append(
+        append_to.append(
             DocVersion(name=name, slug=slug, dev=dev, current=slug == 
current_slug)
         )
 
-    versions.sort(key=lambda x: x.version, reverse=True)
-    versions.sort(key=lambda x: not x.dev)
-
-    for i, version in enumerate(versions):
-        if _is_version(version.slug):
-            versions[i] = version._replace(latest=True)
-            break
-    else:
-        for i, version in enumerate(versions):
-            if version.slug == "stable":
-                versions[i] = version._replace(latest=True)
-                break
+    # put the newest numbered version first
+    number_versions.sort(key=lambda x: x.version, reverse=True)
+    # put non-dev named versions first
+    name_versions.sort(key=lambda x: x.dev, reverse=True)
+    versions = number_versions + name_versions
+
+    # if there are non-dev versions, mark the newest one as the latest
+    if versions and not versions[0].dev:
+        versions[0] = versions[0]._replace(latest=True)
 
     return versions
 
 
-def _is_version(value, placeholder="x"):
+def _parse_version(value: str, placeholder: str = "x"):
     if value.endswith(f".{placeholder}"):
         value = value[: -(len(placeholder) + 1)]
 
     try:
-        pv.Version(value)
-        return True
+        return pv.Version(value)
     except pv.InvalidVersion:
-        return False
+        return None
 
 
 class DocVersion(
@@ -113,9 +111,9 @@
 
     def __new__(cls, name, slug=None, latest=False, dev=False, current=False):
         slug = slug or name
-        version = pv.parse(slug)
+        version = _parse_version(slug)
 
-        if _is_version(slug):
+        if version is not None:
             name = "Version " + name
 
         return super().__new__(cls, name, slug, version, latest, dev, current)
@@ -138,7 +136,9 @@
 
         latest = context["latest_version"]
 
-        if latest is None:
+        # Don't show a banner if the latest version couldn't be determined, or 
if this
+        # is the "stable" version.
+        if latest is None or self.name == "stable":
             return
 
         if self.dev:

Reply via email to