Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r93427:ff0600c50bee
Date: 2017-12-15 22:22 +0000
http://bitbucket.org/pypy/pypy/changeset/ff0600c50bee/
Log: kill __pypy__.save_module_content_for_future_reload(), it does not
do anything (probably maybe)
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -574,10 +574,6 @@
except ValueError:
pass # ignore "2 is not a valid file descriptor"
- if we_are_translated():
- import __pypy__
- __pypy__.save_module_content_for_future_reload(sys)
-
mainmodule = type(sys)('__main__')
mainmodule.__loader__ = sys.__loader__
mainmodule.__builtins__ = os.__builtins__
diff --git a/pypy/module/__pypy__/__init__.py b/pypy/module/__pypy__/__init__.py
--- a/pypy/module/__pypy__/__init__.py
+++ b/pypy/module/__pypy__/__init__.py
@@ -92,8 +92,6 @@
'set_debug' : 'interp_magic.set_debug',
'locals_to_fast' : 'interp_magic.locals_to_fast',
'set_code_callback' : 'interp_magic.set_code_callback',
- 'save_module_content_for_future_reload':
- 'interp_magic.save_module_content_for_future_reload',
'decode_long' : 'interp_magic.decode_long',
'_promote' : 'interp_magic._promote',
'normalize_exc' : 'interp_magic.normalize_exc',
@@ -131,7 +129,7 @@
raise
else:
pass # ok fine to ignore in this case
-
+
if self.space.config.translation.jit:
features = detect_cpu.getcpufeatures(model)
self.extra_interpdef('jit_backend_features',
diff --git a/pypy/module/__pypy__/interp_magic.py
b/pypy/module/__pypy__/interp_magic.py
--- a/pypy/module/__pypy__/interp_magic.py
+++ b/pypy/module/__pypy__/interp_magic.py
@@ -145,10 +145,6 @@
assert isinstance(w_frame, PyFrame)
w_frame.locals2fast()
-@unwrap_spec(w_module=MixedModule)
-def save_module_content_for_future_reload(space, w_module):
- w_module.save_module_content_for_future_reload()
-
def set_code_callback(space, w_callable):
cache = space.fromcache(CodeHookCache)
if space.is_none(w_callable):
diff --git a/pypy/module/__pypy__/test/test_magic.py
b/pypy/module/__pypy__/test/test_magic.py
--- a/pypy/module/__pypy__/test/test_magic.py
+++ b/pypy/module/__pypy__/test/test_magic.py
@@ -2,18 +2,6 @@
class AppTestMagic:
spaceconfig = dict(usemodules=['__pypy__'])
- def test_save_module_content_for_future_reload(self):
- import sys, __pypy__, imp
- d = sys.dont_write_bytecode
- sys.dont_write_bytecode = "hello world"
- __pypy__.save_module_content_for_future_reload(sys)
- sys.dont_write_bytecode = d
- imp.reload(sys)
- assert sys.dont_write_bytecode == "hello world"
- #
- sys.dont_write_bytecode = d
- __pypy__.save_module_content_for_future_reload(sys)
-
def test_new_code_hook(self):
# workaround for running on top of old CPython 2.7 versions
def exec_(code, d):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit