Opened 12 years ago
Closed 12 years ago
#8316 closed enhancement (fixed)
Remove the Jinja (not Jinja2) package
Reported by: | mpatel | Owned by: | tbd |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.5.3 |
Component: | packages: standard | Keywords: | |
Cc: | AlexGhitza, cwitty, mhansen, robertwb, timdumol | Merged in: | sage-4.5.3.alpha0 |
Authors: | Mitesh Patel | Reviewers: | Carl Witty |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Attachments (7)
Change History (13)
comment:1 Changed 12 years ago by
- Cc cwitty added
comment:2 Changed 12 years ago by
To do: Update spkg/install
and spkg/standard/deps
. I'll wait for #8306.
comment:3 Changed 12 years ago by
- Cc AlexGhitza mhansen robertwb timdumol added
- Milestone set to sage-4.4.5
- Priority changed from major to minor
- Status changed from new to needs_review
With V1 of the patch, sage -b
gives
[...] Building interpreters for fast_callable Traceback (most recent call last): File "setup.py", line 109, in <module> sage.ext.gen_interpreters.rebuild(SAGE_DEVEL + 'sage/sage/ext/interpreters') File "/mnt/usb1/scratch/mpatel/apps/sage-4.4.4.a0/devel/sage-main/sage/ext/gen_interpreters.py", line 3823, in rebuild build_interp(interp, dir) File "/mnt/usb1/scratch/mpatel/apps/sage-4.4.4.a0/devel/sage-main/sage/ext/gen_interpreters.py", line 3788, in build_interp interp = ig.get_interpreter() File "/mnt/usb1/scratch/mpatel/apps/sage-4.4.4.a0/devel/sage-main/sage/ext/gen_interpreters.py", line 3318, in get_interpreter self.write_interpreter(buff.write) File "/mnt/usb1/scratch/mpatel/apps/sage-4.4.4.a0/devel/sage-main/sage/ext/gen_interpreters.py", line 2974, in write_interpreter """, s=s, self=self, i=indent_lines)) File "/mnt/usb1/scratch/mpatel/apps/sage-4.4.4.a0/devel/sage-main/sage/ext/gen_interpreters.py", line 177, in je return tmpl.render(kwargs) File "<template>", line 4, in top-level template code File "/home/mpatel/apps/sage/local/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-linux-x86_64.egg/jinja2/runtime.py", line 132, in call return __obj(*args, **kwargs) File "/home/mpatel/apps/sage/local/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-linux-x86_64.egg/jinja2/runtime.py", line 403, in _fail_with_undefined_error raise self._undefined_exception(hint) jinja2.exceptions.UndefinedError: 'TemplateReference' object has no attribute 'func_header' sage: There was an error installing modified sage library code.
The docstring for jinja2.runtime.TemplateReference
is "The self
in templates." But I'm not sure why this happens. Does Jinja2 not allow self=self
?
V2 of the patch appears to be OK: sage -b
works, Sage builds from scratch with SAGE_CHECK
, the long tests pass. Did I miss any self
--> myself
conversions? Should I run some other tests?
I'm not familiar with ext/
, so I've included some names from hg log gen_interpreters.py
in the Cc: list.
comment:4 Changed 12 years ago by
- Milestone changed from sage-4.4.5 to sage-4.5
Milestone sage-4.4.5 deleted
comment:5 Changed 12 years ago by
- Reviewers set to Carl Witty
- Status changed from needs_review to positive_review
Thanks for fixing up gen_interpreters.py, your changes look fine (and the template output from the patched gen_interpreters.py using jinja2 is byte-for-byte identical to the previous output using jinja).
I tested by starting from sage-4.5.rc1.tar, removing the jinja spkg, and applying install.diff and 4.5.rc1-deps.diff (the original deps.diff would no longer apply, so I rebased it). I then typed "make", waited for the build to fail, applied trac_8316-remove_jinja.2.patch, and restarted the build. The build was successfull, and all (long) tests passed.
Positive review.
comment:6 Changed 12 years ago by
- Merged in set to sage-4.5.3.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
I'm merging
into 4.5.3.alpha0. Thanks for the review and rebasing the latter.
SageNB no longer depends on Jinja. The Sage library does: