]> granicus.if.org Git - python/commitdiff
Issue #19886: Use better estimated memory requirements for bigmem tests.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Jan 2014 11:39:27 +0000 (13:39 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Jan 2014 11:39:27 +0000 (13:39 +0200)
Incorrect requirements can cause memory swapping.

1  2 
Lib/test/pickletester.py
Lib/test/test_bz2.py
Lib/test/test_hashlib.py
Lib/test/test_marshal.py
Lib/test/test_xml_etree_c.py
Misc/NEWS

index 1f59ab2dca5ab86641e0884449f19c6a6b350104,4d59bde85116176e23103be486d74b83a4067d1e..a2bea600edb53cb62f49750d4f37d8722807f68c
@@@ -1681,9 -1361,9 +1679,9 @@@ class BigmemPickleTests(unittest.TestCa
          finally:
              data = None
  
-     @bigmemtest(size=_4G, memuse=1 + 1, dry_run=False)
+     @bigmemtest(size=_4G, memuse=2.5, dry_run=False)
      def test_huge_bytes_64b(self, size):
 -        data = b"a" * size
 +        data = b"acbd" * (size // 4)
          try:
              for proto in protocols:
                  if proto < 3:
          finally:
              data = None
  
 -    # BINUNICODE (protocols 1, 2 and 3) cannot carry more than
 -    # 2**32 - 1 bytes of utf-8 encoded unicode.
 +    # BINUNICODE (protocols 1, 2 and 3) cannot carry more than 2**32 - 1 bytes
 +    # of utf-8 encoded unicode. BINUNICODE8 (protocol 4) supports these huge
 +    # unicode strings however.
  
-     @bigmemtest(size=_4G, memuse=2 + ascii_char_size, dry_run=False)
+     @bigmemtest(size=_4G, memuse=8, dry_run=False)
      def test_huge_str_64b(self, size):
 -        data = "a" * size
 +        data = "abcd" * (size // 4)
          try:
              for proto in protocols:
                  if proto == 0:
Simple merge
index 179e771aa374682500650e952649db787a0dc90c,c0470d6018b13f0ea8c6c87cb682003de7040ada..36a98cb027e75a6b0f0db8a2310dd8b5a7c6843a
@@@ -379,15 -352,6 +373,12 @@@ class HashLibTestCase(unittest.TestCase
            "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973eb"+
            "de0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b")
  
-     @bigmemtest(size=_4G + 5, memuse=1)
++    @unittest.skipIf(sys.maxsize < _4G + 5, 'test cannot run on 32-bit systems')
++    @bigmemtest(size=_4G + 5, memuse=1, dry_run=False)
 +    def test_case_sha3_224_huge(self, size):
-         if size == _4G + 5:
-             try:
-                 self.check('sha3_224', b'A'*size,
-                            '58ef60057c9dddb6a87477e9ace5a26f0d9db01881cf9b10a9f8c224')
-             except OverflowError:
-                 pass # 32-bit arch
++        self.check('sha3_224', b'A'*size,
++                   '58ef60057c9dddb6a87477e9ace5a26f0d9db01881cf9b10a9f8c224')
 +
      def test_gil(self):
          # Check things work fine with an input larger than the size required
          # for multithreaded operation (which is hardwired to 2048).
Simple merge
Simple merge
diff --cc Misc/NEWS
index cbca172d49a74e990728ce7e670f6f1d4f222655,65cb2450e7bd1e2fafcee6a7b9aa5befdba0653f..dc5b701a05ad6d7c2c495b4433c1cb24b83d1ca7
+++ b/Misc/NEWS
@@@ -43,116 -59,12 +43,121 @@@ Librar
  - Issue #20113: os.readv() and os.writev() now raise an OSError exception on
    error instead of returning -1.
  
 +- Issue #19719: Make importlib.abc.MetaPathFinder.find_module(),
 +  PathEntryFinder.find_loader(), and Loader.load_module() use PEP 451 APIs to
 +  help with backwards-compatibility.
 +
 +- Issue #20144: inspect.Signature now supports parsing simple symbolic
 +  constants as parameter default values in __text_signature__.
 +
  - Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
  
 +IDLE
 +----
 +
 +- Issue #18960: IDLE now ignores the source encoding declaration on the second
 +  line if the first line contains anything except a comment.
 +
++Tests
++-----
++
++- Issue #19886: Use better estimated memory requirements for bigmem tests.
++
 +Tools/Demos
 +-----------
 +
 +- Issue #18960: 2to3 and the findnocoding.py script now ignore the source
 +  encoding declaration on the second line if the first line contains anything
 +  except a comment.
 +
 +- Issue #19723: The marker comments Argument Clinic uses have been changed
 +  to improve readability.
 +
 +- Issue #20157: When Argument Clinic renames a parameter because its name
 +  collides with a C keyword, it no longer exposes that rename to PyArg_Parse.
 +
 +- Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"
 +  format unit.
 +
 +- Issue #20144: Argument Clinic now supports simple symbolic constants
 +  as parameter default values.
 +
 +- Issue #20143: The line numbers reported in Argument Clinic errors are
 +  now more accurate.
 +
 +- Issue #20142: Py_buffer variables generated by Argument Clinic are now
 +  initialized with a default value.
 +
 +Build
 +-----
 +
 +- Issue #12837: Silence a tautological comparison warning on OS X under Clang in
 +  socketmodule.c.
 +
 +What's New in Python 3.4.0 Beta 2?
 +==================================
 +
 +Release date: 2014-01-05
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #17432: Drop UCS2 from names of Unicode functions in python3.def.
 +
 +- Issue #19526: Exclude all new API from the stable ABI. Exceptions can be
 +  made if a need is demonstrated.
 +
 +- Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c"
 +  argument is not in range [0; 255].
 +
 +- Issue #19995: %c, %o, %x, and %X now raise TypeError on non-integer input;
 +  reworded docs to clarify that an integer type should define both __int__
 +  and __index__.
 +
 +- Issue #19787: PyThread_set_key_value() now always set the value. In Python
 +  3.3, the function did nothing if the key already exists (if the current value
 +  is a non-NULL pointer).
 +
 +- Issue #14432: Remove the thread state field from the frame structure. Fix a
 +  crash when a generator is created in a C thread that is destroyed while the
 +  generator is still used. The issue was that a generator contains a frame, and
 +  the frame kept a reference to the Python state of the destroyed C thread. The
 +  crash occurs when a trace function is setup.
 +
 +- Issue #19576: PyGILState_Ensure() now initializes threads. At startup, Python
 +  has no concrete GIL. If PyGILState_Ensure() is called from a new thread for
 +  the first time and PyEval_InitThreads() was not called yet, a GIL needs to be
 +  created.
 +
 +- Issue #17576: Deprecation warning emitted now when __int__() or __index__()
 +  return not int instance.
 +
 +- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes.
 +
 +- Issue #19736: Add module-level statvfs constants defined for GNU/glibc
 +  based systems.
 +
 +- Issue #20097: Fix bad use of "self" in importlib's WindowsRegistryFinder.
 +
 +- Issue #19729: In str.format(), fix recursive expansion in format spec.
 +
 +- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
 +  billion characters) input strings in _Py_dg_strtod.
 +
 +Library
 +-------
 +
 +- Issue #20154: Deadlock in asyncio.StreamReader.readexactly().
 +
 +- Issue #16113: Remove sha3 module again.
 +
 +- Issue #20111: pathlib.Path.with_suffix() now sanity checks the given suffix.
 +
 +- Fix breakage in TestSuite.countTestCases() introduced by issue #11798.
 +
  - Issue #20108: Avoid parameter name clash in inspect.getcallargs().
  
 -- Issue #12692: Backport the fix for ResourceWarning in test_urllib2net. This
 -  also helps in closing the socket when Connection Close header is not sent.
 +- Issue #19918: Fix PurePath.relative_to() under Windows.
  
  - Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl
    module, rather than silently let them emit clear text data.