From patchwork Sun Feb 11 14:04:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2122: py3: replace file() with open() in test-mactext.t From: phabricator X-Patchwork-Id: 27563 Message-Id: <19369b237e3287ebd3ae3e069cc77ae7@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sun, 11 Feb 2018 14:04:57 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGadec6374a0b2: py3: replace file() with open() in test-mactext.t (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2122?vs=5385&id=5411 REVISION DETAIL https://phab.mercurial-scm.org/D2122 AFFECTED FILES tests/test-mactext.t CHANGE DETAILS To: pulkit, #hg-reviewers Cc: mercurial-devel diff --git a/tests/test-mactext.t b/tests/test-mactext.t --- a/tests/test-mactext.t +++ b/tests/test-mactext.t @@ -3,9 +3,9 @@ > import sys > > for path in sys.argv[1:]: - > data = file(path, 'rb').read() - > data = data.replace('\n', '\r') - > file(path, 'wb').write(data) + > data = open(path, 'rb').read() + > data = data.replace(b'\n', b'\r') + > open(path, 'wb').write(data) > EOF $ cat > print.py < import sys