Commits

Romain Guillebert committed 18c46a0 Merge

Merge default

  • Participants
  • Parent commits 995703e, e37ed16
  • Branches numpypy-array_prepare_-array_wrap

Comments (0)

Files changed (105)

File TODO.txt

-TODO list by mattip
-===================
-
-- test, implement use of __array_prepare__()
-- test, implement use of __array_wrap__()

File lib-python/2.7/sre_compile.py

File contents unchanged.

File lib-python/2.7/sre_constants.py

File contents unchanged.

File lib-python/2.7/sre_parse.py

File contents unchanged.

File lib-python/2.7/test/keycert.pem

------BEGIN RSA PRIVATE KEY-----
-MIICXwIBAAKBgQC8ddrhm+LutBvjYcQlnH21PPIseJ1JVG2HMmN2CmZk2YukO+9L
-opdJhTvbGfEj0DQs1IE8M+kTUyOmuKfVrFMKwtVeCJphrAnhoz7TYOuLBSqt7lVH
-fhi/VwovESJlaBOp+WMnfhcduPEYHYx/6cnVapIkZnLt30zu2um+DzA9jQIDAQAB
-AoGBAK0FZpaKj6WnJZN0RqhhK+ggtBWwBnc0U/ozgKz2j1s3fsShYeiGtW6CK5nU
-D1dZ5wzhbGThI7LiOXDvRucc9n7vUgi0alqPQ/PFodPxAN/eEYkmXQ7W2k7zwsDA
-IUK0KUhktQbLu8qF/m8qM86ba9y9/9YkXuQbZ3COl5ahTZrhAkEA301P08RKv3KM
-oXnGU2UHTuJ1MAD2hOrPxjD4/wxA/39EWG9bZczbJyggB4RHu0I3NOSFjAm3HQm0
-ANOu5QK9owJBANgOeLfNNcF4pp+UikRFqxk5hULqRAWzVxVrWe85FlPm0VVmHbb/
-loif7mqjU8o1jTd/LM7RD9f2usZyE2psaw8CQQCNLhkpX3KO5kKJmS9N7JMZSc4j
-oog58yeYO8BBqKKzpug0LXuQultYv2K4veaIO04iL9VLe5z9S/Q1jaCHBBuXAkEA
-z8gjGoi1AOp6PBBLZNsncCvcV/0aC+1se4HxTNo2+duKSDnbq+ljqOM+E7odU+Nq
-ewvIWOG//e8fssd0mq3HywJBAJ8l/c8GVmrpFTx8r/nZ2Pyyjt3dH1widooDXYSV
-q6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DgyMzAxNTZaFw0yMDEwMDUyMzAxNTZaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH
+Ew5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9uIFNvZnR3YXJlIEZvdW5k
+YXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
+gYkCgYEA21vT5isq7F68amYuuNpSFlKDPrMUCa4YWYqZRt2OZ+/3NKaZ2xAiSwr7
+6MrQF70t5nLbSPpqE5+5VrS58SY+g/sXLiFd6AplH1wJZwh78DofbFYXUggktFMt
+pTyiX8jtP66bkcPkDADA089RI1TQR6Ca+n7HFa7c1fabVV6i3zkCAwEAAaMYMBYw
+FAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBBQUAA4GBAHPctQBEQ4wd
+BJ6+JcpIraopLn8BGhbjNWj40mmRqWB/NAWF6M5ne7KpGAu7tLeG4hb1zLaldK8G
+lxy2GPSRF6LFS48dpEj2HbMv2nvv6xxalDMJ9+DicWgAKTQ6bcX2j3GUkCR0g/T1
+CRlNBAAlvhKzO7Clpf9l0YKBEfraJByX
 -----END CERTIFICATE-----

File lib-python/2.7/test/sha256.pem

 # Certificate chain for https://sha256.tbs-internet.com
- 0 s:/C=FR/postalCode=14000/ST=Calvados/L=CAEN/street=22 rue de Bretagne/O=TBS INTERNET/OU=0002 440443810/OU=sha-256 production/CN=sha256.tbs-internet.com
-   i:/C=FR/ST=Calvados/L=Caen/O=TBS INTERNET/OU=Terms and Conditions: http://www.tbs-internet.com/CA/repository/OU=TBS INTERNET CA/CN=TBS X509 CA SGC
+ 0 s:/C=FR/postalCode=14000/ST=Calvados/L=CAEN/street=22 rue de Bretagne/O=TBS INTERNET/OU=0002 440443810/OU=Certificats TBS X509/CN=ecom.tbs-x509.com
+   i:/C=FR/ST=Calvados/L=Caen/O=TBS INTERNET/OU=Terms and Conditions: http://www.tbs-internet.com/CA/repository/OU=TBS INTER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CzC8S9
+SpgMMQTx3Rgn8vjkHuU9VZQlulZyiPK7yunjc7c310S9FRZ7XxOwf8Nnx4WnB+No
+WrfApzhhQl31w+RyrNxZe58hCfDDHmevRvwLjQ785ZoQXJDj2j3qAD4aI2yB8lB5
+oaE1jlCJzC7Kmz/Y9jzfmv/zAs1LQTm9ktevv4BTUFaGjv9jxnQ1xnS862ZiouLW
+zZYIlYPf4F6JjXGiIQgQRglILUfq3ftJd9/ok9W9ZF8h8w==
+-----END CERTIFICATE-----
+ 1 s:/C=FR/ST=Calvados/L=Caen/O=TBS INTERNET/OU=Terms and Conditions: http://www.tbs-internet.com/CA/repository/OU=TBS INTERNET CA/CN=TBS X509 CA business
+   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
+-----BEGIN CERTIFICATE-----
+MIIFPzCCBCegAwIBAgIQDlBz/++iRSmLDeVRHT/hADANBgkqhkiG9w0BAQUFADBv
+MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
+ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
+eHRlcm5hbCBDQSBSb290MB4XDTA1MTIwMTAwMDAwMFoXDTE5MDcwOTE4MTkyMlow
+gckxCzAJBgNVBAYTAkZSMREwDwYDVQQIEwhDYWx2YWRvczENMAsGA1UEBxMEQ2Fl
 bjEVMBMGA1UEChMMVEJTIElOVEVSTkVUMUgwRgYDVQQLEz9UZXJtcyBhbmQgQ29u
 ZGl0aW9uczogaHR0cDovL3d3dy50YnMtaW50ZXJuZXQuY29tL0NBL3JlcG9zaXRv
-cnkxGDAWBgNVBAsTD1RCUyBJTlRFUk5FVCBDQTEYMBYGA1UEAxMPVEJTIFg1MDkg
-Q0EgU0dDMB4XDTEwMDIxODAwMDAwMFoXDTEyMDIxOTIzNTk1OVowgcsxCzAJBgNV
-BAYTAkZSMQ4wDAYDVQQREwU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aHR0cDovL2NybC50YnMteDUwOS5j
-b20vVEJTWDUwOUNBU0dDLmNybDCBpgYIKwYBBQUHAQEEgZkwgZYwOAYIKwYBBQUH
-MAKGLGh0dHA6Ly9jcnQudGJzLWludGVybmV0LmNvbS9UQlNYNTA5Q0FTR0MuY3J0
-MDQGCCsGAQUFBzAChihodHRwOi8vY3J0LnRicy14NTA5LmNvbS9UQlNYNTA5Q0FT
-R0MuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC50YnMteDUwOS5jb20wPwYD
-VR0RBDgwNoIXc2hhMjU2LnRicy1pbnRlcm5ldC5jb22CG3d3dy5zaGEyNTYudGJz
-LWludGVybmV0LmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAA5NL0D4QSqhErhlkdPmz
-XtiMvdGL+ZehM4coTRIpasM/Agt36Rc0NzCvnQwKE+wkngg1Gy2qe7Q0E/ziqBtB
-fZYzdVgu1zdiL4kTaf+wFKYAFGsFbyeEmXysy+CMwaNoF2vpSjCU1UD56bEnTX/W
-fxVZYxtBQUpnu2wOsm8cDZuZRv9XrYgAhGj9Tt6F0aVHSDGn59uwShG1+BVF/uju
-SCyPTTjL1oc7YElJUzR/x4mQJYvtQI8gDIDAGEOs7v3R/gKa5EMfbUQUI4C84UbI
-Yz09Jdnws/MkC/Hm1BZEqk89u7Hvfv+oHqEb0XaUo0TDfsxE0M1sMdnLb91QNQBm
-UQ==
------END CERTIFICATE-----
- 1 s:/C=FR/ST=Calvados/L=Caen/O=TBS INTERNET/OU=Terms and Conditions: http://www.tbs-internet.com/CA/repository/OU=TBS INTERNET CA/CN=TBS X509 CA SGC
-   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
------BEGIN CERTIFICATE-----
-MIIFVjCCBD6gAwIBAgIQXpDZ0ETJMV02WTx3GTnhhTANBgkqhkiG9w0BAQUFADBv
-MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgN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ATE-----
  2 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
