Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #20016: worked around Jython not having a buffer.

  • Loading branch information...
commit 35cab0f8e43c01a7d5ede4ebc96e5e8723a04338 1 parent 15c3906
@beachmachine beachmachine authored jacobian committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 django/utils/six.py
View
8 django/utils/six.py
@@ -414,8 +414,12 @@ def with_metaclass(meta, base=object):
_assertRaisesRegex = "assertRaisesRegexp"
_assertRegex = "assertRegexpMatches"
# memoryview and buffer are not stricly equivalent, but should be fine for
- # django core usage (mainly BinaryField)
- memoryview = buffer
+ # django core usage (mainly BinaryField). However, Jython doesn't support
+ # buffer (see http://bugs.jython.org/issue1521), so we have to be careful.
+ if sys.platform.startswith('java'):
+ memoryview = memoryview
+ else:
+ memoryview = buffer
def assertRaisesRegex(self, *args, **kwargs):
Please sign in to comment.
Something went wrong with that request. Please try again.