This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-02-04.22:39:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486247982.53.0.624912171137.issue29409@psf.upfronthosting.co.za>
In-reply-to
Content
Merging this in now, along with a few other patches. This is the test I'm adding, in case anyone spots any problems with it before I push (copied from the test for pure-ASCII bytes):

    @unittest.skipIf(sys.getfilesystemencoding() != 'utf-8',
                     "test only works for utf-8 filesystems")
    def testUtf8BytesOpen(self):
        # Opening a UTF-8 bytes filename
        try:
            fn = TESTFN_UNICODE.encode("utf-8")
        except UnicodeEncodeError:
            self.skipTest('could not encode %r to utf-8' % TESTFN_UNICODE)
        f = self.FileIO(fn, "w")
        try:
            f.write(b"abc")
            f.close()
            with open(TESTFN_UNICODE, "rb") as f:
                self.assertEqual(f.read(), b"abc")
        finally:
            os.unlink(TESTFN_UNICODE)
History
Date User Action Args
2017-02-04 22:39:42steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, zach.ware, eryksun
2017-02-04 22:39:42steve.dowersetmessageid: <1486247982.53.0.624912171137.issue29409@psf.upfronthosting.co.za>
2017-02-04 22:39:42steve.dowerlinkissue29409 messages
2017-02-04 22:39:42steve.dowercreate