[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: mailer.py commit says TypeError: must be unicode, not str

From: Kenneth Porter <shiva_at_sewingwitch.com>
Date: Wed, 07 Feb 2018 09:35:23 -0800

The overload of type was happening due to the unprefix stuff in fs.py. Red
herring, though interesting.

I distilled the failure down to this foo.py program. Of interest is that
"import builtins" succeeds on a Python 2.5 system. It should be throwing
unless Python is v3. So there's a builtins package hiding in this system
somewhere.

#!/usr/bin/env python

# test subversion-python bug revealed by mailer.py

import tempfile as _tempfile
import builtins

tempfile = _tempfile.mktemp()
print tempfile
#print sys.version
fp = builtins.open(tempfile, 'w+')
print type(fp)
chunk = ""
print type(chunk)
fp.write(chunk)
fp.close()
Received on 2018-02-07 18:37:21 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.