-   i:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN - DATACorp SGC
+   i:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
 -----BEGIN CERTIFICATE-----
-MIIEZjCCA06gAwIBAgIQUSYKkxzif5zDpV954HKugjANBgkqhkiG9w0BAQUFADCB
-kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
+MIIETzCCAzegAwIBAgIQHM5EYpUZep1jUvnyI6m2mDANBgkqhkiG9w0BAQUFADCB
+lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
 Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
-IFNHQzAeFw0wNTA2MDcwODA5MTBaFw0xOTA2MjQxOTA2MzBaMG8xCzAJBgNVBAYT
-AlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0
-ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
-IFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC39xoz5vIABC05
-4E5b7R+8bA/Ntfojts7emxEzl6QpTH2Tn71KvJPtAxrjj8/lbVBa1pcplFqAsEl6
-2y6V/bjKvzc4LR4+kUGtcFbH8E8/6DKedMrIkFTpxl8PeJ2aQDwOrGGqXhSPnoeh
-alDc15pOrwWzpnGUnHGzUGAKxxOdOAeGAqjpqGkmGJCrTLBPI6s6T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vg684t8GMaKsRl1
+jIGZ
 -----END CERTIFICATE-----
- 3 s:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN - DATACorp SGC
-   i:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN - DATACorp SGC
+ 3 s:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
+   i:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
 -----BEGIN CERTIFICATE-----
-MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
-kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
+MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
+lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
 Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
-IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
-EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
-VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
-dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN
-BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8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g6FEgSxvunOxqNDYJAB+gE
+CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
+3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
+KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
 -----END CERTIFICATE-----

File lib-python/2.7/test/test_ssl.py

         if test_support.verbose:
             sys.stdout.write("\n" + pprint.pformat(p) + "\n")
         self.assertEqual(p['subject'],
-                         ((('countryName', u'US'),),
-                          (('stateOrProvinceName', u'Delaware'),),
-                          (('localityName', u'Wilmington'),),
-                          (('organizationName', u'Python Software Foundation'),),
-                          (('organizationalUnitName', u'SSL'),),
-                          (('commonName', u'somemachine.python.org'),)),
+                         ((('countryName', 'XY'),),
+                          (('localityName', 'Castle Anthrax'),),
+                          (('organizationName', 'Python Software Foundation'),),
+                          (('commonName', 'localhost'),))
                         )
+        self.assertEqual(p['subjectAltName'], (('DNS', 'localhost'),))
         # Issue #13034: the subjectAltName in some certificates
         # (notably projects.developer.nokia.com:443) wasn't parsed
         p = ssl._ssl._test_decode_cert(NOKIACERT)

File lib_pypy/_sqlite3.py

     pass
 
 
-def connect(database, **kwargs):
-    factory = kwargs.get("factory", Connection)
-    return factory(database, **kwargs)
+def connect(database, timeout=5.0, detect_types=0, isolation_level="",
+                 check_same_thread=True, factory=None, cached_statements=100):
+    factory = Connection if not factory else factory
+    return factory(database, timeout, detect_types, isolation_level,
+                    check_same_thread, factory, cached_statements)
 
 
 def _unicode_text_factory(x):

File lib_pypy/_tkinter/tclobj.py

         return result
 
     elif value.typePtr == typeCache.BooleanType:
-        return result
+        return bool(value.internalRep.longValue)
     elif value.typePtr == typeCache.ByteArrayType:
-        return result
+        size = tkffi.new('int*')
+        data = tklib.Tcl_GetByteArrayFromObj(value, size)
+        return tkffi.buffer(data, size[0])[:]
     elif value.typePtr == typeCache.DoubleType:
         return value.internalRep.doubleValue
     elif value.typePtr == typeCache.IntType:
             result.append(FromObj(app, tcl_elem[0]))
         return tuple(result)
     elif value.typePtr == typeCache.ProcBodyType:
-        return result
+        pass  # fall through and return tcl object.
     elif value.typePtr == typeCache.StringType:
         buf = tklib.Tcl_GetUnicode(value)
         length = tklib.Tcl_GetCharLength(value)

File lib_pypy/_tkinter/tklib.py

 int Tcl_GetBoolean(Tcl_Interp* interp, const char* src, int* boolPtr);
 char *Tcl_GetString(Tcl_Obj* objPtr);
 char *Tcl_GetStringFromObj(Tcl_Obj* objPtr, int* lengthPtr);
+unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj* objPtr, int* lengthPtr);
 
 Tcl_UniChar *Tcl_GetUnicode(Tcl_Obj* objPtr);
 int Tcl_GetCharLength(Tcl_Obj* objPtr);

File lib_pypy/numpypy/__init__.py

 
 import os
 def get_include():
-    head, tail = os.path.split(os.path.dirname(os.path.abspath(__file__)))
-    return os.path.join(head, '../include')
+    """
+    Return the directory that contains the NumPy \\*.h header files.
+
+    Extension modules that need to compile against NumPy should use this
+    function to locate the appropriate include directory.
+
+    Notes
+    -----
+    When using ``distutils``, for example in ``setup.py``.
+    ::
+
+        import numpy as np
+        ...
+        Extension('extension_name', ...
+                include_dirs=[np.get_include()])
+        ...
+
+    """
+    import numpy
+    if getattr(numpy, 'show_config', None) is None:
+        # running from numpy source directory
+        head, tail = os.path.split(os.path.dirname(os.path.abspath(__file__)))
+        return os.path.join(head, '../include')
+    else:
+        # using installed numpy core headers
+        import numpy.core as core
+        d = os.path.join(os.path.dirname(core.__file__), 'include')
+    return d
+
 
 
 __all__ = ['__version__', 'get_include']

File lib_pypy/numpypy/core/numerictypes.py

 from _numpypy.numerictypes import *
+import numpypy
+
+def issubclass_(arg1, arg2):
+    """
+    Determine if a class is a subclass of a second class.
+
+    `issubclass_` is equivalent to the Python built-in ``issubclass``,
+    except that it returns False instead of raising a TypeError is one
+    of the arguments is not a class.
+
+    Parameters
+    ----------
+    arg1 : class
+        Input class. True is returned if `arg1` is a subclass of `arg2`.
+    arg2 : class or tuple of classes.
+        Input class. If a tuple of classes, True is returned if `arg1` is a
+        subclass of any of the tuple elements.
+
+    Returns
+    -------
+    out : bool
+        Whether `arg1` is a subclass of `arg2` or not.
+
+    See Also
+    --------
+    issubsctype, issubdtype, issctype
+
+    Examples
+    --------
+    >>> np.issubclass_(np.int32, np.int)
+    True
+    >>> np.issubclass_(np.int32, np.float)
+    False
+
+    """
+    try:
+        return issubclass(arg1, arg2)
+    except TypeError:
+        return False
+
+def issubdtype(arg1, arg2):
+    """
+    Returns True if first argument is a typecode lower/equal in type hierarchy.
+
+    Parameters
+    ----------
+    arg1, arg2 : dtype_like
+        dtype or string representing a typecode.
+
+    Returns
+    -------
+    out : bool
+
+    See Also
+    --------
+    issubsctype, issubclass_
+    numpy.core.numerictypes : Overview of numpy type hierarchy.
+
+    Examples
+    --------
+    >>> np.issubdtype('S1', str)
+    True
+    >>> np.issubdtype(np.float64, np.float32)
+    False
+
+    """
+    if issubclass_(arg2, generic):
+        return issubclass(numpypy.dtype(arg1).type, arg2)
+    mro = numpypy.dtype(arg2).type.mro()
+    if len(mro) > 1:
+        val = mro[1]
+    else:
+        val = mro[0]
+    return issubclass(numpypy.dtype(arg1).type, val)

