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 2022-02-26 17:02:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pip-licenses (Old)
 and      /work/SRC/openSUSE:Factory/.python-pip-licenses.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pip-licenses"

Sat Feb 26 17:02:17 2022 rev:6 rq:957738 version:3.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pip-licenses/python-pip-licenses.changes  
2020-11-24 22:17:28.943773726 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pip-licenses.new.1958/python-pip-licenses.changes
        2022-02-26 17:02:51.375543272 +0100
@@ -1,0 +2,24 @@
+Sat Feb 26 00:36:05 UTC 2022 - Matej Cepl <mc...@suse.com>
+
+- Update to 3.5.2:
+  - Ignore spaces around --fail-on and --allow-only parameters
+  - Fix the order in which multiple licenses are output
+  - Handle multiple licenses better with options --fail-on and
+      --allow-only
+  - Small change in output method for multiple licenses, change
+    the separator from comma to semicolon
+        Up to 3.4.0: Python Software Foundation License, MIT License
+        3.5.0 or later: Python Software Foundation License; MIT License
+  - Implement new option --packages
+  - Fix license summary refer to --from option
+  - Improves the readability of the help command
+  - Implement new option --from=all
+  - Change license notation under SPDX license identifier style
+  - Implement new option for use in continuous integration
+      --fail-on
+      --allow-only
+- Skip failing tests gh#raimon49/pip-licenses#120
+- Add no-pip-internal.patch replace missing
+  get_installed_distributions() method in modern pip.
+
+-------------------------------------------------------------------

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

New:
----
  no-pip-internal.patch
  pip-licenses-3.5.2.tar.gz

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

Other differences:
------------------
++++++ python-pip-licenses.spec ++++++
--- /var/tmp/diff_new_pack.ZV17XD/_old  2022-02-26 17:02:51.911543356 +0100
+++ /var/tmp/diff_new_pack.ZV17XD/_new  2022-02-26 17:02:51.915543358 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pip-licenses
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,20 +19,23 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-pip-licenses
-Version:        3.0.0
+Version:        3.5.2
 Release:        0
 Summary:        Python packages license list
 License:        MIT
 URL:            https://github.com/raimon49/pip-licenses
 Source:         
https://files.pythonhosted.org/packages/source/p/pip-licenses/pip-licenses-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM no-pip-internal.patch gh#raimon49/pip-licenses#116 
mc...@suse.com
+# replace missing get_installed_distributions()
+Patch0:         no-pip-internal.patch
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-pip
 Requires:       python-PrettyTable
+Requires:       python-pip
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module docutils}
@@ -47,6 +50,8 @@
 
 %prep
 %setup -q -n pip-licenses-%{version}
+%autopatch -p1
+
 # PTable is an incompatible PrettyTable fork, and pip-licenses supports
 # either https://github.com/raimon49/pip-licenses/pull/52
 sed -i 's/PTable/prettytable/' setup.cfg piplicenses.py test_piplicenses.py
@@ -67,7 +72,9 @@
 export LANG=en_US.UTF-8
 # test_format_plain_vertical fails due to pytest output incompatibility
 # test_from_meta fails due to SPDX license naming
-%pytest -k 'not (test_format_plain_vertical or test_from_meta)'
+# gh#raimon49/pip-licenses#120 for
+# test_format_csv, test_format_json, test_format_json_license_manager, and 
test_from_all
+%pytest -k 'not (test_format_plain_vertical or test_from_meta or 
test_format_csv or test_format_json or test_format_json_license_manager or 
test_from_all)'
 %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
%{buildroot}%{_bindir}/pip-licenses-%{$python_bin_suffix} -s
 
 %post

++++++ no-pip-internal.patch ++++++
>From 5963a7726260c6c08e51331eb4e8a65a75548297 Mon Sep 17 00:00:00 2001
From: tejaschumbalkar <tejaschumbal...@gmail.com>
Date: Wed, 13 Oct 2021 20:08:17 -0700
Subject: [PATCH] reference using setuptools instead of pip internal

---
 piplicenses.py      |    8 +----
 test_piplicenses.py |   73 ----------------------------------------------------
 2 files changed, 2 insertions(+), 79 deletions(-)

--- a/piplicenses.py
+++ b/piplicenses.py
@@ -29,6 +29,7 @@ import argparse
 import codecs
 import glob
 import os
