Commits

Lenard Lindstrom committed 962e528

Document the pygame.Surface.get_buffer() '&' typekind argument as permanent

Remove deprecation notices for the '&' raw buffer typekind. It will remain the
default value for the get_buffer method argument.

Comments (0)

Files changed (2)

docs/reST/ref/surface.rst

       is supported for Python 2.6 and up in CPython. The old buffer protocol
       is also supported for Python 2.x. The old buffer data is in one segment
       for kind '&' and '0', multi-segment for other buffer view kinds.
-      Python 2.x, only the classic buffer view is available, for the '&' kind.
 
       The kind argument is the length 1 string '&', '0', '1', '2', '3',
       'r', 'g', 'b', or 'a'. The letters are case insensitive;
       'A' will work as well. The argument can be either a Unicode or byte (char)
       string. The default is '&'.
 
-      A kind '&' view is unstructured bytes. It is for backwards compatibility
-      with Pygame 1.9.1. Consider it deprecated, with '0' becoming the
-      default method argument value in a future Pygame release.
+      A kind '&' view is unstructured bytes. The surface pixels are treated
+      as a single, contiguous stretch of bytes. No shape or pitch information
+      is provided. The importer needs to get this information elsewhere.
       
-      '0' returns a continguous unstructured bytes view.
-      A ValueError is raised if the surface's pixels are discontinuous.
+      '0' returns a continguous unstructured bytes view. No surface shape
+      information is given. A ValueError is raised if the surface's pixels
+      are discontinuous.
       
       '1' returns a (surface-width * surface-height) array of continguous
       pixels. A ValueError is raised if the surface pixels are discontinuous.

test/surface_test.py

         self.assert_(isinstance(v, BufferProxy))
         v = s.get_buffer('b')
 
-        # Check backward compatibility.
+        # Check '&' argument, the default.
         s = pygame.Surface((5, 7), 0, 24)
         length = s.get_pitch() * s.get_height()
         v = s.get_buffer('&')
         v = s.get_buffer()
         self.assert_(isinstance(v, BufferProxy))
         self.assertEqual(v.length, length)
-
-        # Check default argument ('&' for backward compatibility).
-        # The default may change in Pygame 1.9.3.
         s = pygame.Surface((5, 7), 0, 16)
         length = s.get_pitch() * s.get_height()
         v = s.get_buffer()