Evan added the comment: The scripts are being read in with mode 'rb', decoded, modified, then written back out with mode 'w'. This means the EOL conversion doesn't happen on the way in, but does happen on the way out, and so '\r\n' becomes '\r\r\n'. One fix would be to always use binary mode and encode the contents back to bytes instead. However since there are no longer any binary files in venv/Scripts/*, perhaps a better fix is to remove the binary handling entirely and always use text mode?
---------- nosy: +evan_, vinay.sajip versions: +Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29213> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com