Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't use deprecated 'U' flag to read manifest #623
The universal newlines mode ('U' flag) is deprecated since Python
Example of warning:
.../setuptools/command/sdist.py:182: DeprecationWarning: 'U' mode is deprecated
New test on Python 2:
Oh wait: replacing "rbU" with "rb" doesn't work for Mac newline (\r) :-/ I made a mistake in my previous test.
Test on Python 3:
On Python 3, the "U" flag is simply ignored for binary mode and Mac newlines don't work as expected.
I'm all but certain we don't need to support Mac newlines any longer. I agree about the tests, with the caveat that setuptools has never had suitable use-case coverage, so we have to be extra considerate. In this case, let's make the change and if someone complains, we'll add the necessary test.