Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using prettytable #52

Merged
merged 1 commit into from
Dec 22, 2019
Merged

Allow using prettytable #52

merged 1 commit into from
Dec 22, 2019

Conversation

jayvdb
Copy link
Contributor

@jayvdb jayvdb commented Dec 17, 2019

PTable and prettytable conflict, both using package name 'prettytable'
with one as prettytable.py and the other as prettytable/.
pip provides no protection against two packages conflicting like
these.

PTable hasnt maintained backwards compatability, and hasnt been
doing releases for a while.

This patch allows either to be present.

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 17, 2019

See prettytable/prettytable#23 for more info.

@codecov
Copy link

codecov bot commented Dec 17, 2019

Codecov Report

Merging #52 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #52      +/-   ##
=========================================
+ Coverage   97.89%   97.9%   +0.01%     
=========================================
  Files           1       1              
  Lines         332     334       +2     
=========================================
+ Hits          325     327       +2     
  Misses          7       7
Impacted Files Coverage Δ
piplicenses.py 97.9% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa574f4...cbc5b99. Read the comment docs.

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 17, 2019

c.f. https://build.opensuse.org/package/show/home:jayvdb:py-new/python-pip-licenses , where I use a little sed to change setup.py to use PrettyTable instead, and all tests pass. There is no way that PTable will be acceptable to linux distros, especially given that it is also unmaintained.

If there are no objections to this patch, pls advise if I should use nocover or (much harder..) create a test scenario to cover these new code paths.

@raimon49
Copy link
Owner

@jayvdb Thanks for the patch and information.

I understand that you supported compatibility.

I plan to merge this patch with #51 in the next release.

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 18, 2019

To make codecov happy, should use nocover or (much harder..) create a test scenario to cover these new code paths?

PTable and prettytable conflict, both using package name 'prettytable'
with one as prettytable.py and the other as prettytable/.
pip provides no protection against two packages conflicting like
these.

PTable hasnt maintained backwards compatability, and hasnt been
doing releases for a while.

This patch allows either to be present.
@raimon49
Copy link
Owner

I have confirmed that it works fine in a pip environment where the prettytable package is installed as an alternative to PTable.

Thank you for great work!

@raimon49 raimon49 merged commit 2362a8a into raimon49:master Dec 22, 2019
@raimon49 raimon49 mentioned this pull request Dec 22, 2019
5 tasks
@raimon49
Copy link
Owner

I released as version 1.18.0
https://pypi.org/project/pip-licenses/1.18.0/

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 22, 2019

Thanks. Submitted to openSUSE main Python package collection https://build.opensuse.org/request/show/758780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants