components/python/python34/patches/26-test_mmap.patch
author John Beck <John.Beck@Oracle.COM>
Tue, 08 Sep 2015 13:44:38 -0700
changeset 4844 ef6acf67d02a
permissions -rw-r--r--
21792076 Python 3.4 regression test test_mmap fails in large file tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4844
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
This patch has been submitted upstream, and accepted; it should no longer be
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
needed with the next Python version upgrade:
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
http://bugs.python.org/issue25004
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
--- Python-3.4.3/Lib/test/test_mmap.py.~1~	2015-08-28 12:40:08.000000000 -0700
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
+++ Python-3.4.3/Lib/test/test_mmap.py	2015-09-04 14:51:47.034993552 -0700
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
@@ -727,7 +727,10 @@
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
             f.write(tail)
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
             f.flush()
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
         except (OSError, OverflowError):
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
-            f.close()
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
+            try:
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
+                f.close()
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
+            except (OSError, OverflowError):
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
+                pass
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
             raise unittest.SkipTest("filesystem does not have largefile support")
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
         return f
ef6acf67d02a 21792076 Python 3.4 regression test test_mmap fails in large file tests
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19