-
Notifications
You must be signed in to change notification settings - Fork 49
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
License files with carriage returns (\r) cause formatting issues #55
Comments
I think this will happen for any packages that are bundled on Windows before being uploaded to PyPI. |
If |
The specific case that brought up this issue was fixed upstream with @raimon49 I'm inclined to close this issue so as to not add any more work for |
Fixes raimon49#55. By using `open()` rather than `codecs.open()` the newline-fixing behaviour from Python 3 can be used. Presumably `codecs.open()` was used previously to allow proper UTF-8 handling in Python 2, but since that has been dropped the normal `open()` can be used. Also drop some inner imports in tests and empty `setUp()` and `tearDown()` methods. Tested with: ``` $ pip install django-cors-headers==3.2.0 $ python piplicenses.py --with-license-file --no-license-path | grep -C 2 django-cors-headers END OF TERMS AND CONDITIONS django-cors-headers 3.2.0 MIT License Copyright 2017 Otto Yiu and other contributors http://ottoyiu.com ``` This showed the same breakage as in the issue before the fix.
@johnthagen Thanks for the report and the discussion! |
django-cors-headers
uses\r
carriage returns instead of\n
newlines in its license. This causespip-licenses
's column formatting to break.Perhaps
\r
should be converted to\n
before being output to ensure that the column formatting is not disrupted?The text was updated successfully, but these errors were encountered: