Open mcepl opened 2 years ago
@mcepl This issue is probably the same as #119.
If possible, this can be solved by using the prettytable package 2.2.1 or lower in your environment.
That probably cannot happen. We cannot pull whole distribution back just because of one package which is not super-important to us.
Yes, it would be difficult. Currently prettytable's internal compatibility is broken, and pip-licenses are not keeping up with the changes.
This issue has been resolved in pip-licenses 4.x https://pypi.org/project/pip-licenses/4.0.0/
Not really:
[ 9s] =================================== FAILURES ===================================
[ 9s] ________________________ TestGetLicenses.test_from_all _________________________
[ 9s]
[ 9s] self = <test_piplicenses.TestGetLicenses testMethod=test_from_all>
[ 9s]
[ 9s] def test_from_all(self):
[ 9s] from_args = ['--from=all']
[ 9s] args = self.parser.parse_args(from_args)
[ 9s] output_fields = get_output_fields(args)
[ 9s] table = create_licenses_table(args, output_fields)
[ 9s]
[ 9s] self.assertIn('License-Metadata', output_fields)
[ 9s] self.assertIn('License-Classifier', output_fields)
[ 9s]
[ 9s] index_license_meta = output_fields.index('License-Metadata')
[ 9s] license_meta = []
[ 9s] for row in table._rows:
[ 9s] license_meta.append(row[index_license_meta])
[ 9s]
[ 9s] index_license_classifier = output_fields.index('License-Classifier')
[ 9s] license_classifier = []
[ 9s] for row in table._rows:
[ 9s] license_classifier.append(row[index_license_classifier])
[ 9s]
[ 9s] for license in ('BSD', 'MIT', 'Apache 2.0'):
[ 9s] > self.assertIn(license, license_meta)
[ 9s] E AssertionError: 'BSD' not found in ['MIT License', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'BSD-2-Clause or Apache-2.0', 'MIT', 'MIT', 'MIT', 'MIT license', 'MIT', 'public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)']
[ 9s]
[ 9s] test_piplicenses.py:190: AssertionError
[ 9s] =============================== warnings summary ===============================
[ 9s] test_piplicenses.py::TestGetLicenses::test_format_rst_default_filter
[ 9s] test_piplicenses.py::TestGetLicenses::test_format_rst_without_filter
[ 9s] /home/abuild/rpmbuild/BUILD/pip-licenses-4.0.0/test_piplicenses.py:100: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
[ 9s] settings = docutils.frontend.\
[ 9s]
[ 9s] test_piplicenses.py: 136 warnings
[ 9s] /usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
[ 9s] option = self.option_class(*args, **kwargs)
[ 9s]
[ 9s] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
[ 9s] =========================== short test summary info ============================
[ 9s] FAILED test_piplicenses.py::TestGetLicenses::test_from_all - AssertionError: ...
[ 9s] ================== 1 failed, 50 passed, 138 warnings in 1.59s ==================
Oh, I had not anticipated this test case failure.
Thanks for the detailed log. I will reopen this issue.
While packaging this for openSUSE, these four tests fail:
Complete build log shows all packages used and all steps taken to get here.