Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pip-licenses for 
openSUSE:Factory checked in at 2023-06-03 00:07:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pip-licenses (Old)
 and      /work/SRC/openSUSE:Factory/.python-pip-licenses.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pip-licenses"

Sat Jun  3 00:07:22 2023 rev:12 rq:1090383 version:4.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pip-licenses/python-pip-licenses.changes  
2023-05-05 15:57:41.140222824 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pip-licenses.new.15902/python-pip-licenses.changes
       2023-06-03 00:07:27.422071600 +0200
@@ -1,0 +2,6 @@
+Thu Jun  1 20:08:13 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 4.3.2:
+  * Better Handling extracting URLs from `Project-URL`
+
+-------------------------------------------------------------------

Old:
----
  pip-licenses-4.3.1.tar.gz

New:
----
  pip-licenses-4.3.2.tar.gz

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

Other differences:
------------------
++++++ python-pip-licenses.spec ++++++
--- /var/tmp/diff_new_pack.GnMNEd/_old  2023-06-03 00:07:28.058075356 +0200
+++ /var/tmp/diff_new_pack.GnMNEd/_new  2023-06-03 00:07:28.062075379 +0200
@@ -18,7 +18,7 @@
 
 %define skip_python2 1
 Name:           python-pip-licenses
-Version:        4.3.1
+Version:        4.3.2
 Release:        0
 Summary:        Python packages license list
 License:        MIT

++++++ pip-licenses-4.3.1.tar.gz -> pip-licenses-4.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pip-licenses-4.3.1/CHANGELOG.md 
new/pip-licenses-4.3.2/CHANGELOG.md
--- old/pip-licenses-4.3.1/CHANGELOG.md 2023-05-04 04:29:28.000000000 +0200
+++ new/pip-licenses-4.3.2/CHANGELOG.md 2023-05-21 04:52:57.000000000 +0200
@@ -1,5 +1,9 @@
 ## CHANGELOG
 
+### 4.3.2
+
+* Better Handling extracting URLs from `Project-URL`
+
 ### 4.3.1
 
 * Fix to treat package names as normalized as in [PEP 
503](https://peps.python.org/pep-0503/) with `--packages` and 
`--ignore-packages` option
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pip-licenses-4.3.1/PKG-INFO 
new/pip-licenses-4.3.2/PKG-INFO
--- old/pip-licenses-4.3.1/PKG-INFO     2023-05-04 04:33:00.846429300 +0200
+++ new/pip-licenses-4.3.2/PKG-INFO     2023-05-21 04:56:34.430612600 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pip-licenses
-Version: 4.3.1
+Version: 4.3.2
 Summary: Dump the software license list of Python packages installed with pip.
 Home-page: https://github.com/raimon49/pip-licenses
 Author: raimon
@@ -829,6 +829,13 @@
 CHANGELOG
 ---------
 
+.. _432:
+
+4.3.2
+~~~~~
+
+-  Better Handling extracting URLs from ``Project-URL``
+
 .. _431:
 
 4.3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pip-licenses-4.3.1/pip_licenses.egg-info/PKG-INFO 
new/pip-licenses-4.3.2/pip_licenses.egg-info/PKG-INFO
--- old/pip-licenses-4.3.1/pip_licenses.egg-info/PKG-INFO       2023-05-04 
04:33:00.000000000 +0200
+++ new/pip-licenses-4.3.2/pip_licenses.egg-info/PKG-INFO       2023-05-21 
04:56:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pip-licenses
-Version: 4.3.1
+Version: 4.3.2
 Summary: Dump the software license list of Python packages installed with pip.
 Home-page: https://github.com/raimon49/pip-licenses
 Author: raimon
@@ -829,6 +829,13 @@
 CHANGELOG
 ---------
 
+.. _432:
+
+4.3.2
+~~~~~
+
+-  Better Handling extracting URLs from ``Project-URL``
+
 .. _431:
 
 4.3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pip-licenses-4.3.1/piplicenses.py 
new/pip-licenses-4.3.2/piplicenses.py
--- old/pip-licenses-4.3.1/piplicenses.py       2023-05-04 04:26:34.000000000 
+0200
+++ new/pip-licenses-4.3.2/piplicenses.py       2023-05-21 04:51:05.000000000 
+0200
@@ -56,7 +56,7 @@
 open = open  # allow monkey patching
 
 __pkgname__ = "pip-licenses"
-__version__ = "4.3.1"
+__version__ = "4.3.2"
 __author__ = "raimon"
 __license__ = "MIT"
 __summary__ = (
@@ -120,9 +120,15 @@
 
     for entry in metadata.get_all("Project-URL", []):
         key, value = entry.split(",", 1)
-        candidates[key.strip()] = value.strip()
+        candidates[key.strip().lower()] = value.strip()
 
-    for priority_key in ["Homepage", "Source", "Changelog", "Bug Tracker"]:
+    for priority_key in [
+        "homepage",
+        "source",
+        "repository",
+        "changelog",
+        "bug tracker",
+    ]:
         if priority_key in candidates:
             return candidates[priority_key]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pip-licenses-4.3.1/test_piplicenses.py 
new/pip-licenses-4.3.2/test_piplicenses.py
--- old/pip-licenses-4.3.1/test_piplicenses.py  2023-05-04 04:22:44.000000000 
+0200
+++ new/pip-licenses-4.3.2/test_piplicenses.py  2023-05-21 04:50:40.000000000 
+0200
@@ -1004,3 +1004,18 @@
 
     metadata.get.assert_called_once_with("home-page", None)
     metadata.get_all.assert_called_once_with("Project-URL", [])
+
+
+def test_extract_homepage_project_uprl_fallback_capitalisation() -> None:
+    metadata = MagicMock()
+    metadata.get.return_value = None
+
+    # `homepage` is still prioritized higher than `Source` (capitalisation)
+    metadata.get_all.return_value = [
+        "Source, source",
+        "homepage, homepage",
+    ]
+
+    assert "homepage" == extract_homepage(metadata=metadata)  # type: ignore
+
+    metadata.get_all.assert_called_once_with("Project-URL", [])

Reply via email to