aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--pypy/doc/conf.py2
-rw-r--r--pypy/interpreter/function.py20
-rw-r--r--pypy/interpreter/test/apptest_function.py17
-rw-r--r--pypy/module/cpyext/include/patchlevel.h4
-rw-r--r--pypy/module/sys/version.py5
6 files changed, 11 insertions, 39 deletions
diff --git a/Makefile b/Makefile
index 55a9b0238f..7d9703b95a 100644
--- a/Makefile
+++ b/Makefile
@@ -38,4 +38,4 @@ endif
cd pypy/goal && $(RUNINTERP) ../../rpython/bin/rpython $(JOBS) -Ojit targetpypystandalone.py
cffi_imports: pypy-c
- cd lib_pypy && ../pypy/goal/pypy-c pypy_tools/build_cffi_imports.py || /bin/true
+ PYTHONPATH=. pypy/goal/pypy-c lib_pypy/pypy_tools/build_cffi_imports.py
diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py
index 781566b52d..4cade5c6a8 100644
--- a/pypy/doc/conf.py
+++ b/pypy/doc/conf.py
@@ -89,7 +89,7 @@ copyright = u'2020, The PyPy Project'
# The short X.Y version.
version = '7.3'
# The full version, including alpha/beta/rc tags.
-release = '7.3.4'
+release = '7.3.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
index e8beb0f33c..1ae38283ea 100644
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -343,11 +343,6 @@ class Function(W_Root):
self.defs_w = space.fixedview(w_defs)
self.w_module = w_module
- def _check_code_mutable(self, attr):
- if not self.can_change_code:
- raise oefmt(self.space.w_TypeError,
- "Cannot change %s attribute of builtin functions", attr)
-
def fget_func_defaults(self, space):
values_w = self.defs_w
# the `None in values_w` check here is to ensure that interp-level
@@ -358,7 +353,6 @@ class Function(W_Root):
return space.newtuple(values_w)
def fset_func_defaults(self, space, w_defaults):
- self._check_code_mutable("func_defaults")
if space.is_w(w_defaults, space.w_None):
self.defs_w = []
return
@@ -368,7 +362,6 @@ class Function(W_Root):
self.defs_w = space.fixedview(w_defaults)
def fdel_func_defaults(self, space):
- self._check_code_mutable("func_defaults")
self.defs_w = []
def fget_func_doc(self, space):
@@ -377,24 +370,21 @@ class Function(W_Root):
return self.w_doc
def fset_func_doc(self, space, w_doc):
- self._check_code_mutable("func_doc")
self.w_doc = w_doc
- def fdel_func_doc(self, space):
- self._check_code_mutable("func_doc")
- self.w_doc = space.w_None
-
def fget_func_name(self, space):
return space.newtext(self.name)
def fset_func_name(self, space, w_name):
- self._check_code_mutable("func_name")
if space.isinstance_w(w_name, space.w_text):
self.name = space.text_w(w_name)
else:
raise oefmt(space.w_TypeError,
"__name__ must be set to a string object")
+ def fdel_func_doc(self, space):
+ self.w_doc = space.w_None
+
def fget___module__(self, space):
if self.w_module is None:
if self.w_func_globals is not None and not space.is_w(self.w_func_globals, space.w_None):
@@ -404,15 +394,13 @@ class Function(W_Root):
return self.w_module
def fset___module__(self, space, w_module):
- self._check_code_mutable("func_name")
self.w_module = w_module
def fdel___module__(self, space):
- self._check_code_mutable("func_name")
self.w_module = space.w_None
def fget_func_code(self, space):
- return self.getcode()
+ return self.code
def fset_func_code(self, space, w_code):
from pypy.interpreter.pycode import PyCode
diff --git a/pypy/interpreter/test/apptest_function.py b/pypy/interpreter/test/apptest_function.py
index 91ec1cd296..a97f01528f 100644
--- a/pypy/interpreter/test/apptest_function.py
+++ b/pypy/interpreter/test/apptest_function.py
@@ -98,23 +98,6 @@ def test_write_code_builtin_forbidden():
with raises(TypeError):
list.append.im_func.func_code = f.func_code
-def test_write_attributes_builtin_forbidden():
- for func in [dir, dict.get.im_func]:
- with raises(TypeError):
- func.func_defaults = (1, )
- with raises(TypeError):
- del func.func_defaults
- with raises(TypeError):
- func.func_doc = ""
- with raises(TypeError):
- del func.func_doc
- with raises(TypeError):
- func.func_name = ""
- with raises(TypeError):
- func.__module__ = ""
- with raises(TypeError):
- del func.__module__
-
def test_set_name():
def f(): pass
f.__name__ = 'g'
diff --git a/pypy/module/cpyext/include/patchlevel.h b/pypy/module/cpyext/include/patchlevel.h
index 006748d610..77f264c80b 100644
--- a/pypy/module/cpyext/include/patchlevel.h
+++ b/pypy/module/cpyext/include/patchlevel.h
@@ -32,8 +32,8 @@
* module/sys/version.py
* doc/conf.py
*/
-#define PYPY_VERSION "7.3.4-alpha0"
-#define PYPY_VERSION_NUM 0x07030400
+#define PYPY_VERSION "7.3.3"
+#define PYPY_VERSION_NUM 0x07030300
/* Defined to mean a PyPy where cpyext holds more regular references
to PyObjects, e.g. staying alive as long as the internal PyPy object
stays alive. */
diff --git a/pypy/module/sys/version.py b/pypy/module/sys/version.py
index 5b87289e41..7a783dff98 100644
--- a/pypy/module/sys/version.py
+++ b/pypy/module/sys/version.py
@@ -5,14 +5,15 @@ import os
from rpython.rlib import compilerinfo
from pypy.interpreter import gateway
-CPYTHON_VERSION = (2, 7, 18, "final", 0)
+#XXX # the release serial 42 is not in range(16)
+CPYTHON_VERSION = (2, 7, 18, "final", 42)
#XXX # sync CPYTHON_VERSION with patchlevel.h, package.py
CPYTHON_API_VERSION = 1013 #XXX # sync with include/modsupport.h
# make sure to keep PYPY_VERSION in sync with:
# module/cpyext/include/patchlevel.h
# doc/conf.py
-PYPY_VERSION = (7, 3, 4, "alpha", 0)
+PYPY_VERSION = (7, 3, 3, "final", 0)
import pypy