[pypy-commit] pypy py3.5: merge default
pjenvey
pypy.commits at gmail.com
Tue Oct 25 00:45:07 EDT 2016
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3.5
Changeset: r87926:4b269804d362
Date: 2016-10-24 21:40 -0700
http://bitbucket.org/pypy/pypy/changeset/4b269804d362/
Log: merge default
diff --git a/lib_pypy/_collections.py b/lib_pypy/_collections.py
--- a/lib_pypy/_collections.py
+++ b/lib_pypy/_collections.py
@@ -29,7 +29,7 @@
class deque(object):
def __new__(cls, iterable=(), *args, **kw):
- self = super(deque, cls).__new__(cls, *args, **kw)
+ self = super(deque, cls).__new__(cls)
self.clear()
return self
diff --git a/lib_pypy/_ctypes/structure.py b/lib_pypy/_ctypes/structure.py
--- a/lib_pypy/_ctypes/structure.py
+++ b/lib_pypy/_ctypes/structure.py
@@ -228,7 +228,7 @@
class StructOrUnion(_CData, metaclass=StructOrUnionMeta):
def __new__(cls, *args, **kwds):
- self = super(_CData, cls).__new__(cls, *args, **kwds)
+ self = super(_CData, cls).__new__(cls)
if '_abstract_' in cls.__dict__:
raise TypeError("abstract class")
if hasattr(cls, '_ffistruct_'):
diff --git a/pypy/doc/install.rst b/pypy/doc/install.rst
--- a/pypy/doc/install.rst
+++ b/pypy/doc/install.rst
@@ -1,8 +1,17 @@
Downloading and Installing PyPy
===============================
+Using a packaged PyPy
+~~~~~~~~~~~~~~~~~~~~~
+
+Some Linux distributions provide a pypy package. Note that in order to
+install additional modules that require compilation, you may need to install
+additional packages such as pypy-dev. This will manifest as an error about
+"missing Python.h". Distributions do not as of yet supply many pypy-ready
+packages, if you require additional modules we recommend creating a virtualenv
+and using pip.
+
.. _prebuilt-pypy:
-
Download a pre-built PyPy
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -38,6 +47,9 @@
and not move the binary there, else PyPy would not be able to find its
library.
+Installing more modules
+~~~~~~~~~~~~~~~~~~~~~~~
+
If you want to install 3rd party libraries, the most convenient way is
to install pip_ using ensurepip_ (unless you want to install virtualenv as
explained below; then you can directly use pip inside virtualenvs):
diff --git a/pypy/objspace/std/objectobject.py b/pypy/objspace/std/objectobject.py
--- a/pypy/objspace/std/objectobject.py
+++ b/pypy/objspace/std/objectobject.py
@@ -91,11 +91,17 @@
from pypy.objspace.std.typeobject import _precheck_for_new
w_type = _precheck_for_new(space, w_type)
- # don't allow arguments if the default object.__init__() is about
- # to be called
if _excess_args(__args__):
+ w_parent_new, _ = space.lookup_in_type_where(w_type, '__new__')
w_parent_init, _ = space.lookup_in_type_where(w_type, '__init__')
- if w_parent_init is space.w_object:
+ if (w_parent_new is not space.w_object and
+ w_parent_init is not space.w_object):
+ # 2.7: warn about excess arguments when both methods are
+ # overridden
+ space.warn(space.wrap("object() takes no parameters"),
+ space.w_DeprecationWarning, 1)
+ elif (w_parent_new is not space.w_object or
+ w_parent_init is space.w_object):
raise oefmt(space.w_TypeError,
"object() takes no parameters")
if w_type.is_abstract():
@@ -108,7 +114,6 @@
def descr__init__(space, w_obj, __args__):
- # don't allow arguments unless __new__ is overridden
if _excess_args(__args__):
w_type = space.type(w_obj)
w_parent_new, _ = space.lookup_in_type_where(w_type, '__new__')
More information about the pypy-commit
mailing list