-
Notifications
You must be signed in to change notification settings - Fork 647
Fixes #290: pyPrint accepts any filelike, with sys.stdout fallback #304
base: master
Are you sure you want to change the base?
Conversation
(should I follow the Google 2-space or PEP 4-space?)
Needs working __getattr__/__setattr__. Please wait if before merge
Conflicts: lib/sys.py
Conflicts: lib/sys.py
aff3e60
to
51164d9
Compare
Conflicts: lib/sys.py
Conflicts: lib/sys.py
Have no idea why this is broke. Halp. Left is OSX. Right is Linux |
The types_test failure is because types.py defines ModuleType as type(sys) and types_test checks that it's the same type as go.grumpy.ModuleType. sys is now a different kind of object. I would remove that line from types.py and add The other issue is a transient failure due to a race condition in TestRunMain. I can trigger it reasonably consistently as follows:
I think this is similar to #282. This is not due to your change. Just restart the build if you encounter that again. |
OSX: Thanks. Will take a look on Linux: Good to know. However, how can I restart the build on Travis? Last time I had sent a pointless commit to trigger it, but this adds noise to the history. |
I had hit another strange error here, on itertools_test.py:
Bisected and found its root on f745cdb, but it makes no sense. As this PR will not be merged until __getattr__ is working, will leave it as is. This seems as a symptom of another undiscovered bug on the module/types stuff. |
Gets sys.stdout from SysmoduleDict['stdout'], that exists and could be replaced (after #302 got merged)
pyPrint allows any filelike *Object to be printed to.
TBD: Factor out the method invocation logic to some
func (o *Object) Invoke(f *Frame, method *Str)