summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add support for ``zope.untrustedpython`` on Python 3. (#29)Michael Howitz2023-02-072-25/+32
| | | With it, Python expressions are now protected by RestrictedPython.
* Multiple changes (#31)Michael Howitz2023-02-0711-96/+106
| | | | | | | | | * Add support for Python 3.11. * Lint the code. * Improve error handling in test. * Bumped version for breaking release. * Drop support for Python 2.7, 3.5, 3.6. Co-authored-by: Gil Forcada Codinachs <gil.gnome@gmail.com>
* Config with pure python (#28)Michael Howitz2021-05-2811-62/+122
| | | | * Lint the code. * Add support for Python 3.9.
* Avoid traceback reference cycle in PageTemplate._cookColin Watson2021-05-141-4/+7
| | | | | | | | In Python 3, exceptions have a ``__traceback__`` attribute containing their associated traceback. Storing an exception in a local variable of a frame present in that traceback thus creates a reference cycle. Avoid this by explicitly deleting the exception value when we're finished with it.
* Fix tests on PyPyfix-pypyMarius Gedminas2019-10-011-1/+1
| | | | | | | Instance methods have type 'instancemethod' instead of just 'method' on PyPy2.7 (version 7.0.0 here). Closes #22.
* Fix deprecation warnings.Jason Madden2018-10-162-5/+8
| | | | Fixes #17
* Fix Sphinx doctest build under Python 3.Jason Madden2017-11-031-2/+2
| | | | | | I don't know how it actually passes, though, since test_engine.py includes a bunch of other regexes to normalize, and if I take those out then running the unittest doctest fails.
* Build documents with Sphinx for RTDJason Madden2017-11-025-132/+55
| | | | | | Fixes #8 Run doctests with Sphinx on all versions as well.
* whitespace [skip ci]Jason Madden2017-09-041-5/+4
|
* 100% test coveragecoverageJason Madden2017-08-149-299/+409
| | | | | | | | | | | | | | Fixes #9 Two potentially important changes: - Removed unused code in the tests/ package. If other packages were using it, they will need updates. (They shouldn't be, but that's happened before.) - Changed TraversableModuleImporter to catch ImportError instead of KeyError. There's no way the underlying SimpleModuleImporter can raise a KeyError anymore. I think this is the desired semantic but I am not 100% sure.
* Add support for Python 3.2Jason Madden2015-06-053-12/+16
|
* Roll back use of __class__; neither C nor Python proxy can directly lie to ↵Jason Madden2015-05-311-1/+1
| | | | 'type'. This turns out to be a bug in the zope.security.proxy.removeSecurityProxy function under pure-Python, so the build won't be green until zopefoundation/zope.security#11 or something like it is released.
* Add PyPy support.Jason Madden2015-05-292-4/+17
| | | | | | | | | | | PyPy doesn't support assigning to __builtins__, even in eval(), so this means that zope.untrusted.builtins is not helpful, even though it can be installed. Therefore, HAVE_UNTRUSTED must always be False under PyPy, just like under Python 3. Minor doctest renormalization to deal with the changed class name of the proxy. A pure-Python proxy can't lie about its type, so use __class__ in one doctest.
* Allow short-circuit traversal for non-proxied dict subclassesColin Watson2015-01-201-0/+22
| | | | | | | | | | | This change is based on https://code.launchpad.net/~wallyworld/zope.pagetemplate/fix-isinstance/+merge/38499 by Ian Booth. The original approach in that branch broke tests, because they rely on subclassing dict with an implementer of ITraversable. Rather than changing this, it seems safer to only extend the dict special-case to non-proxied subclasses.
* Nest into Github.Tres Seaver2014-12-272-12/+2
|
* Remove unused filesMarius Gedminas2014-04-303-29/+0
| | | | | | | | | | | I can tell these are unused by doing strace -e open -f -o /tmp/wtf.zpt bin/test and then grepping for 'testpackage' in /tmp/wtf.zpt. I wanted to remove these because pyflakes complains about an undefined ViewPageTemplateFile in there.
* Fix undefined nameMarius Gedminas2014-04-301-1/+1
| | | | Fixes https://github.com/zopefoundation/zope.pagetemplate/issues/2
* Unused importMarius Gedminas2014-04-301-1/+0
|
* Fix typo in unused test codeMarius Gedminas2014-04-301-1/+1
| | | | | I assume it is unused because otherwise this would've been fixed long ago, right?
* Fix DeprecationWarningMarius Gedminas2013-03-151-1/+1
|
* Make sure ZopePythonExpr and PythonExpr are separate classesMarius Gedminas2013-03-151-8/+8
| | | | | | There are ZCML files out there (zope.app.pagetemplate) that want to define permissions for ZopePythonExpr and PythonExpr, and get conflicts if these are two names referring to the same class.
* Port to Py3.3.Albertas Agejevas2013-02-227-93/+128
|
* Close files. Gets rid of warnings on Py3.Albertas Agejevas2013-02-221-2/+4
|
* Fixup extra.Albertas Agejevas2013-02-221-6/+9
|
* Switch to zope.untrustedpython, make it an extra.Albertas Agejevas2013-02-222-3/+12
|
* Added crude way of normalizing whitespace in an html test.Maurits van Rees2013-01-181-0/+3
| | | | When using Chameleon/z3c.ptcompat there are minor differences that are irrelevant.
* PageTemplateTracebackSupplement does not pass check_macro_expansion=FalseMaurits van Rees2013-01-041-1/+5
| | | | | in case of an old template that does not accept this argument. Refs LP#732972
* Workaround for CPU-burning pt_errors() on a recursive template.Marius Gedminas2012-12-124-6/+42
| | | | | | | | | | | | | | See https://bugs.launchpad.net/zope.pagetemplate/+bug/732972 This implements the short workaround version of the solution mentioned in the bug: let's skip macro expansion checking while we're formatting an error traceback (with the default recursion limit of 100 this still burns a lot of CPU: ~20 seconds on a 2.5 GHz Core i5). The test can be easily extended for the better suggested solution (some time in the future): just drop check_macro_expansion=False and make sure METAL silently stops recursing iff it notices a loop and TAL evaluation is disabled.
* Drop support for Python 2.4 and 2.5.Tres Seaver2012-05-172-11/+10
| | | | | | | | | Replace 'zope.interface.classProvides' usage with equivalent 'zope.interface.provider' decorator. Replace 'zope.interface.implements' usage with equivalent 'zope.interface.implementer' decorator.
* Revert last change as it is not needed after all.Maurits van Rees2012-01-061-3/+0
| | | | This is an error in test setup of a different package that creates a too simply dummy site manager context.
* If no IPageTemplateEngine utility can be found, make doubly sure toMaurits van Rees2012-01-051-0/+3
| | | | use the default PageTemplateEngine.
* The ``pt_edit`` method always cooks the template before returning; no need ↵Malthe Borch2011-10-071-1/+1
| | | | to do it twice. This behavior has now been documented in the interface method description of ``pt_edit``.
* Fixed test assertions to be compatible with zope.tal 3.6.Hanno Schlichting2011-09-211-4/+2
|
* Fixed issue where a template would not have a ``_v_macros`` attribute.Malthe Borch2011-09-133-16/+20
| | | | | | | | | | This volatile attribute is relied upon by some legacy code such as the Zope 2 product ``PageTemplates``. In this changeset, the interface is changed to match that of the TAL parser's ``getCode`` method which returns a tuple ``(program, macros)``. These are in turn assigned to the volatile attributes ``_v_program`` and ``_v_macros``.
* Fixed issue with missing default value for ``strictinsert``.Malthe Borch2011-08-232-2/+3
|
* Replaced StringIO stream class with a faster list-based implementation.Hanno Schlichting2011-08-201-2/+14
|
* Abstract out the template engine and program interfaces and allow ↵Malthe Borch2011-08-143-26/+169
| | | | implementation replacement via a utility component registration.
* Removed ancient copyright from test files (LP: #607228)Gediminas Paulauskas2011-06-085-72/+0
|
* make the PTRuntimeError exception message consistent across Python versionsFred Drake2010-07-082-3/+18
|
* Remove CVS-era Id fossils.Tres Seaver2010-06-0314-28/+0
|
* Conform to repository policy.Tres Seaver2010-05-0514-14/+14
|
* Removed use of 'zope.testing.doctestunit' in favor of stdlib's doctest.Tres Seaver2010-04-161-1/+1
|
* fix dependencies (thanks to z3c.dependencychecker)Godefroid Chapelle2009-12-181-5/+5
|
* Moved 'engine' module and here from ``zope.app.pagetemplate`` package.Tres Seaver2009-05-254-0/+616
| | | | o Moved / cleaned up related test scaffolding too.
* Remove old zpkg-related DEPENDENCIES.cfg file.Dan Korostelev2009-03-161-3/+0
| | | | | Change package's mailing list address to zope-dev at zope.org. Change `cheeseshop` to `pypi` in the packages' homepage url.
* As 'setuptools' is a dependency 'pkg_resources' will be available always. ↵Baiju Muthukadan2009-03-111-8/+1
| | | | Ref: http://mail.zope.org/pipermail/zope-dev/2009-March/035277.html
* Make tests work with recent changes to the TAL interpreter (zope.tal 3.5.0) ↵Philipp von Weitershausen2008-06-071-6/+6
| | | | | | regarding trailing newline characters.
* Fix up REST a little bit.Stephan Richter2007-10-031-5/+0
|
* removed pt_warnings() since the pt_warnings() implementation has been removedAndreas Jung2007-08-041-7/+0
| | | | (appearently being a cruft) without removing the method from the interface
* Moving code to satellite.Christian Theune2007-05-0347-0/+2031
|