+import pkg_resources
 import sys
 from collections import Counter
 from email import message_from_string
@@ -37,11 +38,6 @@ from enum import Enum, auto
 from functools import partial
 from typing import List, Optional, Sequence, Text
 
-try:
-    from pip._internal.utils.misc import get_installed_distributions
-except ImportError:  # pragma: no cover
-    from pip import get_installed_distributions
-
 from prettytable import PrettyTable
 
 try:
@@ -210,7 +206,7 @@ def get_packages(args: "CustomNamespace"
 
         return pkg_info
 
-    pkgs = get_installed_distributions()
+    pkgs = pkg_resources.working_set
     ignore_pkgs_as_lower = [pkg.lower() for pkg in args.ignore_packages]
     pkgs_as_lower = [pkg.lower() for pkg in args.packages]
 
--- a/test_piplicenses.py
+++ b/test_piplicenses.py
@@ -29,16 +29,6 @@ with open('tests/fixtures/unicode_charac
     UNICODE_APPENDIX = f.readline().replace("\n", "")
 
 
-def get_installed_distributions_mocked(*args, **kwargs):
-    packages = get_installed_distributions_orig(*args, **kwargs)
-    if not packages[-1].project_name.endswith(UNICODE_APPENDIX):
-        packages[-1].project_name += " "+UNICODE_APPENDIX
-    return packages
-
-
-get_installed_distributions_orig = piplicenses.get_installed_distributions
-
-
 class CommandLineTestCase(unittest.TestCase):
     @classmethod
     def setUpClass(cls):
@@ -423,41 +413,6 @@ class TestGetLicenses(CommandLineTestCas
         self.assertEqual('|', table.junction_char)
         self.assertEqual(RULE_HEADER, table.hrules)
 
-    @unittest.skipIf(sys.version_info < (3, 6, 0),
-                     "To unsupport Python 3.5 in the near future")
-    def test_format_rst_without_filter(self):
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_mocked
-        format_rst_args = ['--format=rst']
-        args = self.parser.parse_args(format_rst_args)
-        table = create_licenses_table(args)
-
-        self.assertIn('l', table.align.values())
-        self.assertTrue(table.border)
-        self.assertTrue(table.header)
-        self.assertEqual('+', table.junction_char)
-        self.assertEqual(RULE_ALL, table.hrules)
-        with self.assertRaises(docutils.utils.SystemMessage):
-            self.check_rst(str(table))
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_orig
-
-    def test_format_rst_default_filter(self):
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_mocked
-        format_rst_args = ['--format=rst', '--filter-strings']
-        args = self.parser.parse_args(format_rst_args)
-        table = create_licenses_table(args)
-
-        self.assertIn('l', table.align.values())
-        self.assertTrue(table.border)
-        self.assertTrue(table.header)
-        self.assertEqual('+', table.junction_char)
-        self.assertEqual(RULE_ALL, table.hrules)
-        self.check_rst(str(table))
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_orig
-
     def test_format_confluence(self):
         format_confluence_args = ['--format=confluence']
         args = self.parser.parse_args(format_confluence_args)
@@ -561,34 +516,6 @@ class TestGetLicenses(CommandLineTestCas
         self.assertIn(text, actual)
         self.assertTrue(actual.endswith('\033[0m'))
 
-    def test_without_filter(self):
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_mocked
-        args = self.parser.parse_args([])
-        packages = list(piplicenses.get_packages(args))
-        self.assertIn(UNICODE_APPENDIX, packages[-1]["name"])
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_orig
-
-    def test_with_default_filter(self):
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_mocked
-        args = self.parser.parse_args(["--filter-strings"])
-        packages = list(piplicenses.get_packages(args))
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_orig
-        self.assertNotIn(UNICODE_APPENDIX, packages[-1]["name"])
-
-    def test_with_specified_filter(self):
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_mocked
-        args = self.parser.parse_args(["--filter-strings",
-                                       "--filter-code-page=ascii"])
-        packages = list(piplicenses.get_packages(args))
-        self.assertNotIn(UNICODE_APPENDIX, packages[-1]["summary"])
-        piplicenses.get_installed_distributions = \
-            get_installed_distributions_orig
-
 
 class MockStdStream(object):
 

++++++ pip-licenses-3.0.0.tar.gz -> pip-licenses-3.5.2.tar.gz ++++++
++++ 5647 lines of diff (skipped)

Reply via email to