File pypy/TODO

-
-* ARM

File pypy/doc/arm.rst

   * ``qemu-system``
   * ``qemu-user-static``
 
+- The dependencies above are in addition to the ones needed for a regular
+  translation, `listed here`_.
+
+.. _`listed here`: getting-started-python.html#translating-the-pypy-python-interpreter
+
 
 Creating a Qemu based ARM chroot
 --------------------------------

File pypy/doc/how-to-release.rst

   necessary; also update the version number in pypy/doc/conf.py,
   and in pypy/doc/index.rst
 * update pypy/doc/contributor.rst (and possibly LICENSE)
+  pypy/doc/tool/makecontributor.py generates the list of contributors
 * rename pypy/doc/whatsnew_head.rst to whatsnew_VERSION.rst
   and create a fresh whatsnew_head.rst after the release
 * update README

File pypy/doc/whatsnew-head.rst

 .. branch: ndarray-subtype
 Allow subclassing ndarray, i.e. matrix
 
+.. branch: pypy-pyarray
+Implement much of numpy's c api in cpyext, allows (slow) access to ndarray
+from c
+
 .. branch: kill-ootype
 
 .. branch: fast-slowpath
 Use subclasses of SpaceOperation instead of SpaceOperator objects.
 Random cleanups in flowspace.
 
+.. branch: file-support-in-rpython
+make open() and friends rpython

File pypy/interpreter/eval.py

         for i in range(min(len(varnames), self.getfastscopelength())):
             name = varnames[i]
             w_value = fastscope_w[i]
+            w_name = self.space.wrap(name)
             if w_value is not None:
-                w_name = self.space.wrap(name)
                 self.space.setitem(self.w_locals, w_name, w_value)
+            else:
+                try:
+                    self.space.delitem(self.w_locals, w_name)
+                except OperationError as e:
+                    if not e.match(self.space, self.space.w_KeyError):
+                        raise
 
     def locals2fast(self):
         # Copy values from self.w_locals to the fastlocals

File pypy/interpreter/test/test_app_main.py

 
         sys.path.append(self.goal_dir)
         # make sure cwd does not contain a stdlib
+        if self.tmp_dir.startswith(self.trunkdir):
+            skip('TMPDIR is inside the PyPy source')
         os.chdir(self.tmp_dir)
         tmp_pypy_c = os.path.join(self.tmp_dir, 'pypy-c')
         try:

File pypy/module/__builtin__/test/test_builtin.py

     def test_locals(self):
         def f():
             return locals()
+
         def g(c=0, b=0, a=0):
             return locals()
+
         assert f() == {}
-        assert g() == {'a':0, 'b':0, 'c':0}
+        assert g() == {'a': 0, 'b': 0, 'c': 0}
+
+    def test_locals_deleted_local(self):
+        def f():
+            a = 3
+            locals()
+            del a
+            return locals()
+
+        assert f() == {}
 
     def test_dir(self):
         def f():
         assert next(x) == 3
 
     def test_xrange_args(self):
-##        # xrange() attributes are deprecated and were removed in Python 2.3.
-##        x = xrange(2)
-##        assert x.start == 0
-##        assert x.stop == 2
-##        assert x.step == 1
-
-##        x = xrange(2,10,2)
-##        assert x.start == 2
-##        assert x.stop == 10
-##        assert x.step == 2
-
-##        x = xrange(2.3, 10.5, 2.4)
-##        assert x.start == 2
-##        assert x.stop == 10
-##        assert x.step == 2
-
         raises(ValueError, xrange, 0, 1, 0)
 
-    def test_xrange_repr(self): 
+    def test_xrange_repr(self):
         assert repr(xrange(1)) == 'xrange(1)'
         assert repr(xrange(1,2)) == 'xrange(1, 2)'
         assert repr(xrange(1,2,3)) == 'xrange(1, 4, 3)'
         raises(TypeError, xrange, 1, 3+2j)
         raises(TypeError, xrange, 1, 2, '1')
         raises(TypeError, xrange, 1, 2, 3+2j)
-    
+
     def test_sorted(self):
         l = []
         sorted_l = sorted(l)
         assert sorted_l is not l
         assert sorted_l == ['C', 'b', 'a']
         raises(TypeError, sorted, [], reverse=None)
-        
+
     def test_reversed_simple_sequences(self):
         l = range(5)
         rev = reversed(l)
                 return 42
         obj = SomeClass()
         assert reversed(obj) == 42
-    
-        
+
+
     def test_cmp(self):
         assert cmp(9,9) == 0
         assert cmp(0,9) < 0
         raises(RuntimeError, cmp, a, c)
         # okay, now break the cycles
         a.pop(); b.pop(); c.pop()
-        
+
     def test_coerce(self):
         assert coerce(1, 2)    == (1, 2)
         assert coerce(1L, 2L)  == (1L, 2L)
         assert eval("1+2") == 3
         assert eval(" \t1+2\n") == 3
         assert eval("len([])") == 0
-        assert eval("len([])", {}) == 0        
+        assert eval("len([])", {}) == 0
         # cpython 2.4 allows this (raises in 2.3)
         assert eval("3", None, None) == 3
         i = 4
         w_value = space.getitem(w_dict, space.wrap('i'))
         assert space.eq_w(w_value, space.wrap(42))
 
-    def test_execfile_different_lineendings(self, space): 
+    def test_execfile_different_lineendings(self, space):
         from rpython.tool.udir import udir
         d = udir.ensure('lineending', dir=1)
-        dos = d.join('dos.py') 
-        f = dos.open('wb') 
+        dos = d.join('dos.py')
+        f = dos.open('wb')
         f.write("x=3\r\n\r\ny=4\r\n")
-        f.close() 
+        f.close()
         space.appexec([space.wrap(str(dos))], """
-            (filename): 
+            (filename):
                 d = {}
                 execfile(filename, d)
                 assert d['x'] == 3
         """)
 
         unix = d.join('unix.py')
-        f = unix.open('wb') 
+        f = unix.open('wb')
         f.write("x=5\n\ny=6\n")
