Commit f0ff58e7 authored by Michael Droettboom's avatar Michael Droettboom

Back out sys.implementation.cache_tag = None

parent 149de022
......@@ -8,7 +8,6 @@ source:
patches:
- patches/named-tmp-and-rm-dup2.patch
- patches/workaround_get_tag.patch
requirements:
run:
......
diff -ur pytest-3.6.3-bak/src/_pytest/assertion/rewrite.py pytest-3.6.3/src/_pytest/assertion/rewrite.py
--- pytest-3.6.3-bak/src/_pytest/assertion/rewrite.py 2018-11-08 14:58:43.984236991 -0500
+++ pytest-3.6.3/src/_pytest/assertion/rewrite.py 2018-11-08 14:59:59.881455735 -0500
@@ -19,7 +19,7 @@
# pytest caches rewritten pycs in __pycache__.
-if hasattr(imp, "get_tag"):
+if hasattr(imp, "get_tag") and imp.get_tag() is not None:
PYTEST_TAG = imp.get_tag() + "-PYTEST"
else:
if hasattr(sys, "pypy_version_info"):
......@@ -57,19 +57,6 @@ main(int argc, char** argv)
if (PyObject_SetAttrString(sys, "dont_write_bytecode", Py_True)) {
return 1;
}
// By disabling the cache_tag, Python won't look for cached bytecode files
// when importing modules, which saves on filesystem I/O time
PyObject* implementation = PyObject_GetAttrString(sys, "implementation");
if (implementation == NULL) {
return 1;
}
if (PyObject_SetAttrString(implementation, "cache_tag", Py_None)) {
return 1;
}
Py_DECREF(implementation);
Py_DECREF(sys);
if (js2python_init() || JsImport_init() || JsProxy_init() ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment