<< Back to previous view

[CLJ-987] pprint doesn't flush the underlying stream Created: 07/May/12  Updated: 01/Mar/13  Resolved: 14/Nov/12

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.5
Fix Version/s: Release 1.5

Type: Defect Priority: Major
Reporter: David Powell Assignee: David Powell
Resolution: Completed Votes: 1
Labels: patch

Attachments: Text File 0002-pprint-now-flushes-the-underlying-stream-similarly-t.patch    
Patch: Code and Test
Approval: Ok


Unlike prn, pprint doesn't flush the underlying stream.

pretty_writer currently overrides .flush with behaviour that pushes its own data, but does not flush the underlying stream.

pprint should behave similarly to prn with respect to flushing the underlying stream.

Comment by David Powell [ 07/May/12 9:43 AM ]

Test included.
Patch should ensure that flushing happens after pprint, without introducing any additional unnecessary flushes.

Comment by Stuart Halloway [ 08/Jun/12 3:11 PM ]

I am confused by the tests – they all seem to call prn, though some claim to be calling pprint.

Comment by David Powell [ 09/Jun/12 6:16 AM ]

Ah, sorry. I'd tried to remove duplicate tests before committing them, but removed the wrong ones.
Replacement patch attached:


Comment by Andy Fingerhut [ 21/Jun/12 5:27 PM ]

Tempting fate once again by changing Approval from Incomplete to None after the reason it was marked as incomplete seems to have been addressed.

Comment by Stuart Sierra [ 09/Nov/12 4:07 PM ]


Comment by Stuart Sierra [ 14/Nov/12 9:23 AM ]

Pushed in commit 1588ff3f70e864d9817bc565bd2c30b08189bc6e

Generated at Mon Jan 22 14:27:28 CST 2018 using JIRA 4.4#649-r158309.