-        f.close() 
+        f.close()
 
         space.appexec([space.wrap(str(unix))], """
-            (filename): 
+            (filename):
                 d = {}
                 execfile(filename, d)
                 assert d['x'] == 5

File pypy/module/_pypyjson/test/test__pypyjson.py

 # -*- encoding: utf-8 -*-
-import py
+import py, sys
 from pypy.module._pypyjson.interp_decoder import JSONDecoder
 
 def test_skip_whitespace():
 class AppTest(object):
     spaceconfig = {"objspace.usemodules._pypyjson": True}
 
+    def setup_class(cls):
+        cls.w_run_on_16bit = cls.space.wrap(sys.maxunicode == 65535)
+
     def test_raise_on_unicode(self):
         import _pypyjson
         raises(TypeError, _pypyjson.loads, u"42")
         raises(ValueError, "_pypyjson.loads('[1: 2]')")
         raises(ValueError, "_pypyjson.loads('[1, 2')")
         raises(ValueError, """_pypyjson.loads('["extra comma",]')""")
-        
+
     def test_unicode_surrogate_pair(self):
+        if self.run_on_16bit:
+            skip("XXX fix me or mark definitely skipped")
         import _pypyjson
         expected = u'z\U0001d120x'
         res = _pypyjson.loads('"z\\ud834\\udd20x"')
         assert res == expected
-
-

File pypy/module/_socket/test/test_sock_app.py

     def test_socket_connect_ex(self):
         import _socket
         s = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM, 0)
+        # The following might fail if the DNS redirects failed requests to a
+        # catch-all address (i.e. opendns).
         # Make sure we get an app-level error, not an interp one.
         raises(_socket.gaierror, s.connect_ex, ("wrong.invalid", 80))
         s.close()

File pypy/module/_ssl/interp_ssl.py

 
         proto = libssl_SSL_CIPHER_get_version(current)
         if proto:
-            w_proto = space.wrap(rffi.charp2str(name))
+            w_proto = space.wrap(rffi.charp2str(proto))
         else:
             w_proto = space.w_None
 
                 w_serial = space.wrap(rffi.charpsize2str(buf, length))
             space.setitem(w_retval, space.wrap("serialNumber"), w_serial)
 
-            libssl_BIO_reset(biobuf)
-            notBefore = libssl_X509_get_notBefore(certificate)
-            libssl_ASN1_TIME_print(biobuf, notBefore)
-            with lltype.scoped_alloc(rffi.CCHARP.TO, 100) as buf:
-                length = libssl_BIO_gets(biobuf, buf, 99)
-                if length < 0:
-                    raise _ssl_seterror(space, None, length)
-                w_date = space.wrap(rffi.charpsize2str(buf, length))
-            space.setitem(w_retval, space.wrap("notBefore"), w_date)
+        libssl_BIO_reset(biobuf)
+        notBefore = libssl_X509_get_notBefore(certificate)
+        libssl_ASN1_TIME_print(biobuf, notBefore)
+        with lltype.scoped_alloc(rffi.CCHARP.TO, 100) as buf:
+            length = libssl_BIO_gets(biobuf, buf, 99)
+            if length < 0:
+                raise _ssl_seterror(space, None, length)
+            w_date = space.wrap(rffi.charpsize2str(buf, length))
+        space.setitem(w_retval, space.wrap("notBefore"), w_date)
 
         libssl_BIO_reset(biobuf)
         notAfter = libssl_X509_get_notAfter(certificate)
         # Set both the read and write BIO's to non-blocking mode
         libssl_BIO_set_nbio(libssl_SSL_get_rbio(ss.ssl), 1)
         libssl_BIO_set_nbio(libssl_SSL_get_wbio(ss.ssl), 1)
-    libssl_SSL_set_connect_state(ss.ssl)
 
     if side == PY_SSL_CLIENT:
         libssl_SSL_set_connect_state(ss.ssl)

File pypy/module/cpyext/ndarrayobject.py

 """
 
 from pypy.interpreter.error import OperationError
-from rpython.rtyper.lltypesystem import rffi
+from rpython.rtyper.lltypesystem import rffi, lltype
 from pypy.module.cpyext.api import cpython_api, Py_ssize_t, CANNOT_FAIL
-from pypy.module.cpyext.pyobject import PyObject
-from pypy.module.micronumpy.interp_numarray import W_NDimArray, convert_to_array, wrap_impl
-from pypy.module.micronumpy.interp_dtype import get_dtype_cache
+from pypy.module.cpyext.api import PyObject
+from pypy.module.micronumpy.interp_numarray import W_NDimArray, array
+from pypy.module.micronumpy.interp_dtype import get_dtype_cache, W_Dtype
 from pypy.module.micronumpy.arrayimpl.concrete import ConcreteArray
 from pypy.module.micronumpy.arrayimpl.scalar import Scalar
 from rpython.rlib.rawstorage import RAW_STORAGE_PTR
     assert isinstance(w_array, W_NDimArray)
     return rffi.cast(rffi.VOIDP, w_array.implementation.storage)
 
+PyArray_Descr = PyObject
+NULL = lltype.nullptr(rffi.VOIDP.TO)
 
-@cpython_api([PyObject, rffi.VOIDP, Py_ssize_t, Py_ssize_t, Py_ssize_t, rffi.VOIDP],
+@cpython_api([PyObject, PyArray_Descr, Py_ssize_t, Py_ssize_t, Py_ssize_t, rffi.VOIDP],
              PyObject)
-def _PyArray_FromAny(space, w_obj, dtype, min_depth, max_depth, requirements, context):
+def _PyArray_FromAny(space, w_obj, w_dtype, min_depth, max_depth, requirements, context):
     """ This is the main function used to obtain an array from any nested
          sequence, or object that exposes the array interface, op. The
          parameters allow specification of the required dtype, the
          only used if the array is constructed that way. Almost always this
          parameter is NULL.
     """
-    if dtype:
-        raise OperationError(space.w_NotImplementedError, space.wrap(
-            '_PyArray_FromAny called with not-implemented dtype argument'))
-    if min_depth !=0 or max_depth != 0:
-        raise OperationError(space.w_NotImplementedError, space.wrap(
-            '_PyArray_FromAny called with not-implemented min_dpeth or max_depth argument'))
     if requirements not in (0, NPY_DEFAULT):
         raise OperationError(space.w_NotImplementedError, space.wrap(
             '_PyArray_FromAny called with not-implemented requirements argument'))
-    w_array = convert_to_array(space, w_obj)
-    if w_array.is_scalar():
+    w_array = array(space, w_obj, w_dtype=w_dtype, copy=False)
+    if min_depth !=0 and len(w_array.get_shape()) < min_depth:
+        raise OperationError(space.w_ValueError, space.wrap(
+            'object of too small depth for desired array'))
+    elif max_depth !=0 and len(w_array.get_shape()) > max_depth:
+        raise OperationError(space.w_ValueError, space.wrap(
+            'object of too deep for desired array'))
+    elif w_array.is_scalar():
         # since PyArray_DATA() fails on scalars, create a 1D array and set empty
         # shape. So the following combination works for *reading* scalars:
         #     PyObject *arr = PyArray_FromAny(obj);
 
 @cpython_api([PyObject, Py_ssize_t, Py_ssize_t, Py_ssize_t], PyObject)
 def _PyArray_FromObject(space, w_obj, typenum, min_depth, max_depth):
-    return _PyArray_FromAny(space, w_obj, typenum, min_depth, max_depth, NPY_BEHAVED);
-
+    try:
+        dtype = get_dtype_cache(space).dtypes_by_num[typenum]
+    except KeyError:
+        raise OperationError(space.w_ValueError, space.wrap(
+            '_PyArray_FromObject called with invalid dtype %d' % typenum))
+    try:
+        return _PyArray_FromAny(space, w_obj, dtype, min_depth, max_depth,
+                            0, NULL);
+    except OperationError, e:
+        if e.match(space, space.w_NotImplementedError):
+            errstr = space.str_w(e.get_w_value(space))
+            errstr = '_PyArray_FromObject' + errstr[16:]
+            raise OperationError(space.w_NotImplementedError, space.wrap(
+                errstr))
+        raise
 
 def get_shape_and_dtype(space, nd, dims, typenum):
     shape = []

File pypy/module/cpyext/pyerrors.py

     exc_p[0] = make_ref(space, operr.w_type)
     val_p[0] = make_ref(space, operr.get_w_value(space))
 
-@cpython_api([], lltype.Void)
+@cpython_api([], rffi.INT_real, error=0)
 def PyErr_BadArgument(space):
     """This is a shorthand for PyErr_SetString(PyExc_TypeError, message), where
     message indicates that a built-in operation was invoked with an illegal
-    argument.  It is mostly for internal use."""
+    argument.  It is mostly for internal use. In CPython this function always
+    raises an exception and returns 0 in all cases, hence the (ab)use of the
+    error indicator."""
     raise OperationError(space.w_TypeError,
             space.wrap("bad argument type for built-in operation"))
 

File pypy/module/cpyext/test/test_api.py

             raise Exception("DID NOT RAISE")
         if getattr(space, 'w_' + expected_exc.__name__) is not operror.w_type:
             raise Exception("Wrong exception")
-        state.clear_exception()
+        return state.clear_exception()
 
     def setup_method(self, func):
         freeze_refcnts(self)

File pypy/module/cpyext/test/test_ndarrayobject.py

     def test_FromAny(self, space, api):
         a = array(space, [10, 5, 3])
         assert api._PyArray_FromAny(a, NULL, 0, 0, 0, NULL) is a
-        self.raises(space, api, NotImplementedError, api._PyArray_FromAny,
-                    space.wrap(a), space.w_None, space.wrap(0),
-                    space.wrap(3), space.wrap(0), space.w_None)
+        assert api._PyArray_FromAny(a, NULL, 1, 4, 0, NULL) is a
+        self.raises(space, api, ValueError, api._PyArray_FromAny,
+                    a, NULL, 4, 5, 0, NULL)
 
     def test_FromObject(self, space, api):
         a = array(space, [10, 5, 3])
-        assert api._PyArray_FromObject(a, NULL, 0, 0, 0, NULL) is a
-        self.raises(space, api, NotImplementedError, api._PyArray_FromObject,
-                    space.wrap(a), space.w_None, space.wrap(0),
-                    space.wrap(3), space.wrap(0), space.w_None)
+        assert api._PyArray_FromObject(a, a.get_dtype().num, 0, 0) is a
+        exc = self.raises(space, api, ValueError, api._PyArray_FromObject,
+                    a, 11, 4, 5)
+        assert exc.errorstr(space).find('desired') >= 0
 
     def test_list_from_fixedptr(self, space, api):
         A = lltype.GcArray(lltype.Float)
                 PyObject * obj2 = PyArray_ZEROS(2, dims2, 11, 0);
                 PyArray_FILLWBYTE(obj2, 42);
                 PyArray_CopyInto(obj2, obj1);
+                Py_DECREF(obj1);
+                return obj2;
+                '''
+                ),
+                ("test_FromAny", "METH_NOARGS",
+                '''
+                npy_intp dims[2] ={2, 3};
+                PyObject * obj1 = PyArray_SimpleNew(2, dims, 1);
+                PyArray_FILLWBYTE(obj1, 42);
+                PyObject * obj2 = _PyArray_FromAny(obj1, NULL, 0, 0, 0, NULL);
+                Py_DECREF(obj1);
+                return obj2;
+                '''
+                ),
+                 ("test_FromObject", "METH_NOARGS",
+                '''
+                npy_intp dims[2] ={2, 3};
+                PyObject * obj1 = PyArray_SimpleNew(2, dims, 1);
+                PyArray_FILLWBYTE(obj1, 42);
+                PyObject * obj2 = _PyArray_FromObject(obj1, 12, 0, 0);
+                Py_DECREF(obj1);
                 return obj2;
                 '''
                 ),
         assert (arr == 42).all()
         arr = mod.test_copy()
         assert (arr == 0).all()
+        #Make sure these work without errors
+        arr = mod.test_FromAny()
+        arr = mod.test_FromObject()

File pypy/module/cpyext/test/test_pyerrors.py

         api.PyErr_Clear()
 
     def test_BadArgument(self, space, api):
-        api.PyErr_BadArgument()
+        ret = api.PyErr_BadArgument()
         state = space.fromcache(State)
         assert space.eq_w(state.operror.w_type, space.w_TypeError)
+        assert ret == 0
         api.PyErr_Clear()
 
     def test_Warning(self, space, api, capfd):

File pypy/module/cpyext/test/test_unicodeobject.py

         invalid = rffi.str2charp('invalid')
         utf_8 = rffi.str2charp('utf-8')
         prev_encoding = rffi.str2charp(space.unwrap(w_default_encoding))
+        self.raises(space, api, TypeError, api.PyUnicode_SetDefaultEncoding, lltype.nullptr(rffi.CCHARP.TO))
         assert api.PyUnicode_SetDefaultEncoding(invalid) == -1
         assert api.PyErr_Occurred() is space.w_LookupError
         api.PyErr_Clear()
         rffi.free_charp(b_text)
         rffi.free_charp(b_encoding)
 
+    def test_decode_null_encoding(self, space, api):
+        null_charp = lltype.nullptr(rffi.CCHARP.TO)
+        u_text = u'abcdefg'
+        s_text = space.str_w(api.PyUnicode_AsEncodedString(space.wrap(u_text), null_charp, null_charp))
+        b_text = rffi.str2charp(s_text)
+        assert space.unwrap(api.PyUnicode_Decode(b_text, len(s_text), null_charp, null_charp)) == u_text
+        self.raises(space, api, TypeError, api.PyUnicode_FromEncodedObject, space.wrap(u_text), null_charp, None)
+        rffi.free_charp(b_text)
+
     def test_leak(self):
         size = 50
         raw_buf, gc_buf = rffi.alloc_buffer(size)

File pypy/module/cpyext/unicodeobject.py

 def PyUnicode_SetDefaultEncoding(space, encoding):
     """Sets the currently active default encoding. Returns 0 on
     success, -1 in case of an error."""
+    if not encoding:
+        PyErr_BadArgument(space)
     w_encoding = space.wrap(rffi.charp2str(encoding))
     setdefaultencoding(space, w_encoding)
     default_encoding[0] = '\x00'
     in the unicode() built-in function.  The codec to be used is looked up
     using the Python codec registry.  Return NULL if an exception was raised by
     the codec."""
+    if not encoding:
+        # This tracks CPython 2.7, in CPython 3.4 'utf-8' is hardcoded instead
+        encoding = PyUnicode_GetDefaultEncoding(space)
+    w_encoding = space.wrap(rffi.charp2str(encoding))
     w_str = space.wrap(rffi.charpsize2str(s, size))
-    w_encoding = space.wrap(rffi.charp2str(encoding))
     if errors:
         w_errors = space.wrap(rffi.charp2str(errors))
     else:
 
     All other objects, including Unicode objects, cause a TypeError to be
     set."""
+    if not encoding:
+        raise OperationError(space.w_TypeError,
+                             space.wrap("decoding Unicode is not supported"))
     w_encoding = space.wrap(rffi.charp2str(encoding))
     if errors:
         w_errors = space.wrap(rffi.charp2str(errors))

File pypy/module/math/interp_math.py

             v = hi
         del partials[added:]
         if v != 0.0:
-            if rfloat.isinf(v) or rfloat.isnan(v):
-                if (not rfloat.isinf(original) and
-                    not rfloat.isnan(original)):
+            if not rfloat.isfinite(v):
+                if rfloat.isfinite(original):
                     raise OperationError(space.w_OverflowError,
                                          space.wrap("intermediate overflow"))
                 if rfloat.isinf(original):

File pypy/module/micronumpy/base.py

         return W_NDimArray(scalar.Scalar(dtype, w_val))
 
 
-def convert_to_array(space, w_obj, use_prepare=False):
+def convert_to_array(space, w_obj):
     #XXX: This whole routine should very likely simply be array()
     from pypy.module.micronumpy.interp_numarray import array
     from pypy.module.micronumpy import interp_ufuncs
             if isinstance(w_result, W_NDimArray):
                 return w_result
             else:
-                raise OperationError(space.w_ValueError,
+                raise OperationError(space.w_ValueError, 
                         space.wrap("object __array__ method not producing an array"))
         elif issequence_w(space, w_obj):
             # Convert to array.

File pypy/module/micronumpy/interp_numarray.py

File contents unchanged.

File pypy/module/micronumpy/interp_ufuncs.py

         elif name == 'logical_or':
             self.done_func = done_if_true
         else:
-            self.done_func = None
+            self.done_func = Non
+
+    def are_common_types(self, dtype1, dtype2):
+        if dtype1.is_complex_type() and dtype2.is_complex_type():
+            return True
+        elif not (dtype1.is_complex_type() or dtype2.is_complex_type()) and \
+                (dtype1.is_int_type() and dtype2.is_int_type() or dtype1.is_float_type() and dtype2.is_float_type()) and \
+                not (dtype1.is_bool_type() or dtype2.is_bool_type()):
+            return True
+        return False
 
     @jit.unroll_safe
     def call(self, space, args_w):

File pypy/module/micronumpy/test/test_numarray.py

 
         assert len(list(a[0])) == 2
 
+    def test_issue_1589(self):
+        import numpypy as numpy
+        c = numpy.array([[(1, 2, 'a'), (3, 4, 'b')], [(5, 6, 'c'), (7, 8, 'd')]],
+                        dtype=[('bg', 'i8'), ('fg', 'i8'), ('char', 'S1')])
+        assert c[0][0]["char"] == 'a'
+
+    def test_scalar_coercion(self):
+        import numpypy as np
+        a = np.array([1,2,3], dtype=np.int16)
+        assert (a * 2).dtype == np.int16
+
 class AppTestPyPy(BaseNumpyAppTest):
     def setup_class(cls):
         if option.runappdirect and '__pypy__' not in sys.builtin_module_names:

File pypy/module/micronumpy/test/test_subtype.py

File contents unchanged.

File pypy/module/micronumpy/tool/numready/page.html

     <head>
         <title>NumPyPy Status</title>
         <meta http-equiv="content-type" content="text/html; charset=utf-8">
+        <meta name="description" content="How much of numpy exists in pypy?" >
         <style type="text/css">
             body {
                 font-family: 'Consolas', 'Bitstream Vera Sans Mono', monospace;
+                border: 8px
             }
             h1 {
                 text-align: center;
         </style>
     </head>
     <body>
-        <h1>NumPyPy Status</h1>
+        <h1>NumPyPy Status: how much of numpy can you use in pypy?</h1>
         <h3>Version: {{ ver }}</h3>
+        <h3>numpy compatability test results, generated automatically by running</br>
+        <code>pypy/module/micronumpy/tool/numready/main.py &lt;path-to-latest-pypy&gt;</code></h3>
         <h3>Overall: {{ msg }}</h3>
         <table>
             <thead>

File pypy/module/micronumpy/types.py

 
     def store(self, arr, i, offset, box):
         assert isinstance(box, interp_boxes.W_StringBox)
-        # XXX simplify to range(box.dtype.get_size()) ?
         return self._store(arr.storage, i, offset, box)
 
     @jit.unroll_safe
     def _store(self, storage, i, offset, box):
         assert isinstance(box, interp_boxes.W_StringBox)
-        for k in range(min(self.size, box.arr.size-offset)):
-            storage[k + i] = box.arr.storage[k + offset]
+        # XXX simplify to range(box.dtype.get_size()) ?
+        for k in range(min(self.size, box.arr.size-box.ofs)):
+            storage[k + offset + i] = box.arr.storage[k + box.ofs]
 
     def read(self, arr, i, offset, dtype=None):
         if dtype is None:

File pypy/module/operator/__init__.py

         '__concat__' : 'concat',
         '__contains__' : 'contains',
         'sequenceIncludes' : 'contains',
+        '__index__' : 'index',
         '__delitem__' : 'delitem',
         '__div__' : 'div',
         '__eq__' : 'eq',

File pypy/module/operator/test/test_operator.py

         assert methodcaller("method", 4)(x) == (4, 3)
         assert methodcaller("method", 4, 5)(x) == (4, 5)
         assert methodcaller("method", 4, arg2=42)(x) == (4, 42)
+
+    def test_index(self):
+        import operator
+        assert operator.index(42) == 42
+        assert operator.__index__(42) == 42
+        raises(TypeError, operator.index, "abc")

File pypy/module/posix/__init__.py

         interpleveldefs['nice'] = 'interp_posix.nice'
     if hasattr(os, 'getlogin'):
         interpleveldefs['getlogin'] = 'interp_posix.getlogin'
+    if hasattr(os, 'ctermid'):
+        interpleveldefs['ctermid'] = 'interp_posix.ctermid'
 
     for name in ['setsid', 'getuid', 'geteuid', 'getgid', 'getegid', 'setuid',
                  'seteuid', 'setgid', 'setegid', 'getgroups', 'getpgrp',

File pypy/module/posix/interp_posix.py

         return space.wrap(rurandom.urandom(context, n))
     except OSError, e:
         raise wrap_oserror(space, e)
+
+def ctermid(space):
+    """ctermid() -> string
+
+    Return the name of the controlling terminal for this process.
+    """
+    return space.wrap(os.ctermid())

File pypy/module/pypyjit/policy.py

                        '__pypy__', 'cStringIO', '_collections', 'struct',
                        'mmap', 'marshal', '_codecs', 'rctime', 'cppyy',
                        '_cffi_backend', 'pyexpat', '_continuation', '_io',
-                       'thread']:
+                       'thread', 'select']:
             if modname == 'pypyjit' and 'interp_resop' in rest:
                 return False
             return True

File pypy/module/pypyjit/test/test_policy.py

     from pypy.module.thread.os_lock import Lock
     assert pypypolicy.look_inside_function(Lock.descr_lock_acquire.im_func)
 
+def test_select():
+    from pypy.module.select.interp_select import poll
+    assert pypypolicy.look_inside_function(poll)
+
 def test_pypy_module():
     from pypy.module._collections.interp_deque import W_Deque
     from pypy.module._random.interp_random import W_Random
     assert not pypypolicy.look_inside_function(W_Random.random)
     assert pypypolicy.look_inside_function(W_Deque.length)
-    assert not pypypolicy.look_inside_pypy_module('select.interp_epoll')
     assert pypypolicy.look_inside_pypy_module('__builtin__.operation')
     assert pypypolicy.look_inside_pypy_module('__builtin__.abstractinst')
     assert pypypolicy.look_inside_pypy_module('__builtin__.functional')

File pypy/module/pypyjit/test_pypy_c/test_ffi.py

             f1 = call_release_gil(..., descr=<Calli 4 ii EF=6 OS=62>)
             ...
         """)
+
+    def test__cffi_bug1(self):
+        from rpython.rlib.test.test_clibffi import get_libm_name
+        def main(libm_name):
+            try:
+                import _cffi_backend
+            except ImportError:
+                sys.stderr.write('SKIP: cannot import _cffi_backend\n')
+                return 0
+
+            libm = _cffi_backend.load_library(libm_name)
+            BDouble = _cffi_backend.new_primitive_type("double")
+            BSin = _cffi_backend.new_function_type([BDouble], BDouble)
+            sin = libm.load_function(BSin, 'sin')
+
+            def f(*args):
+                for i in range(300):
+                    sin(*args)
+
+            f(1.0)
+            f(1)
+        #
+        libm_name = get_libm_name(sys.platform)
+        log = self.run(main, [libm_name])
+        # assert did not crash

File pypy/module/pypyjit/test_pypy_c/test_string.py

             i13 = strgetitem(p9, 0)
             i15 = int_eq(i13, 45)
             guard_false(i15, descr=...)
-            i17 = int_sub(0, i10)
+            i17 = int_neg(i10)
             i19 = int_gt(i10, 23)
             guard_false(i19, descr=...)
             p21 = newstr(23)

File pypy/module/pypyjit/test_pypy_c/test_thread.py

         assert log.result == main(500)
         loop, = log.loops_by_filename(self.filepath)
         assert loop.match("""
-        i58 = int_gt(i43, 0)
-        guard_true(i58, descr=<Guard0x10483adb8>)
-        p59 = getfield_gc(p15, descr=<FieldP pypy.module.thread.os_lock.Lock.inst_lock 8>)
-        i60 = getfield_gc(p59, descr=<FieldU rpython.rlib.rthread.Lock.inst__lock 8>)
+        i55 = int_gt(i43, 0)
+        guard_true(i55, descr=...)
+        p56 = force_token()
+        setfield_gc(p0, p56, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token .*>)
+        i57 = call_release_gil(..., i36, 1, descr=<Calli 4 ii EF=6>)
+        guard_not_forced(descr=...)
+        guard_no_exception(descr=...)
+        i58 = int_is_true(i57)
+        guard_true(i58, descr=...)
+        i59 = int_sub(i43, 1)
+        guard_not_invalidated(descr=...)
         p61 = force_token()
-        setfield_gc(p0, p61, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 24>)
-        i62 = call_release_gil(4312440032, i60, 1, descr=<Calli 4 ii EF=6>)
-        guard_not_forced(descr=<Guard0x103f3cca0>)
-        guard_no_exception(descr=<Guard0x10483ad40>)
+        setfield_gc(p0, p61, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token .*>)
+        i62 = call_release_gil(..., i36, 0, descr=<Calli 4 ii EF=6>)
+        guard_not_forced(descr=...)
+        guard_no_exception(descr=...)
         i63 = int_is_true(i62)
-        guard_true(i63, descr=<Guard0x10483acc8>)
-        i64 = int_sub(i43, 1)
-        guard_not_invalidated(descr=<Guard0x10483ac50>)
-        p66 = getfield_gc(p15, descr=<FieldP pypy.module.thread.os_lock.Lock.inst_lock 8>)
-        i67 = getfield_gc(p66, descr=<FieldU rpython.rlib.rthread.Lock.inst__lock 8>)
-        p68 = force_token()
-        setfield_gc(p0, p68, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 24>)
-        i69 = call_release_gil(4312440032, i67, 0, descr=<Calli 4 ii EF=6>)
-        guard_not_forced(descr=<Guard0x103f3cc20>)
-        guard_no_exception(descr=<Guard0x10483aae8>)
-        i70 = int_is_true(i69)
-        guard_false(i70, descr=<Guard0x10483aa70>)
-        i71 = getfield_gc(p66, descr=<FieldU rpython.rlib.rthread.Lock.inst__lock 8>)
-        p72 = force_token()
-        setfield_gc(p0, p72, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 24>)
-        call_release_gil(4312441056, i71, descr=<Callv 0 i EF=6>)
-        guard_not_forced(descr=<Guard0x103f3cba0>)
-        guard_no_exception(descr=<Guard0x10483a9f8>)
-        guard_not_invalidated(descr=<Guard0x10483a980>)
+        guard_false(i63, descr=...)
+        p64 = force_token()
+        setfield_gc(p0, p64, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token .*>)
+        call_release_gil(..., i36, descr=<Callv 0 i EF=6>)
+        guard_not_forced(descr=...)
+        guard_no_exception(descr=...)
+        guard_not_invalidated(descr=...)
         --TICK--
-        jump(..., descr=TargetToken(4361239720))
+        jump(..., descr=...)
         """)

File pypy/module/select/interp_kqueue.py

                         i = 0
                         for w_ev in space.listview(w_changelist):
                             ev = space.interp_w(W_Kevent, w_ev)
-                            changelist[i].c_ident = ev.event.c_ident
-                            changelist[i].c_filter = ev.event.c_filter
-                            changelist[i].c_flags = ev.event.c_flags
-                            changelist[i].c_fflags = ev.event.c_fflags
-                            changelist[i].c_data = ev.event.c_data
-                            changelist[i].c_udata = ev.event.c_udata
+                            changelist[i].c_ident = ev.ident
+                            changelist[i].c_filter = ev.filter
+                            changelist[i].c_flags = ev.flags
+                            changelist[i].c_fflags = ev.fflags
+                            changelist[i].c_data = ev.data
+                            changelist[i].c_udata = ev.udata
                             i += 1
                         pchangelist = changelist
                     else:
                             evt = eventlist[i]
 
                             w_event = W_Kevent(space)
-                            w_event.event = lltype.malloc(kevent, flavor="raw")
-                            w_event.event.c_ident = evt.c_ident
-                            w_event.event.c_filter = evt.c_filter
-                            w_event.event.c_flags = evt.c_flags
-                            w_event.event.c_fflags = evt.c_fflags
-                            w_event.event.c_data = evt.c_data
-                            w_event.event.c_udata = evt.c_udata
+                            w_event.ident = evt.c_ident
+                            w_event.filter = evt.c_filter
+                            w_event.flags = evt.c_flags
+                            w_event.fflags = evt.c_fflags
+                            w_event.data = evt.c_data
+                            w_event.udata = evt.c_udata
 
                             elist_w[i] = w_event
 
 
 class W_Kevent(W_Root):
     def __init__(self, space):
-        self.event = lltype.nullptr(kevent)
-
-    def __del__(self):
-        if self.event:
-            lltype.free(self.event, flavor="raw")
+        self.ident = rffi.cast(kevent.c_ident, 0)
+        self.filter = rffi.cast(kevent.c_filter, 0)
+        self.flags = rffi.cast(kevent.c_flags, 0)
+        self.fflags = rffi.cast(kevent.c_fflags, 0)
+        self.data = rffi.cast(kevent.c_data, 0)
+        self.udata = lltype.nullptr(rffi.VOIDP.TO)
 
     @unwrap_spec(filter=int, flags='c_uint', fflags='c_uint', data=int, udata=r_uint)
     def descr__init__(self, space, w_ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, udata=r_uint(0)):
         else:
             ident = r_uint(space.c_filedescriptor_w(w_ident))
 
-        self.event = lltype.malloc(kevent, flavor="raw")
-        rffi.setintfield(self.event, "c_ident", ident)
-        rffi.setintfield(self.event, "c_filter", filter)
-        rffi.setintfield(self.event, "c_flags", flags)
-        rffi.setintfield(self.event, "c_fflags", fflags)
-        rffi.setintfield(self.event, "c_data", data)
-        self.event.c_udata = rffi.cast(rffi.VOIDP, udata)
+        self.ident = rffi.cast(kevent.c_ident, ident)
+        self.filter = rffi.cast(kevent.c_filter, filter)
+        self.flags = rffi.cast(kevent.c_flags, flags)
+        self.fflags = rffi.cast(kevent.c_fflags, fflags)
+        self.data = rffi.cast(kevent.c_data, data)
+        self.udata = rffi.cast(rffi.VOIDP, udata)
 
     def _compare_all_fields(self, other, op):
         if IDENT_UINT:
-            l_ident = rffi.cast(lltype.Unsigned, self.event.c_ident)
-            r_ident = rffi.cast(lltype.Unsigned, other.event.c_ident)
+            l_ident = rffi.cast(lltype.Unsigned, self.ident)
+            r_ident = rffi.cast(lltype.Unsigned, other.ident)
         else:
-            l_ident = self.event.c_ident
-            r_ident = other.event.c_ident
-        l_filter = rffi.cast(lltype.Signed, self.event.c_filter)
-        r_filter = rffi.cast(lltype.Signed, other.event.c_filter)
-        l_flags = rffi.cast(lltype.Unsigned, self.event.c_flags)
-        r_flags = rffi.cast(lltype.Unsigned, other.event.c_flags)
-        l_fflags = rffi.cast(lltype.Unsigned, self.event.c_fflags)
-        r_fflags = rffi.cast(lltype.Unsigned, other.event.c_fflags)
+            l_ident = self.ident
+            r_ident = other.ident
+        l_filter = rffi.cast(lltype.Signed, self.filter)
+        r_filter = rffi.cast(lltype.Signed, other.filter)
+        l_flags = rffi.cast(lltype.Unsigned, self.flags)
+        r_flags = rffi.cast(lltype.Unsigned, other.flags)
+        l_fflags = rffi.cast(lltype.Unsigned, self.fflags)
+        r_fflags = rffi.cast(lltype.Unsigned, other.fflags)
         if IDENT_UINT:
-            l_data = rffi.cast(lltype.Signed, self.event.c_data)
-            r_data = rffi.cast(lltype.Signed, other.event.c_data)
+            l_data = rffi.cast(lltype.Signed, self.data)
+            r_data = rffi.cast(lltype.Signed, other.data)
         else:
-            l_data = self.event.c_data
-            r_data = other.event.c_data
-        l_udata = rffi.cast(lltype.Unsigned, self.event.c_udata)
-        r_udata = rffi.cast(lltype.Unsigned, other.event.c_udata)
+            l_data = self.data
+            r_data = other.data
+        l_udata = rffi.cast(lltype.Unsigned, self.udata)
+        r_udata = rffi.cast(lltype.Unsigned, other.udata)
 
         if op == "eq":
             return l_ident == r_ident and \
         return space.wrap(self.compare_all_fields(space, w_other, "gt"))
 
     def descr_get_ident(self, space):
-        return space.wrap(self.event.c_ident)
+        return space.wrap(self.ident)
 
     def descr_get_filter(self, space):
-        return space.wrap(self.event.c_filter)
+        return space.wrap(self.filter)
 
     def descr_get_flags(self, space):
-        return space.wrap(self.event.c_flags)
+        return space.wrap(self.flags)
 
     def descr_get_fflags(self, space):
-        return space.wrap(self.event.c_fflags)
+        return space.wrap(self.fflags)
 
     def descr_get_data(self, space):
-        return space.wrap(self.event.c_data)
+        return space.wrap(self.data)
 
     def descr_get_udata(self, space):
-        return space.wrap(rffi.cast(rffi.UINTPTR_T, self.event.c_udata))
+        return space.wrap(rffi.cast(rffi.UINTPTR_T, self.udata))
 
 
 W_Kevent.typedef = TypeDef("select.kevent",

File pypy/module/test_lib_pypy/numpypy/test_numpy.py

 
     def test___all__(self):
         import numpy
-        assert '__all__' in numpy
+        assert '__all__' in dir(numpy)
         assert 'numpypy' not in dir(numpy)
 
     def test_get_include(self):
+        import sys
+        if not hasattr(sys, 'pypy_translation_info'):
+            skip("pypy white-box test")
         import numpy, os
         assert 'get_include' in dir(numpy)
         path = numpy.get_include()

File pypy/module/test_lib_pypy/test_sqlite3.py

     result = list(cursor)
     assert result == [(42,)]
 
+def test_connect_takes_same_positional_args_as_Connection(con):
+    from inspect import getargspec
+    clsargs = getargspec(_sqlite3.Connection.__init__).args[1:]  # ignore self
+    conargs = getargspec(_sqlite3.connect).args
+    assert clsargs == conargs
+
 def test_total_changes_after_close(con):
     con.close()
     pytest.raises(_sqlite3.ProgrammingError, "con.total_changes")

File pypy/module/thread/os_lock.py

 class Lock(W_Root):
     "A box around an interp-level lock object."
 
+    _immutable_fields_ = ["lock"]
+
     def __init__(self, space):
         self.space = space
         try:

File pypy/objspace/std/floatobject.py

     x = w_float1.floatval
     y = w_float2.floatval
 
+    return W_FloatObject(_pow(space, x, y))
+
+def _pow(space, x, y):
     # Sort out special cases here instead of relying on pow()
-    if y == 2.0:                      # special case for performance:
-        return W_FloatObject(x * x)   # x * x is always correct
+    if y == 2.0:       # special case for performance:
+        return x * x   # x * x is always correct
     if y == 0.0:
         # x**0 is 1, even 0**0
-        return W_FloatObject(1.0)
+        return 1.0
     if isnan(x):
         # nan**y = nan, unless y == 0
-        return W_FloatObject(x)
+        return x
     if isnan(y):
         # x**nan = nan, unless x == 1; x**nan = x
         if x == 1.0:
-            return W_FloatObject(1.0)
+            return 1.0
         else:
-            return W_FloatObject(y)
+            return y
     if isinf(y):
         # x**inf is: 0.0 if abs(x) < 1; 1.0 if abs(x) == 1; inf if
         # abs(x) > 1 (including case where x infinite)
         # abs(x) > 1 (including case where v infinite)
         x = abs(x)
         if x == 1.0:
-            return W_FloatObject(1.0)
+            return 1.0
         elif (y > 0.0) == (x > 1.0):
-            return W_FloatObject(INFINITY)
+            return INFINITY
         else:
-            return W_FloatObject(0.0)
+            return 0.0
     if isinf(x):
         # (+-inf)**w is: inf for w positive, 0 for w negative; in oth
         # cases, we need to add the appropriate sign if w is an odd
         y_is_odd = math.fmod(abs(y), 2.0) == 1.0
         if y > 0.0:
             if y_is_odd:
-                return W_FloatObject(x)
+                return x
             else:
-                return W_FloatObject(abs(x))
+                return abs(x)
         else:
             if y_is_odd:
-                return W_FloatObject(copysign(0.0, x))
+                return copysign(0.0, x)
             else:
-                return W_FloatObject(0.0)
+                return 0.0
 
     if x == 0.0:
         if y < 0.0:
     # -           pipermail/python-bugs-list/2003-March/016795.html
     if x < 0.0:
         if isnan(y):
-            return W_FloatObject(NAN)
+            return NAN
         if math.floor(y) != y:
             raise OperationError(space.w_ValueError,
                                  space.wrap("negative number cannot be "
     if x == 1.0:
         # (-1) ** large_integer also ends up here
         if negate_result:
-            return W_FloatObject(-1.0)
+            return -1.0
         else:
-            return W_FloatObject(1.0)
+            return 1.0
 
     try:
         # We delegate to our implementation of math.pow() the error detection.
 
     if negate_result:
         z = -z
-    return W_FloatObject(z)
+    return z
 
 
 def neg__Float(space, w_float1):

File pypy/objspace/std/listobject.py

 from rpython.rlib import debug, jit, rerased
 from rpython.rlib.listsort import make_timsort_class
 from rpython.rlib.objectmodel import (
-    instantiate, newlist_hint, resizelist_hint, specialize)
+    instantiate, newlist_hint, resizelist_hint, specialize, import_from_mixin)
 from rpython.tool.sourcetools import func_with_new_name
 
 __all__ = ['W_ListObject', 'make_range_list', 'make_empty_list_with_size']
 
 
 class AbstractUnwrappedStrategy(object):
-    _mixin_ = True
 
     def wrap(self, unwrapped):
         raise NotImplementedError
 
     def setslice(self, w_list, start, step, slicelength, w_other):
         assert slicelength >= 0
-        items = self.unerase(w_list.lstorage)
 
         if self is self.space.fromcache(ObjectListStrategy):
             w_other = w_other._temporarily_as_objects()
             w_list.setslice(start, step, slicelength, w_other_as_object)
             return
 
+        items = self.unerase(w_list.lstorage)
         oldsize = len(items)
         len2 = w_other.length()
         if step == 1:  # Support list resizing for non-extended slices
         self.unerase(w_list.lstorage).reverse()
 
 
-class ObjectListStrategy(AbstractUnwrappedStrategy, ListStrategy):
+class ObjectListStrategy(ListStrategy):
+    import_from_mixin(AbstractUnwrappedStrategy)
+
     _none_value = None
     _applevel_repr = "object"
 
         return self.unerase(w_list.lstorage)
 
 
-class IntegerListStrategy(AbstractUnwrappedStrategy, ListStrategy):
+class IntegerListStrategy(ListStrategy):
+    import_from_mixin(AbstractUnwrappedStrategy)
+
     _none_value = 0
     _applevel_repr = "int"
 
         return self.unerase(w_list.lstorage)
 
 
-class FloatListStrategy(AbstractUnwrappedStrategy, ListStrategy):
+    _base_extend_from_list = _extend_from_list
+
+    def _extend_from_list(self, w_list, w_other):
+        if w_other.strategy is self.space.fromcache(RangeListStrategy):
+            l = self.unerase(w_list.lstorage)
+            other = w_other.getitems_int()
+            assert other is not None
+            l += other
+            return
+        return self._base_extend_from_list(w_list, w_other)
+
+
+    _base_setslice = setslice
+
+    def setslice(self, w_list, start, step, slicelength, w_other):
+        if w_other.strategy is self.space.fromcache(RangeListStrategy):
+            storage = self.erase(w_other.getitems_int())
+            w_other = W_ListObject.from_storage_and_strategy(
+                    self.space, storage, self)
+        return self._base_setslice(w_list, start, step, slicelength, w_other)
+
+class FloatListStrategy(ListStrategy):
+    import_from_mixin(AbstractUnwrappedStrategy)
+
     _none_value = 0.0
     _applevel_repr = "float"
 
             l.reverse()
 
 
-class StringListStrategy(AbstractUnwrappedStrategy, ListStrategy):
+class StringListStrategy(ListStrategy):
+    import_from_mixin(AbstractUnwrappedStrategy)
+
     _none_value = None
     _applevel_repr = "str"
 
         return self.unerase(w_list.lstorage)
 
 
-class UnicodeListStrategy(AbstractUnwrappedStrategy, ListStrategy):
+class UnicodeListStrategy(ListStrategy):
+    import_from_mixin(AbstractUnwrappedStrategy)
+
     _none_value = None
     _applevel_repr = "unicode"