Code

Ticket #20016: jython_buffer_fix.diff

File jython_buffer_fix.diff, 494 bytes (added by andreas@…, 14 months ago)
Line 
1diff --git a/django/utils/six.py b/django/utils/six.py
2index 208c5c1..d447fec 100644
3--- a/django/utils/six.py
4+++ b/django/utils/six.py
5@@ -401,7 +401,10 @@ else:
6     _assertRegex = "assertRegexpMatches"
7     # memoryview and buffer are not stricly equivalent, but should be fine for
8     # django core usage (mainly BinaryField)
9-    memoryview = buffer
10+    if sys.platform.startswith("java"):
11+        memoryview = memoryview
12+    else:
13+        memoryview = buffer
14 
15 
16 def iterlists(d):