'AnsiTerm' object has no attribute 'buffer'

Matthew Selsky Matthew.Selsky at twosigma.com
Wed Jan 30 03:56:13 UTC 2019


On Tue, Jan 29, 2019 at 07:18:20PM -0800, Gary E. Miller via devel wrote:
> Yo Fred!
> 
> On Tue, 29 Jan 2019 19:01:40 -0800 (PST)
> Fred Wright via devel <devel at ntpsec.org> wrote:
> 
> > > Well, the way we use sys.stdout is warned about in the Python doc.
> > > That is enough for me to want it aligned with the python doc.  
> > 
> > The real question is why the build procedure thinks it needs to
> > output 'bytes' to the terminal,
> 
> Easy, to fix make the code work with Python2 and Python 3.
> 
> See here:
> 
> https://secure-web.cisco.com/1zPMHyXmnA2gt7hRrEsrSfZlzlA9KP9LRUJ4l78jZyR9GyKASS4D4Dl-imylIypoW9cc27We390WVl4SPRE3J_6Z2Jsb7lGG4CG4ZpjxYVazLDCnE0eGyB3V1F4w6Mlgh40QjP2R5ujoYRdjSoZ-PQRZqpcZKZdTGaX55WaccmEL4SzVxaN2r4W5E3TAmtnTcAbk3xFihp1z6LKJgjgNlTy0wyKvKzfIcRJyFmR9rpyuO4BZ9X8R3GL01Vxn2CI6rOb6Wqmbq5UCmL5WAOELjzA/https%3A%2F%2Fgitlab.com%2Fesr%2Fpractical-python-porting%2Fblob%2Fmaster%2Fpolystr-inclusion.py
> http://www.catb.org/esr/faqs/practical-python-porting/
> 
> Weird, but no one has done better.
> 
> > It can probably be worked around by prefixing the build command with 
> > "NOSYNC=1", which disables waf's AnsiTerm hackery.
> 
> That worked.  Thanks!  

Is this a waf bug, or a 'Practical Python Porting' bug?

Btw, I tried to reproduce this failure with 3.5.6, 3.6.7, and 3.7.1, without success.  Do you have any tips for reproducing? Input/output redirection? Environment variables?


Thanks,
-Matt


More information about the devel mailing list