subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenneth Porter <sh...@sewingwitch.com>
Subject Re: mailer.py commit says TypeError: must be unicode, not str
Date Wed, 07 Feb 2018 17:35:23 GMT
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()


Mime
View raw message