- 21 Jun, 2001 15 commits
-
-
Shane Hathaway authored
pDocumentTemplate compatibility is not vital, this solution works well enough.
-
Shane Hathaway authored
change is intended to solve it once and for all: there's now a "safe_callable" function, implemented both in cDocumentTemplate and pDocumentTemplate, that can more reliably check for callability. A surprising side effect is that DTML is about 15% faster with this change (according to a rudimentary test).
-
Shane Hathaway authored
-
Shane Hathaway authored
slower than the old code. With this change, we're using simple function calls again to perform security checks. But the calling sequence is intended to be easier to comprehend than the old code. Now instead of DT_String.String subclasses having a validate() method attached to them, they subclass AccessControl.DTML.RestrictedDTML, which provides a guarded_getattr() method and a guarded_getitem() method. Note that the functionality of guarded_getattr() used to be implemented both in C and Python (in cDocumentTemplate and DT_Util), but now it's in one place, ZopeGuards.py. Thus it's not only reusable but easy to optimize. I ran all the tests and ran the new code through the profiler again. The change sped up restricted code a little more than expected, which is definitely a good thing, but that may indicate that nested scopes have a hidden speed penalty. Also, RestrictedPython is now restrictive about printing to targets and two forms of augmented assignment had to be forbidden.
-
Shane Hathaway authored
-
Shane Hathaway authored
-
Shane Hathaway authored
This is much faster (according to profiler results) than letting validate() check for simple types. - Corrected handling of slice objects passed to guarded_getitem(). - Used guarded_getitem() instead of a read guard in guarded_map().
-
Shane Hathaway authored
DT_String.String that adds Zope security.
-
Shane Hathaway authored
-
Evan Simpson authored
-
Evan Simpson authored
-
Evan Simpson authored
-
Evan Simpson authored
-
- 20 Jun, 2001 1 commit
-
-
matt@zope.com authored
instead of any other error that may be raised.
-
- 19 Jun, 2001 11 commits
-
-
Andreas Jung authored
-
Andreas Jung authored
-
Andreas Jung authored
-
Andreas Jung authored
to my private branch
-
Andreas Jung authored
-
Andreas Jung authored
-
Andreas Jung authored
-
Andreas Jung authored
-
Chris McDonough authored
The doc_header method makes a copy of the paragraph it's working on and returns it in the case that what follows it is an example. When doing so, the attributes attached to the paragraph were lost. Changes made to the doc_header method copy the attributes assigned to the paragraph as well as the body, making the copy carry along paragraph attributes.
-
Chris McDonough authored
-
Chris McDonough authored
The indention function returned a bogus number of spaces in front of the string it was passed, causing subparagraphs of a paragraph that were indented by less than two spaces to appear at the same indent level as their parent paragraph. This is now fixed, and paragraphs may be indented by a single space, just as they are in StructuredTextClassic.
-
- 18 Jun, 2001 13 commits
-
-
Chris McDonough authored
-
Chris McDonough authored
-
Chris McDonough authored
Now, when products are installed, they are installed in alphabetical order by product name, regardless of which Products directory (e.g. INSTANCE_HOME or SOFTWARE_HOME) that they're in EXCEPT FOR PluginIndexes, which are always first, due to the requirement that they register interfaces with the product context machinery before ZCatalog is initialized.
-
Chris McDonough authored
-
Barry Warsaw authored
-
Barry Warsaw authored
ConflictResolvingTransUndoStorage to ensure that the Full storage passes the application level conflict resolution tests. It does!
-
Barry Warsaw authored
ConflictResolution helper module. Specifically, class Full: add ConflictResolvingStorage to the base classes, so we magically grow self.tryToResolveConflict(). store(): Keep a flag indicating whether we calculated the object's pickle data via conflict resolution. If so, we return the special marker ResolvedSerial instead of the next available serial number. Also, in the serial <> oserial clause, try to resolve the conflict using ConflictResolvingStorage.tryToResolveConflict() and raise a ConflictError only if that fails (i.e. returns a false value). Otherwise, the resolution succeeded providing us with the data pickle to use as the stored object's state. transactionalUndo(): We need to keep an additional list of actions to perform on a successful undo. The first list keeps track of existing revisions to point the new transaction at, but conflict resolution provides us with a brand new pickle (or at least, a pickle for which we've no idea what the lrevid pointer should be). For those situations we need to do a CommitLog.write_object() instead of a CommitLog.write_object_undo() so as to get the new pickle into the commit log. Thus, newstates is a list keeping track of conflict resolved object states, while (the existing) newrevs keeps track of undo records where we already have the pickle in the database. Also, in the clause where we raise an UndoError, first tryToResolveConflict() and only if that fails do we raise the UndoError. Should it succeed, we append the record to newstates for later. Finally, in the clause were we're replaying the changes into the commit log (because we now know that all undos will succeed), we first replay the newrevs entries, then we replay the newstates entries, making sure we return all the affected oids. Note: these changes impose no regressions and pass all tests in ConflictResolvingStorage and ConflictResolvingTransUndoStorage.
-
Chris McDonough authored
This is a module used for backwards-compatibility aliasing. It potentially makes PythonMethods work with the current trunk, as well as solving some community issues with the import of the Eval class.
-
Chris McDonough authored
define "test" name, used by external code for import. This potentially makes existing revisions of PythonMethods work ok with the current trunk.
-
Chris McDonough authored
Import the html_quote function from the html_quote module so that modules that depend on the html_quote function being importable from this one don't fail.
-
Chris McDonough authored
-
Chris McDonough authored
New module that has an html_quote function that is imported into both DT_Var and DT_Utils to support older code that depends on the function to be in either place.
-
Andreas Jung authored
-