[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 18:51:38 -0800

--On Thursday, February 08, 2018 2:30 AM +0000 Troy Curtis Jr
<troycurtisjr_at_gmail.com> wrote:

> If that package was being imported, I'd definitely expect that kind of
> behavior, but merely it's presence on your system should not be enough to
> actually cause your python scripts to use the "future" behavior within
> python 2.7. Has the mailer.py been changed, or is it being imported by
> some other script as a module that does import the future module?

It happens at the top of fs.py with this sequence:

try:
  # Python >=3.0
  import builtins
except ImportError:
  # Python <3.0
  import __builtin__ as builtins

The code should be taking the except clause but the presence of the
compatibility package fools fs.py into thinking it's on a 3.0 system. This
might work except for the improper Unicode assumption about the kind of
object returned by open().
Received on 2018-02-08 03:53:25 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.