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

Consider using \n instead of \r line endings in license file #477

Closed
johnthagen opened this issue Jan 4, 2020 · 3 comments
Closed

Consider using \n instead of \r line endings in license file #477

johnthagen opened this issue Jan 4, 2020 · 3 comments

Comments

@johnthagen
Copy link
Contributor

johnthagen commented Jan 4, 2020

The current license file causes formatting issues when generating a license report with pip-licenses. Would you consider changing from \r line endings to \n in the license file to make it match other license files more closely?

Thanks.

Related to raimon49/pip-licenses#55

@johnthagen
Copy link
Contributor Author

When I git clone the repo on mac, I see \n in the LICENSE file, so it's likely that the issue is that the wheel that was uploaded to PyPI was packaged on a Windows computer, where it used \r newlines.

>>> a = open('/Users/user/django-cors-headers/venv/lib/python3.7/site-packages/django_cors_headers-3.2.0.dist-info/LICENSE', 'rb').read()
>>> print(a)
b'Copyright 2017 Otto Yiu and other contributors\rhttp://ottoyiu.com\r\rPermission is hereby granted, free of charge, to any person obtaining\ra copy of this software and associated documentation files (the\r"Software"), to deal in the Software without restriction, including\rwithout limitation the rights to use, copy, modify, merge, publish,\rdistribute, sublicense, and/or sell copies of the Software, and to\rpermit persons to whom the Software is furnished to do so, subject to\rthe following conditions:\r\rThe above copyright notice and this permission notice shall be\rincluded in all copies or substantial portions of the Software.\r\rTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\rEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\rMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\rNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\rLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\rOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\rWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r'

@adamchainz
Copy link
Owner

Hey!

I think the newlines have been Windows since I inherited the repo... I use a Mac so wouldn't generate these.

As for the reason you see \n - it seems I just fixed it (unwittingly) in #476.

Released as version 3.2.1: https://pypi.org/project/django-cors-headers/3.2.1/

Enjoy!

Adam

@johnthagen
Copy link
Contributor Author

As for the reason you see \n - it seems I just fixed it (unwittingly) in #476.

What a coincidence! Confirmed that 3.2.1's LICENSE renders perfectly. Thanks!

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

No branches or pull requests

2 participants