As per my comment: https://github.com/rwb27/picamera/commit/4cacb2bdc58a213f8b2683152e3290e54eb94e81#commitcomment-39911271 `memoryview()` creates a different object in Python 2 than in Python 3. Which means in Python 2 it doesn't work in the `with ... as` statement.
As per my comment: 4cacb2b#commitcomment-39911271
memoryview()creates a different object in Python 2 than in Python 3. Which means in Python 2 it doesn't work in thewith ... asstatement.