From 9364aa2036dd84459ebc327cda406cb99083b1f5 Mon Sep 17 00:00:00 2001 From: Donald McClymont Date: Wed, 5 Sep 2018 23:34:05 +0100 Subject: [PATCH] Support for compiled apps on python 3.7 and above - marshal_header_size increased to 16 for those cases - tested by compiling and running welcome app on py 2.7,3.6 and 3.7 --- gluon/compileapp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gluon/compileapp.py b/gluon/compileapp.py index 0d61afb3..dd7aca00 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -15,7 +15,7 @@ Note: import re import fnmatch -import os +import os, sys import copy import random from gluon._compat import builtin, PY2, unicodeT, to_native, to_bytes, iteritems, basestring, reduce, xrange, long, reload @@ -52,7 +52,10 @@ is_gae = settings.global_settings.web2py_runtime_gae is_jython = settings.global_settings.is_jython pjoin = os.path.join -marshal_header_size = 8 if PY2 else 12 +if PY2: + marshal_header_size = 8 +else: + marshal_header_size = 16 if sys.version_info[1] >= 7 else 12 TEST_CODE = \ r"""