Re: Template variable reference fails
"John P. Rouillard" <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Tom: In message <DM6PR08MB4778871D2A463FE3A889D40ACA710@DM6PR08MB4778.namprd08.prod. outlook.com>, Tom Ekberg writes: >This is the case where a TAL variable reference using near-tip roundup >and python3.5 fails. > >I think I have discovered why this happens. In >cgi/PageTemplates/PythonExpr.py there is a slight difference between >determining variable references in Python 2.7 and Python 3.5. In >Python 2.7, assuming function f, evaluating f.func_code.co_names is >used to determine variable references. In Python 3.5 the >corresponding expression is f.__code__.co_names. On the surface this >looks correct. If the function f looks like this: > > [...] >So, this is a roundup bug due a difference between Python 3.5 and >2.7. Other than filing a bug report I don't know how to >proceeded. Any ideas? One thing that may be helpful for Joseph (or other person looking into it) is a minimal test case that can be run under the demo.py tracker. Will the template you saw this issue with work under demo.py? If so you can probably cut it down to the minimal tal needed to reproduce the issue. Have a great week. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions.