Clojure

pprint doesn't flush the underlying stream

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: Release 1.5
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

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.

Activity

David Powell made changes -
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Hide
David Powell added a comment -

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

Show
David Powell added a comment - Test included. Patch should ensure that flushing happens after pprint, without introducing any additional unnecessary flushes.
David Powell made changes -
Patch Code and Test [ 10002 ]
Attachment 0001-pprint-now-flushes-the-underlying-stream-similarly-t.patch [ 11178 ]
Labels patch
David Powell made changes -
Status In Progress [ 3 ] Open [ 1 ]
Hide
Stuart Halloway added a comment -

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

Show
Stuart Halloway added a comment - I am confused by the tests – they all seem to call prn, though some claim to be calling pprint.
Stuart Halloway made changes -
Approval Incomplete [ 10006 ]
Hide
David Powell added a comment -

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

0002-pprint-now-flushes-the-underlying-stream-similarly-t.patch

Show
David Powell added a comment - Ah, sorry. I'd tried to remove duplicate tests before committing them, but removed the wrong ones. Replacement patch attached: 0002-pprint-now-flushes-the-underlying-stream-similarly-t.patch
David Powell made changes -
David Powell made changes -
Attachment 0001-pprint-now-flushes-the-underlying-stream-similarly-t.patch [ 11178 ]
Hide
Andy Fingerhut added a comment -

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

Show
Andy Fingerhut added a comment - Tempting fate once again by changing Approval from Incomplete to None after the reason it was marked as incomplete seems to have been addressed.
Andy Fingerhut made changes -
Approval Incomplete [ 10006 ]
Hide
Stuart Sierra added a comment -

Screened.

Show
Stuart Sierra added a comment - Screened.
Stuart Sierra made changes -
Waiting On richhickey
Approval Screened [ 10004 ]
Rich Hickey made changes -
Fix Version/s Release 1.5 [ 10150 ]
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Fix Version/s Release 1.5 [ 10150 ]
Hide
Stuart Sierra added a comment -

Pushed in commit 1588ff3f70e864d9817bc565bd2c30b08189bc6e

Show
Stuart Sierra added a comment - Pushed in commit 1588ff3f70e864d9817bc565bd2c30b08189bc6e
Stuart Sierra made changes -
Resolution Completed [ 1 ]
Waiting On richhickey
Status Open [ 1 ] Resolved [ 5 ]
Stuart Halloway made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: