Skip to content

Commit 17a153e

Browse files
committed
Fix missed renames (for py3k style func attributes).
1 parent cbb3253 commit 17a153e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CPythonLib.includes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ json/**
1717
__future__.py
1818
_LWPCookieJar.py
1919
_MozillaCookieJar.py
20+
_pyio.py
2021
_strptime.py
2122
_threading_local.py
2223
aifc.py

src/org/python/core/ContextGuard.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ public static ContextManager getManager(PyObject manager) {
5656
public static PyObject makeManager(PyObject object) {
5757
if (object instanceof PyFunction) {
5858
PyFunction function = (PyFunction) object;
59-
PyCode code = function.func_code;
59+
PyCode code = function.__code__;
6060
if (code instanceof PyBaseCode) {
6161
PyBaseCode pyCode = (PyBaseCode) code;
6262
if (pyCode.co_flags.isFlagSet(CodeFlag.CO_GENERATOR)) {
63-
return new PyFunction(function.func_globals,
63+
return new PyFunction(function.__globals__,
6464
function.func_defaults,
6565
new ContextCode(pyCode),
6666
function.__doc__,

0 commit comments

Comments
 (0)