[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/ZReST/ZReST.py disallowing .. include directive
Log message for revision 39011: disallowing .. include directive Changed: U Zope/trunk/lib/python/Products/ZReST/ZReST.py -=- Modified: Zope/trunk/lib/python/Products/ZReST/ZReST.py === --- Zope/trunk/lib/python/Products/ZReST/ZReST.py 2005-10-09 14:16:25 UTC (rev 39010) +++ Zope/trunk/lib/python/Products/ZReST/ZReST.py 2005-10-09 14:30:31 UTC (rev 39011) @@ -192,6 +192,9 @@ # set the reporting level to something sane pub.settings.report_level = int(self.report_level) +# Disallow inclusion of files for security reasons +pub.settings.file_insertion_enabled = 0 + # don't break if we get errors pub.settings.halt_level = 6 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/reStructuredText/__init__.py disallowing .. include directive
Log message for revision 39012: disallowing .. include directive Changed: U Zope/trunk/lib/python/reStructuredText/__init__.py -=- Modified: Zope/trunk/lib/python/reStructuredText/__init__.py === --- Zope/trunk/lib/python/reStructuredText/__init__.py 2005-10-09 14:30:31 UTC (rev 39011) +++ Zope/trunk/lib/python/reStructuredText/__init__.py 2005-10-09 14:31:06 UTC (rev 39012) @@ -71,6 +71,7 @@ settings['input_encoding'] = input_encoding settings['output_encoding'] = output_encoding settings['stylesheet'] = stylesheet +settings['file_insertion_enabled'] = 0 if language_code: settings['language_code'] = language_code settings['language_code'] = language_code ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] CVS: Zope/lib/python/docutils/writers - __init__.py:1.2.10.8 docutils_xml.py:1.2.10.8 html4css1.py:1.2.10.8 latex2e.py:1.1.2.8 pep_html.py:1.2.10.7 pseudoxml.py:1.2.10.7
Update of /cvs-repository/Zope/lib/python/docutils/writers In directory cvs.zope.org:/tmp/cvs-serv26422/writers Modified Files: Tag: Zope-2_7-branch __init__.py docutils_xml.py html4css1.py latex2e.py pep_html.py pseudoxml.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/writers/__init__.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/writers/docutils_xml.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/writers/html4css1.py 1.2.10.7 = 1.2.10.8 === --- Zope/lib/python/docutils/writers/html4css1.py:1.2.10.7 Fri Jan 7 08:26:06 2005 +++ Zope/lib/python/docutils/writers/html4css1.py Sun Oct 9 10:43:46 2005 @@ -63,6 +63,20 @@ ['--initial-header-level'], {'choices': '1 2 3 4 5 6'.split(), 'default': '1', 'metavar': 'level'}), + ('Specify the maximum width (in characters) for one-column field ' + 'names. Longer field names will span an entire row of the table ' + 'used to render the field list. Default is 14 characters. ' + 'Use 0 for no limit.', + ['--field-name-limit'], + {'default': 14, 'metavar': 'level', + 'validator': frontend.validate_nonnegative_int}), + ('Specify the maximum width (in characters) for options in option ' + 'lists. Longer options will span an entire row of the table used ' + 'to render the option list. Default is 14 characters. ' + 'Use 0 for no limit.', + ['--option-limit'], + {'default': 14, 'metavar': 'level', + 'validator': frontend.validate_nonnegative_int}), ('Format for footnote references: one of superscript or ' 'brackets. Default is brackets.', ['--footnote-references'], @@ -87,7 +101,12 @@ ('Omit the XML declaration. Use with caution.', ['--no-xml-declaration'], {'dest': 'xml_declaration', 'default': 1, 'action': 'store_false', - 'validator': frontend.validate_boolean}),)) + 'validator': frontend.validate_boolean}), + ('Scramble email addresses to confuse harvesters. ' + 'For example, [EMAIL PROTECTED] will become ' + '``a href=mailto:%61%62%63%40...;abc at example dot org/a``.', + ['--cloak-email-addresses'], + {'action': 'store_true', 'validator': frontend.validate_boolean}),)) relative_path_settings = ('stylesheet_path',) @@ -99,10 +118,9 @@ self.translator_class = HTMLTranslator def translate(self): -visitor = self.translator_class(self.document) +self.visitor = visitor = self.translator_class(self.document) self.document.walkabout(visitor) self.output = visitor.astext() -self.visitor = visitor for attr in ('head_prefix', 'stylesheet', 'head', 'body_prefix', 'body_pre_docinfo', 'docinfo', 'body', 'fragment', 'body_suffix'): @@ -111,7 +129,9 @@ def assemble_parts(self): writers.Writer.assemble_parts(self) for part in ('title', 'subtitle', 'docinfo', 'body', 'header', - 'footer', 'meta', 'stylesheet', 'fragment'): + 'footer', 'meta', 'stylesheet', 'fragment', + 'html_prolog', 'html_head', 'html_title', 'html_subtitle', + 'html_body'): self.parts[part] = ''.join(getattr(self.visitor, part)) @@ -163,16 +183,15 @@ ' PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN' ' http://www.w3.org/TR/xhtml1/DTD/' 'xhtml1-transitional.dtd\n') -html_head = ('html xmlns=http://www.w3.org/1999/xhtml; xml:lang=%s ' - 'lang=%s\nhead\n') -content_type = ('meta http-equiv=Content-Type content=text/html; ' -'charset=%s /\n') +head_prefix_template = ('html xmlns=http://www.w3.org/1999/xhtml;' +' xml:lang=%s lang=%s\nhead\n') +content_type = ('meta http-equiv=Content-Type' +' content=text/html; charset=%s /\n') generator = ('meta name=generator content=Docutils %s: ' 'http://docutils.sourceforge.net/; /\n') stylesheet_link = 'link rel=stylesheet href=%s type=text/css /\n' embedded_stylesheet = 'style type=text/css\n\n%s\n/style\n' -named_tags = {'a': 1, 'applet': 1, 'form': 1, 'frame': 1, 'iframe': 1, - 'img': 1, 'map': 1} +named_tags = ['a', 'applet', 'form', 'frame', 'iframe', 'img', 'map'] words_and_spaces = re.compile(r'\S+| +|\n') def __init__(self, document): @@ -182,14 +201,17 @@ self.language = languages.get_language(lcode) self.meta = [self.content_type % settings.output_encoding, self.generator % docutils.__version__] -self.head_prefix = [ - self.doctype, - self.html_head % (lcode, lcode)] -
[Zope-Checkins] CVS: Zope/lib/python/docutils - __init__.py:1.2.10.10 core.py:1.2.10.8 examples.py:1.1.4.4 frontend.py:1.2.10.9 io.py:1.2.10.8 nodes.py:1.2.10.8 statemachine.py:1.2.10.8 utils.py:1.2.10.8
Update of /cvs-repository/Zope/lib/python/docutils In directory cvs.zope.org:/tmp/cvs-serv26422 Modified Files: Tag: Zope-2_7-branch __init__.py core.py examples.py frontend.py io.py nodes.py statemachine.py utils.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/__init__.py 1.2.10.9 = 1.2.10.10 === --- Zope/lib/python/docutils/__init__.py:1.2.10.9 Fri Jan 7 08:26:01 2005 +++ Zope/lib/python/docutils/__init__.pySun Oct 9 10:43:43 2005 @@ -51,7 +51,7 @@ __docformat__ = 'reStructuredText' -__version__ = '0.3.7' +__version__ = '0.3.9' ``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major === Zope/lib/python/docutils/core.py 1.2.10.7 = 1.2.10.8 === --- Zope/lib/python/docutils/core.py:1.2.10.7 Fri Jan 7 08:26:01 2005 +++ Zope/lib/python/docutils/core.pySun Oct 9 10:43:43 2005 @@ -197,6 +197,7 @@ self.writer.assemble_parts() except Exception, error: if self.settings.traceback: # propagate exceptions? +self.debugging_dumps(document) raise self.report_Exception(error) exit = 1 @@ -210,6 +211,8 @@ return output def debugging_dumps(self, document): +if not document: +return if self.settings.dump_settings: print sys.stderr, '\n::: Runtime settings:' print sys.stderr, pprint.pformat(self.settings.__dict__) === Zope/lib/python/docutils/examples.py 1.1.4.3 = 1.1.4.4 === --- Zope/lib/python/docutils/examples.py:1.1.4.3Fri Jan 7 08:26:02 2005 +++ Zope/lib/python/docutils/examples.pySun Oct 9 10:43:43 2005 @@ -7,12 +7,13 @@ This module contains practical examples of Docutils client code. -Importing this module is not recommended; its contents are subject to change -in future Docutils releases. Instead, it is recommended that you copy and -paste the parts you need into your own code, modifying as necessary. +Importing this module from client code is not recommended; its contents are +subject to change in future Docutils releases. Instead, it is recommended +that you copy and paste the parts you need into your own code, modifying as +necessary. -from docutils import core +from docutils import core, io def html_parts(input_string, source_path=None, destination_path=None, @@ -72,3 +73,23 @@ if output_encoding != 'unicode': fragment = fragment.encode(output_encoding) return fragment + +def internals(input_string, source_path=None, destination_path=None, + input_encoding='unicode'): + +Return the document tree and publisher, for exploring Docutils internals. + +Parameters: see `html_parts()`. + +overrides = {'input_encoding': input_encoding} +output, pub = core.publish_programmatically( +source_class=io.StringInput, source=input_string, +source_path=source_path, +destination_class=io.NullOutput, destination=None, +destination_path=destination_path, +reader=None, reader_name='standalone', +parser=None, parser_name='restructuredtext', +writer=None, writer_name='null', +settings=None, settings_spec=None, settings_overrides=overrides, +config_section=None, enable_exit_status=None) +return pub.writer.document, pub === Zope/lib/python/docutils/frontend.py 1.2.10.8 = 1.2.10.9 === --- Zope/lib/python/docutils/frontend.py:1.2.10.8 Fri Jan 7 08:26:02 2005 +++ Zope/lib/python/docutils/frontend.pySun Oct 9 10:43:43 2005 @@ -124,6 +124,13 @@ None, sys.exc_info()[2]) return value +def validate_nonnegative_int(setting, value, option_parser, + config_parser=None, config_section=None): +value = int(value) +if value 0: +raise ValueError('negative value; must be positive or zero') +return value + def validate_threshold(setting, value, option_parser, config_parser=None, config_section=None): try: @@ -333,10 +340,10 @@ 'validator': validate_threshold}), ('Report all system messages, info-level and higher. (Same as ' '--report=info.)', - ['--verbose', '-v'], {'action': 'store_const', 'const': 'info', + ['--verbose', '-v'], {'action': 'store_const', 'const': 1, 'dest': 'report_level'}), ('Do not report any system messages. (Same as --report=none.)', - ['--quiet', '-q'], {'action': 'store_const', 'const': 'none', + ['--quiet', '-q'], {'action': 'store_const', 'const': 5, 'dest': 'report_level'}), ('Set the threshold (level) at or above which system messages are '
[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers - __init__.py:1.2.10.7
Update of /cvs-repository/Zope/lib/python/docutils/parsers In directory cvs.zope.org:/tmp/cvs-serv26422/parsers Modified Files: Tag: Zope-2_7-branch __init__.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/parsers/__init__.py 1.2.10.6 = 1.2.10.7 === ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] CVS: Zope/lib/python/docutils/languages - __init__.py:1.2.10.8 af.py:1.1.2.8 cs.py:1.1.4.5 de.py:1.2.10.8 en.py:1.2.10.8 eo.py:1.1.2.6 es.py:1.1.2.8 fi.py:1.1.2.2 fr.py:1.2.10.8 it.py:1.2.10.8 pt_br.py:1.1.4.5 ru.py:1.1.2.8 sk.py:1.2.10.8 sv.py:1.2.10.8 zh_tw.py:1.1.2.2
Update of /cvs-repository/Zope/lib/python/docutils/languages In directory cvs.zope.org:/tmp/cvs-serv26422/languages Modified Files: Tag: Zope-2_7-branch __init__.py af.py cs.py de.py en.py eo.py es.py fi.py fr.py it.py pt_br.py ru.py sk.py sv.py zh_tw.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/languages/__init__.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/languages/af.py 1.1.2.7 = 1.1.2.8 === === Zope/lib/python/docutils/languages/cs.py 1.1.4.4 = 1.1.4.5 === === Zope/lib/python/docutils/languages/de.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/languages/en.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/languages/eo.py 1.1.2.5 = 1.1.2.6 === === Zope/lib/python/docutils/languages/es.py 1.1.2.7 = 1.1.2.8 === === Zope/lib/python/docutils/languages/fi.py 1.1.2.1 = 1.1.2.2 === === Zope/lib/python/docutils/languages/fr.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/languages/it.py 1.2.10.7 = 1.2.10.8 === --- Zope/lib/python/docutils/languages/it.py:1.2.10.7 Fri Jan 7 08:26:02 2005 +++ Zope/lib/python/docutils/languages/it.pySun Oct 9 10:43:44 2005 @@ -45,7 +45,7 @@ 'autori': 'authors', 'organizzazione': 'organization', 'indirizzo': 'address', - 'contatti': 'contact', + 'contatto': 'contact', 'versione': 'version', 'revisione': 'revision', 'status': 'status', === Zope/lib/python/docutils/languages/pt_br.py 1.1.4.4 = 1.1.4.5 === === Zope/lib/python/docutils/languages/ru.py 1.1.2.7 = 1.1.2.8 === --- Zope/lib/python/docutils/languages/ru.py:1.1.2.7Fri Jan 7 08:26:02 2005 +++ Zope/lib/python/docutils/languages/ru.pySun Oct 9 10:43:44 2005 @@ -46,21 +46,21 @@ Mapping of node class name to label text. bibliographic_fields = { - u'\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f': u'abstract', - u'\u0410\u0434\u0440\u0435\u0441': u'address', - u'\u0410\u0432\u0442\u043e\u0440': u'author', - u'\u0410\u0432\u0442\u043e\u0440\u044b': u'authors', - u'\u041a\u043e\u043d\u0442\u0430\u043a\u0442': u'contact', - u'\u041f\u0440\u0430\u0432\u0430 \u043a\u043e\u043f\u0438\u0440\u043e' + u'\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f': u'abstract', + u'\u0430\u0434\u0440\u0435\u0441': u'address', + u'\u0430\u0432\u0442\u043e\u0440': u'author', + u'\u0430\u0432\u0442\u043e\u0440\u044b': u'authors', + u'\u043a\u043e\u043d\u0442\u0430\u043a\u0442': u'contact', + u'\u043f\u0440\u0430\u0432\u0430 \u043a\u043e\u043f\u0438\u0440\u043e' u'\u0432\u0430\u043d\u0438\u044f': u'copyright', - u'\u0414\u0430\u0442\u0430': u'date', - u'\u041f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u0435': + u'\u0434\u0430\u0442\u0430': u'date', + u'\u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u0435': u'dedication', - u'\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f': + u'\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f': u'organization', - u'\u0420\u0435\u0434\u0430\u043a\u0446\u0438\u044f': u'revision', - u'\u0421\u0442\u0430\u0442\u0443\u0441': u'status', - u'\u0412\u0435\u0440\u0441\u0438\u044f': u'version'} + u'\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f': u'revision', + u'\u0441\u0442\u0430\u0442\u0443\u0441': u'status', + u'\u0432\u0435\u0440\u0441\u0438\u044f': u'version'} Russian (lowcased) to canonical name mapping for bibliographic fields. author_separators = [';', ','] === Zope/lib/python/docutils/languages/sk.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/languages/sv.py 1.2.10.7 = 1.2.10.8 === === Zope/lib/python/docutils/languages/zh_tw.py 1.1.2.1 = 1.1.2.2 === ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst - __init__.py:1.2.10.8 roles.py:1.1.4.5 states.py:1.2.10.8 tableparser.py:1.2.10.7
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst In directory cvs.zope.org:/tmp/cvs-serv26422/parsers/rst Modified Files: Tag: Zope-2_7-branch __init__.py roles.py states.py tableparser.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/parsers/rst/__init__.py 1.2.10.7 = 1.2.10.8 === --- Zope/lib/python/docutils/parsers/rst/__init__.py:1.2.10.7 Fri Jan 7 08:26:03 2005 +++ Zope/lib/python/docutils/parsers/rst/__init__.pySun Oct 9 10:43:45 2005 @@ -112,7 +112,23 @@ ('Leave spaces before footnote references.', ['--leave-footnote-reference-space'], {'action': 'store_false', 'dest': 'trim_footnote_reference_space', - 'validator': frontend.validate_boolean}),)) + 'validator': frontend.validate_boolean}), + ('Disable directives that insert the contents of external file ' + '(include raw); replaced with a warning system message.', + ['--no-file-insertion'], + {'action': 'store_false', 'default': 1, + 'dest': 'file_insertion_enabled'}), + ('Enable directives that insert the contents of external file ' + '(include raw). Enabled by default.', + ['--file-insertion-enabled'], + {'action': 'store_true', 'dest': 'file_insertion_enabled'}), + ('Disable the raw directives; replaced with a warning ' + 'system message.', + ['--no-raw'], + {'action': 'store_false', 'default': 1, 'dest': 'raw_enabled'}), + ('Enable the raw directive. Enabled by default.', + ['--raw-enabled'], + {'action': 'store_true', 'dest': 'raw_enabled'}),)) config_section = 'restructuredtext parser' config_section_dependencies = ('parsers',) @@ -128,11 +144,10 @@ def parse(self, inputstring, document): Parse `inputstring` and populate `document`, a document tree. self.setup_parse(inputstring, document) -debug = document.reporter[''].debug self.statemachine = states.RSTStateMachine( state_classes=self.state_classes, initial_state=self.initial_state, - debug=debug) + debug=document.reporter.debug_flag) inputlines = docutils.statemachine.string2lines( inputstring, tab_width=document.settings.tab_width, convert_whitespace=1) === Zope/lib/python/docutils/parsers/rst/roles.py 1.1.4.4 = 1.1.4.5 === --- Zope/lib/python/docutils/parsers/rst/roles.py:1.1.4.4 Fri Jan 7 08:26:03 2005 +++ Zope/lib/python/docutils/parsers/rst/roles.py Sun Oct 9 10:43:45 2005 @@ -174,7 +174,7 @@ if not hasattr(role_fn, 'options') or role_fn.options is None: role_fn.options = {'class': directives.class_option} elif not role_fn.options.has_key('class'): -role_fn.options['class'] = directives.class_option +role_fn.options['class'] = directives.class_option def register_generic_role(canonical_name, node_class): For roles which simply wrap a given `node_class` around the text. @@ -195,6 +195,7 @@ def __call__(self, role, rawtext, text, lineno, inliner, options={}, content=[]): +set_classes(options) return [self.node_class(rawtext, utils.unescape(text), **options)], [] @@ -233,6 +234,7 @@ # Once nested inline markup is implemented, this and other methods should # recursively call inliner.nested_parse(). +set_classes(options) return [nodes.inline(rawtext, utils.unescape(text), **options)], [] generic_custom_role.options = {'class': directives.class_option} @@ -265,6 +267,7 @@ return [prb], [msg] # Base URL mainly used by inliner.pep_reference; so this is correct: ref = inliner.document.settings.pep_base_url + inliner.pep_url % pepnum +set_classes(options) return [nodes.reference(rawtext, 'PEP ' + utils.unescape(text), refuri=ref, **options)], [] @@ -284,6 +287,7 @@ return [prb], [msg] # Base URL mainly used by inliner.rfc_reference, so this is correct: ref = inliner.document.settings.rfc_base_url + inliner.rfc_url % rfcnum +set_classes(options) node = nodes.reference(rawtext, 'RFC ' + utils.unescape(text), refuri=ref, **options) return [node], [] @@ -299,10 +303,11 @@ 'an associated format.' % role, line=lineno) prb = inliner.problematic(rawtext, rawtext, msg) return [prb], [msg] +set_classes(options) node = nodes.raw(rawtext, utils.unescape(text, 1), **options) return [node], [] -raw_role.options = {'format': directives.class_option} +raw_role.options = {'format': directives.unchanged} register_canonical_role('raw', raw_role) @@ -329,3 +334,14 @@ # This should remain unimplemented, for testing purposes: register_canonical_role('restructuredtext-unimplemented-role',
[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst/directives - __init__.py:1.2.10.9 admonitions.py:1.2.10.7 body.py:1.2.10.8 html.py:1.2.10.7 images.py:1.2.10.8 misc.py:1.2.10.8 parts.py:1.2.10.7 references.py:1.2.10.7 tables.py:1.1.2.4
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst/directives In directory cvs.zope.org:/tmp/cvs-serv26422/parsers/rst/directives Modified Files: Tag: Zope-2_7-branch __init__.py admonitions.py body.py html.py images.py misc.py parts.py references.py tables.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/parsers/rst/directives/__init__.py 1.2.10.8 = 1.2.10.9 === --- Zope/lib/python/docutils/parsers/rst/directives/__init__.py:1.2.10.8 Fri Jan 7 08:26:04 2005 +++ Zope/lib/python/docutils/parsers/rst/directives/__init__.py Sun Oct 9 10:43:45 2005 @@ -113,10 +113,13 @@ #'questions': ('body', 'question_list'), 'table': ('tables', 'table'), 'csv-table': ('tables', 'csv_table'), + 'list-table': ('tables', 'list_table'), 'image': ('images', 'image'), 'figure': ('images', 'figure'), 'contents': ('parts', 'contents'), 'sectnum': ('parts', 'sectnum'), + 'header': ('parts', 'header'), + 'footer': ('parts', 'footer'), #'footnotes': ('parts', 'footnotes'), #'citations': ('parts', 'citations'), 'target-notes': ('references', 'target_notes'), @@ -250,17 +253,26 @@ Return the path argument unwrapped (with newlines removed). (Directive option conversion function.) -Raise ``ValueError`` if no argument is found or if the path contains -internal whitespace. +Raise ``ValueError`` if no argument is found. if argument is None: raise ValueError('argument required but none supplied') else: path = ''.join([s.strip() for s in argument.splitlines()]) -if path.find(' ') == -1: -return path -else: -raise ValueError('path contains whitespace') +return path + +def uri(argument): + +Return the URI argument with whitespace removed. +(Directive option conversion function.) + +Raise ``ValueError`` if no argument is found. + +if argument is None: +raise ValueError('argument required but none supplied') +else: +uri = ''.join(argument.split()) +return uri def nonnegative_int(argument): @@ -274,7 +286,7 @@ def class_option(argument): -Convert the argument into an ID-compatible string and return it. +Convert the argument into a list of ID-compatible strings and return it. (Directive option conversion function.) Raise ``ValueError`` if no argument is found. @@ -288,7 +300,7 @@ if not class_name: raise ValueError('cannot make %s into a class name' % name) class_names.append(class_name) -return ' '.join(class_names) +return class_names unicode_pattern = re.compile( r'(?:0x|x|\\x|U\+?|\\u)([0-9a-f]+)$|#x([0-9a-f]+);$', re.IGNORECASE) @@ -296,10 +308,13 @@ def unicode_code(code): r Convert a Unicode character code to a Unicode character. +(Directive option conversion function.) Codes may be decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``, ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character entities (e.g. ``#x262E;``). Other text remains as-is. + +Raise ValueError for illegal Unicode code values. try: if code.isdigit(): # decimal number @@ -315,6 +330,10 @@ raise ValueError('code too large (%s)' % detail) def single_char_or_unicode(argument): + +A single character is returned as-is. Unicode characters codes are +converted as in `unicode_code`. (Directive option conversion function.) + char = unicode_code(argument) if len(char) 1: raise ValueError('%r invalid; must be a single character or ' @@ -322,6 +341,10 @@ return char def single_char_or_whitespace_or_unicode(argument): + +As with `single_char_or_unicode`, but tab and space are also supported. +(Directive option conversion function.) + if argument == 'tab': char = '\t' elif argument == 'space': @@ -331,12 +354,23 @@ return char def positive_int(argument): + +Converts the argument into an integer. Raises ValueError for negative, +zero, or non-integer values. (Directive option conversion function.) + value = int(argument) if value 1: raise ValueError('negative or zero value; must be positive') return value def positive_int_list(argument): + +Converts a space- or comma-separated list of values into a Python list +of integers. +(Directive option conversion function.) + +Raises ValueError for non-positive-integer values. + if ',' in argument: entries = argument.split(',') else: @@ -344,6 +378,12 @@ return [positive_int(entry) for entry in entries] def encoding(argument): + +Verfies the encoding argument by lookup. +(Directive option conversion function.) + +Raises ValueError for
[Zope-Checkins] CVS: Zope/lib/python/docutils/readers - __init__.py:1.2.10.7 pep.py:1.2.10.8 standalone.py:1.2.10.7
Update of /cvs-repository/Zope/lib/python/docutils/readers In directory cvs.zope.org:/tmp/cvs-serv26422/readers Modified Files: Tag: Zope-2_7-branch __init__.py pep.py standalone.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/readers/__init__.py 1.2.10.6 = 1.2.10.7 === === Zope/lib/python/docutils/readers/pep.py 1.2.10.7 = 1.2.10.8 === --- Zope/lib/python/docutils/readers/pep.py:1.2.10.7Fri Jan 7 08:26:05 2005 +++ Zope/lib/python/docutils/readers/pep.py Sun Oct 9 10:43:46 2005 @@ -31,9 +31,9 @@ config_section_dependencies = ('readers', 'standalone reader') default_transforms = (references.Substitutions, + references.PropagateTargets, peps.Headers, peps.Contents, - references.ChainedTargets, references.AnonymousHyperlinks, references.IndirectHyperlinks, peps.TargetNotes, === Zope/lib/python/docutils/readers/standalone.py 1.2.10.6 = 1.2.10.7 === --- Zope/lib/python/docutils/readers/standalone.py:1.2.10.6 Fri Jan 7 08:26:05 2005 +++ Zope/lib/python/docutils/readers/standalone.py Sun Oct 9 10:43:46 2005 @@ -37,15 +37,26 @@ 'default).', ['--no-doc-info'], {'dest': 'docinfo_xform', 'action': 'store_false', 'default': 1, - 'validator': frontend.validate_boolean}),)) + 'validator': frontend.validate_boolean}), + ('Activate the promotion of lone subsection titles to ' + 'section subtitles (disabled by default).', + ['--section-subtitles'], + {'dest': 'sectsubtitle_xform', 'action': 'store_true', 'default': 0, + 'validator': frontend.validate_boolean}), + ('Deactivate the promotion of lone subsection titles.', + ['--no-section-subtitles'], + {'dest': 'sectsubtitle_xform', 'action': 'store_false', + 'validator': frontend.validate_boolean}), + )) config_section = 'standalone reader' config_section_dependencies = ('readers',) default_transforms = (references.Substitutions, + references.PropagateTargets, frontmatter.DocTitle, + frontmatter.SectionSubTitle, frontmatter.DocInfo, - references.ChainedTargets, references.AnonymousHyperlinks, references.IndirectHyperlinks, references.Footnotes, ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] CVS: Zope/lib/python/docutils/transforms - __init__.py:1.2.10.7 components.py:1.2.10.7 frontmatter.py:1.2.10.7 misc.py:1.2.10.7 parts.py:1.2.10.7 peps.py:1.2.10.8 references.py:1.2.10.7 universal.py:1.2.10.7
Update of /cvs-repository/Zope/lib/python/docutils/transforms In directory cvs.zope.org:/tmp/cvs-serv26422/transforms Modified Files: Tag: Zope-2_7-branch __init__.py components.py frontmatter.py misc.py parts.py peps.py references.py universal.py Log Message: upgrade to docutils 0.3.9 === Zope/lib/python/docutils/transforms/__init__.py 1.2.10.6 = 1.2.10.7 === --- Zope/lib/python/docutils/transforms/__init__.py:1.2.10.6Fri Jan 7 08:26:05 2005 +++ Zope/lib/python/docutils/transforms/__init__.py Sun Oct 9 10:43:46 2005 @@ -59,7 +59,7 @@ self.language = languages.get_language( document.settings.language_code) Language module local to this document. - + def apply(self): Override to apply the transform to the document tree. @@ -163,7 +163,6 @@ decorated_list = [(f.priority, f) for f in unknown_reference_resolvers] decorated_list.sort() self.unknown_reference_resolvers.extend([f[1] for f in decorated_list]) - def apply_transforms(self): Apply all of the stored transforms, in priority order. === Zope/lib/python/docutils/transforms/components.py 1.2.10.6 = 1.2.10.7 === === Zope/lib/python/docutils/transforms/frontmatter.py 1.2.10.6 = 1.2.10.7 === --- Zope/lib/python/docutils/transforms/frontmatter.py:1.2.10.6 Fri Jan 7 08:26:06 2005 +++ Zope/lib/python/docutils/transforms/frontmatter.py Sun Oct 9 10:43:46 2005 @@ -5,13 +5,15 @@ # Copyright: This module has been placed in the public domain. -Transforms related to the front matter of a document (information -found before the main text): +Transforms related to the front matter of a document or a section +(information found before the main text): - `DocTitle`: Used to transform a lone top level section's title to the document title, and promote a remaining lone top-level section's title to the document subtitle. +- `SectionTitle`: Used to transform a lone subsection into a subtitle. + - `DocInfo`: Used to transform a bibliographic field list into docinfo elements. @@ -23,7 +25,100 @@ from docutils.transforms import TransformError, Transform -class DocTitle(Transform): +class TitlePromoter(Transform): + + +Abstract base class for DocTitle and SectionSubTitle transforms. + + +def promote_title(self, node): + +Transform the following tree:: + +node +section +title +... + +into :: + +node +title +... + +`node` is normally a document. + +# `node` must not have a title yet. +assert not (len(node) and isinstance(node[0], nodes.title)) +section, index = self.candidate_index(node) +if index is None: +return None +# Transfer the section's attributes to the node: +node.attributes.update(section.attributes) +# setup_child is called automatically for all nodes. +node[:] = (section[:1]# section title + + node[:index] # everything that was in the + # node before the section + + section[1:]) # everything that was in the section +assert isinstance(node[0], nodes.title) +return 1 + +def promote_subtitle(self, node): + +Transform the following node tree:: + +node +title +section +title +... + +into :: + +node +title +subtitle +... + +subsection, index = self.candidate_index(node) +if index is None: +return None +subtitle = nodes.subtitle() +# Transfer the subsection's attributes to the new subtitle: +# This causes trouble with list attributes! To do: Write a +# test case which catches direct access to the `attributes` +# dictionary and/or write a test case which shows problems in +# this particular case. +subtitle.attributes.update(subsection.attributes) +# We're losing the subtitle's attributes here! To do: Write a +# test case which shows this behavior. +# Transfer the contents of the subsection's title to the +# subtitle: +subtitle[:] = subsection[0][:] +node[:] = (node[:1] # title + + [subtitle] + # everything that was before the section: + + node[1:index] + # everything that was in the subsection: + + subsection[1:]) +return 1 + +def candidate_index(self, node): + +Find and return the promotion candidate and its index. + +Return (None, None) if no valid candidate was found. + +index =
[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst/languages - nl.py:1.1.2.1 ca.py:1.1.2.1
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst/languages In directory cvs.zope.org:/tmp/cvs-serv27461/parsers/rst/languages Added Files: Tag: Zope-2_7-branch nl.py ca.py Log Message: added === Added File Zope/lib/python/docutils/parsers/rst/languages/nl.py === # Author: Martijn Pieters # Contact: [EMAIL PROTECTED] # Revision: $Revision: 1.1.2.1 $ # Date: $Date: 2005/10/09 14:45:39 $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read http://docutils.sf.net/docs/howto/i18n.html. Two files must be # translated for each language: one in docutils/languages, the other in # docutils/parsers/rst/languages. Dutch-language mappings for language-dependent features of reStructuredText. __docformat__ = 'reStructuredText' directives = { # language-dependent: fixed 'attentie': 'attention', 'let-op': 'caution', 'gevaar': 'danger', 'fout': 'error', 'hint': 'hint', 'belangrijk': 'important', 'opmerking': 'note', 'tip': 'tip', 'waarschuwing': 'warning', 'aanmaning': 'admonition', 'katern': 'sidebar', 'onderwerp': 'topic', 'lijn-blok': 'line-block', 'letterlijk-ontleed': 'parsed-literal', 'rubriek': 'rubric', 'opschrift': 'epigraph', 'hoogtepunten': 'highlights', 'pull-quote': 'pull-quote', # Dutch printers use the english term 'samenstelling': 'compound', 'verbinding': 'compound', #'vragen': 'questions', 'tabel': 'table', 'csv-tabel': 'csv-table', 'lijst-tabel': 'list-table', #'veelgestelde-vragen': 'questions', 'meta': 'meta', #'imagemap': 'imagemap', 'beeld': 'image', 'figuur': 'figure', 'opnemen': 'include', 'onbewerkt': 'raw', 'vervang': 'replace', 'vervanging': 'replace', 'unicode': 'unicode', 'klasse': 'class', 'rol': 'role', 'inhoud': 'contents', 'sectnum': 'sectnum', 'sectie-nummering': 'sectnum', 'hoofdstuk-nummering': 'sectnum', u'header (translation required)': 'header', u'footer (translation required)': 'footer', #'voetnoten': 'footnotes', #'citaten': 'citations', 'verwijzing-voetnoten': 'target-notes', 'restructuredtext-test-instructie': 'restructuredtext-test-directive'} Dutch name to registered (in directives/__init__.py) directive name mapping. roles = { # language-dependent: fixed 'afkorting': 'abbreviation', # 'ab': 'abbreviation', 'acroniem': 'acronym', 'ac': 'acronym', 'index': 'index', 'i': 'index', 'inferieur': 'subscript', 'inf': 'subscript', 'superieur': 'superscript', 'sup': 'superscript', 'titel-referentie': 'title-reference', 'titel': 'title-reference', 't': 'title-reference', 'pep-referentie': 'pep-reference', 'pep': 'pep-reference', 'rfc-referentie': 'rfc-reference', 'rfc': 'rfc-reference', 'nadruk': 'emphasis', 'extra': 'strong', 'extra-nadruk': 'strong', 'vet': 'strong', 'letterlijk': 'literal', 'benoemde-referentie': 'named-reference', 'anonieme-referentie': 'anonymous-reference', 'voetnoot-referentie': 'footnote-reference', 'citaat-referentie': 'citation-reference', 'substitie-reference': 'substitution-reference', 'verwijzing': 'target', 'uri-referentie': 'uri-reference', 'uri': 'uri-reference', 'url': 'uri-reference', 'onbewerkt': 'raw',} Mapping of Dutch role names to canonical role names for interpreted text. === Added File Zope/lib/python/docutils/parsers/rst/languages/ca.py === # Author: Ivan Vilata i Balaguer # Contact: [EMAIL PROTECTED] # Revision: $Revision: 1.1.2.1 $ # Date: $Date: 2005/10/09 14:45:39 $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read http://docutils.sf.net/docs/howto/i18n.html. Two files must be # translated for each language: one in docutils/languages, the other in # docutils/parsers/rst/languages. Catalan-language mappings for language-dependent features of reStructuredText. __docformat__ = 'reStructuredText' directives = { # language-dependent: fixed u'atenci\u00F3': 'attention', u'compte': 'caution', u'perill': 'danger', u'error': 'error', u'suggeriment': 'hint', u'important': 'important', u'nota': 'note', u'consell': 'tip', u'av\u00EDs': 'warning', u'advertiment': 'admonition', u'nota-al-marge': 'sidebar', u'nota-marge': 'sidebar', u'tema': 'topic', u'bloc-de-l\u00EDnies': 'line-block', u'bloc-l\u00EDnies': 'line-block', u'literal-analitzat': 'parsed-literal', u'r\u00FAbrica': 'rubric', u'ep\u00EDgraf': 'epigraph', u'sumari': 'highlights', u'cita-destacada': 'pull-quote',
[Zope-Checkins] CVS: Zope/lib/python/docutils/writers - null.py:1.1.2.1 newlatex2e.py:1.1.2.1
Update of /cvs-repository/Zope/lib/python/docutils/writers In directory cvs.zope.org:/tmp/cvs-serv27461/writers Added Files: Tag: Zope-2_7-branch null.py newlatex2e.py Log Message: added === Added File Zope/lib/python/docutils/writers/null.py === # Author: David Goodger # Contact: [EMAIL PROTECTED] # Revision: $Revision: 1.1.2.1 $ # Date: $Date: 2005/10/09 14:45:39 $ # Copyright: This module has been placed in the public domain. A do-nothing Writer. from docutils import writers class Writer(writers.Writer): supported = ('null',) Formats this writer supports. config_section = 'null writer' config_section_dependencies = ('writers',) def translate(self): pass === Added File Zope/lib/python/docutils/writers/newlatex2e.py === :Author: Felix Wiemann :Contact: [EMAIL PROTECTED] :Revision: $Revision: 1.1.2.1 $ :Date: $Date: 2005/10/09 14:45:39 $ :Copyright: This module has been placed in the public domain. LaTeX2e document tree Writer. # Thanks to Engelbert Gruber and various contributors for the original # LaTeX writer, some code and many ideas of which have been used for # this writer. __docformat__ = 'reStructuredText' from __future__ import nested_scopes import re import os.path from types import ListType import docutils from docutils import nodes, writers, utils class Writer(writers.Writer): supported = ('newlatex', 'newlatex2e') Formats this writer supports. settings_spec = ( 'LaTeX-Specific Options', 'The LaTeX --output-encoding default is latin-1:strict. ' 'Note that this LaTeX writer is still EXPERIMENTAL.', (('Specify a stylesheet file. The path is used verbatim to include ' 'the file. Overrides --stylesheet-path.', ['--stylesheet'], {'default': '', 'metavar': 'file', 'overrides': 'stylesheet_path'}), ('Specify a stylesheet file, relative to the current working ' 'directory. Overrides --stylesheet.', ['--stylesheet-path'], {'metavar': 'file', 'overrides': 'stylesheet'}), ('Specify a uesr stylesheet file. See --stylesheet.', ['--user-stylesheet'], {'default': '', 'metavar': 'file', 'overrides': 'user_stylesheet_path'}), ('Specify a user stylesheet file. See --stylesheet-path.', ['--user-stylesheet-path'], {'metavar': 'file', 'overrides': 'user_stylesheet'}) ),) settings_defaults = {'output_encoding': 'latin-1', 'trim_footnote_reference_space': 1, # Currently unsupported: 'docinfo_xform': 0, # During development: 'traceback': 1} relative_path_settings = ('stylesheet_path',) config_section = 'newlatex2e writer' config_section_dependencies = ('writers',) output = None Final translated form of `document`. def __init__(self): writers.Writer.__init__(self) self.translator_class = LaTeXTranslator def translate(self): visitor = self.translator_class(self.document) self.document.walkabout(visitor) assert not visitor.context, 'context not empty: %s' % visitor.context self.output = visitor.astext() self.head = visitor.header self.body = visitor.body class Babel: Language specifics for LaTeX. # country code by a.schlock. # partly manually converted from iso and babel stuff, dialects and some _ISO639_TO_BABEL = { 'no': 'norsk', # added by hand ( forget about nynorsk?) 'gd': 'scottish', # added by hand 'hu': 'magyar',# added by hand 'pt': 'portuguese',# added by hand 'sl': 'slovenian', 'af': 'afrikaans', 'bg': 'bulgarian', 'br': 'breton', 'ca': 'catalan', 'cs': 'czech', 'cy': 'welsh', 'da': 'danish', 'fr': 'french', # french, francais, canadien, acadian 'de': 'ngerman', # rather than german # ngerman, naustrian, german, germanb, austrian 'el': 'greek', 'en': 'english', # english, USenglish, american, UKenglish, british, canadian 'eo': 'esperanto', 'es': 'spanish', 'et': 'estonian', 'eu': 'basque', 'fi': 'finnish', 'ga': 'irish', 'gl': 'galician', 'he': 'hebrew', 'hr': 'croatian', 'hu': 'hungarian', 'is': 'icelandic', 'it': 'italian', 'la': 'latin', 'nl': 'dutch', 'pl': 'polish', 'pt': 'portuguese', 'ro': 'romanian', 'ru': 'russian', 'sk': 'slovak', 'sr': 'serbian', 'sv': 'swedish', 'tr': 'turkish', 'uk': 'ukrainian' } def __init__(self, lang): self.language = lang def get_language(self): if self._ISO639_TO_BABEL.has_key(self.language):
[Zope-Checkins] SVN: Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py removed debug code
Log message for revision 39028: removed debug code Changed: U Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py -=- Modified: Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py === --- Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py 2005-10-09 23:25:39 UTC (rev 39027) +++ Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py 2005-10-10 04:23:12 UTC (rev 39028) @@ -24,10 +24,6 @@ def include(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): Include a reST file as part of the content of this reST file. -import pdb -pdb.set_trace() - -print '1' if not state.document.settings.file_insertion_enabled: warning = state_machine.reporter.warning( '%s directive disabled.' % name, ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Coders] Zope tests: 7 OK, 1 Failed
Summary of messages to the zope-tests list. Period Sat Oct 8 11:01:02 2005 UTC to Sun Oct 9 11:01:02 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Test failures - Subject: FAILED (errors=1) : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:29:34 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003283.html Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:23:33 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003279.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:25:04 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003280.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:26:34 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003281.html Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:28:04 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003282.html Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:31:04 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003284.html Subject: OK : Zope-trunk Python-2.3.5 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:32:34 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003285.html Subject: OK : Zope-trunk Python-2.4.1 : Linux From: Zope Unit Tests Date: Sat Oct 8 22:34:04 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003286.html ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-dev] [Zope 2.8.2] Minor delay
--On 7. Oktober 2005 15:35:00 -0400 Tim Peters [EMAIL PROTECTED] wrote: [Andreas Jung] I originally scheduled Zope 2.8.2 for October 12th but I have to delay the release for some days (possibly one week) because of unforeseeable travel and a lot of important work. I hope this is fine for everyone. Hi Tim, we discovered a big security bug in reST for all Zope versions. Therefore I will release both versions as originally scheduled on Thursday. I just have to rip the time to make the release from somewhere but this bug must be fixed. Andreas pgpVvgaDxg0HA.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-PAS] Re: question about user.getProperty()
Jens Vagelpohl wrote: AFAIK getProperty for a user object does not exist in this form. You have to get the propertysheet and then the property. jens P.S.: Please don't confuse member and user. user is what the userfolder creates. member is a CMF/Plone thing only, it represents a user wrapped in a member data wrapper. So if you're asking specifically about member then you need to make the memberdata class' getProperty as intelligent as you need yourself. Ah yes, this was very much a problem of mine. The item I was using was actually the user from the security manager. This type of user only has the member data as property sheets. But in my use-case, where I'm using this in a Plone environment, I can use the portal_memberdata (or was it portal_mebership?) tool to get the current member which is indeed a wrapped user. And this member has a getProperty which indeed checks all propertysheets to retrieve the property you asked for. So all is well. Thanks. - Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com ServerZen Hosting -- http://www.serverzenhosting.net News About The Server -- http://serverzen.net ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope-PAS] Re: Moving PAS and PluginRegistry to SVN?
Am 09.10.2005 um 23:11 schrieb Jens Vagelpohl: On 9 Oct 2005, at 19:46, Rocky Burt wrote: What is the timeframe on this being done? Just so I know when to update my development versions of PAS. - Rocky Jens Vagelpohl wrote: I would volunteer to move both the PluggableAuthService and PluginRegistry products to svn.zope.org. Anyone have any thoughts about that? There is no time frame. Only Zac has responded and I'm not sure if that constitutes enough assent. Oh, I thought that silence is counted as not against it :-). I for one would be in favour of this move, and also about further ideas to incorporate it into one of the coming Z2 releases. with regards, __Janko ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
[Zope] Re: ZAjax anyone?
Chris McDonough wrote: On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote: I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format. We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC. http://myzope.kedai.com.my/blogs/kedai/49 shows a few different ways to do Ajax and Zope. Michael -- http://zope.org/Members/d2m http://planetzope.org ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] NameError in Zope Tutorial Lesson 8
Hello listmembers, I am fairly new to Zope and turning debugging on and googling a lot does not lead me to the solution of the problem. Learning Zope I got this error trying out lesson 8(cont.): --snip-- Error Type: NameError Error Value: global name 'title' is not defined --snap-- Zope version: 2.7.7 Python: 2.3.5 OS: FreeBSD 4.11-STABLE Please can anybody give me a hint. I simply can't await to get my Elvis Photo Archive up and running. TIA Norbert ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Method cache (Memoize) for Zope
Has anybody written a Memoize-like decorator for Zope? I imagine that it could be a nice feature to have a standard decorator for Zope that would cache results in a _v_ volatile variable. I usually do it a bit like this:: def _cache_it(self, meth, *args, **kwargs): cache_name = '_v_%s' % meth.__name__ if not hasattr(self, cache_name): result = meth(*args, **kwargs) setattr(self, cache_name, result) return getattr(self, cache_name) def _some_function(self): # do expensive calculations and return result return 42 def some_function(self, *args, **kwargs): Returns cached values return self._cache_it(self._some_function, *args, **kwargs) But I guess that there must be someone who has allready written a more generic way to do it via generators? -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] [Ann] Zope Hotfix 2005-10-09
Hello, a security issue with the Docutils package coming with Zope 2.6 or higher has been discovered. Sites that expose reStructuredText functionality to untrusted users (typically portal sites allowing registered users to edit content) are possibly affected. Download location and installation are available from http://www.zope.org/Products/Zope/Hotfix_2005-10-09/security_alert The hotfix is supposed to work with any Zope 2.7 and 2.8 version. It might work for Zope 2.6 and Python 2.1 but we can not give a guarantee since Zope 2.6 is no longer maintained. Plone sites do not seem to be affected (there seems to be some additional code on top of Zope's reST implementation avoiding the failure) however this not a guarantee. The upcoming Zope 2.8.2 and 2.7.8 releases will also ship with the hotfix. Andreas Jung pgpcQ2DaluOjM.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] LocalFS problems with @import-ing stylesheets
I can confirm the problem, the stylesheet is not rendered from localfs with firefox the problem is caused by an incorect http header text/plain instead of text/css I've tried to add a type_map to the LocalFS but the content-type does not change so, for me, it is clearly a LocalFS issue anyone knows how to hardcode this content-type in LocalFS.py ? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] INSTALLING gcc (and ZOPE) on DEBIAN
On 10/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why not? I dont understand - killing processes does not mean getting their space? It's probably not going to be enough anyway. But do you advise me to do? That depends on what your goal is. Why are you trying to run Zope on a virtual server who has little internal memory and almost no swap? What is the end you are trying to reach? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Packaging a zope application
Dieter wrote: Joshua Burvill wrote at 2005-10-7 12:28 +1000: ... Currently there is a three step process: 1. install correct version of zope 2. unzip a zip file which I maintain that contains all the added libraries, products, .zexp file, and external methods into their correct paths in the zope root folder on the filesystem, then restart zope 3. Log into zope as admin and import the .zexp file into the zope root folder in the zope db We put everything we can into the filesystem (e.g. via CMFCore's Filesystem Directory View) and use CVS/SVN to manage and distribute it. Things that must be in the ZODB are created via setup scripts (maintained in CVS). Thanks Dieter, This sounds like what I am looking for. I guess that means creating a kind of product. If it is not too much to ask, can anyone point to or provide an example of a working application that is organised like this so I could look at the code? It would help a lot. Regards, Josh ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to make a table with sortable colmns?
--On 7. Oktober 2005 14:35:00 +0100 Thomas Apostolou [EMAIL PROTECTED] wrote: But how can i tell the table to sort the column i click on just like plone does with the members list? I think he was asking for a client-side-only solution. Google for sortable table. This will link you to some JS based solutions. The solution from http://www.kryogenix.org/code/browser/sorttable/ is working for us. Especially you can hook your own comparison methods when you are dealing with custom types to be sorted (european dates, etc.) -aj pgpfWNmtpkaqe.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: ZAjax anyone?
Thank you everyone! I really appreciate all the input. It's amazing what you find by doing a little more thorough searching... here's more of what I am looking for: http://timmorgan.org/wiki/ReactFrameworkForZope Tim Morgan has put together what I would call Zajax from the looks of it. I am going to start playing around with it, and see how it fits my needs. On a side note, I have put together a quick 'n' dirty blog about the things I am finding, particularly for XMLHTTP, not JSON or XML-RPC. www.zajax.net - (I liked the name so much, I had to register the domain! :)On 10/9/05, Michael Haubenwallner [EMAIL PROTECTED] wrote: Chris McDonough wrote: On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote: I would love to have a product (called ZAjax :) that simplyreceives a request from the client and spits out xml.To be morespecific, a set of classes that call ZSQL methods and retrieverecords, then send that back in xml format. We've had this built in to Zope for a long time in the form of XML- RPC.There are several _javascript_ libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.http://myzope.kedai.com.my/blogs/kedai/49shows a few different ways to do Ajax and Zope. Michael--http://zope.org/Members/d2mhttp://planetzope.org___Zope maillist- Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding!**(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )-- Greg Fischer1st Byte Solutionshttp://www.1stbyte.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: ZAjax anyone?
Ok, after further investigation, Tim Morgan's React is not exactly what I am looking for. That said, his work is outstanding, and I think it's awesome! It's like Ruby On Rails implemented (better IMHO) in Zope! Very cool! However, I think what I want to work with is just a Zope product without the MVC stuff. Thanks again everyone! GregOn 10/9/05, Greg Fischer [EMAIL PROTECTED] wrote: Thank you everyone! I really appreciate all the input. It's amazing what you find by doing a little more thorough searching... here's more of what I am looking for: http://timmorgan.org/wiki/ReactFrameworkForZope Tim Morgan has put together what I would call Zajax from the looks of it. I am going to start playing around with it, and see how it fits my needs. On a side note, I have put together a quick 'n' dirty blog about the things I am finding, particularly for XMLHTTP, not JSON or XML-RPC. www.zajax.net - (I liked the name so much, I had to register the domain! :)On 10/9/05, Michael Haubenwallner [EMAIL PROTECTED] wrote: Chris McDonough wrote: On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote: I would love to have a product (called ZAjax :) that simplyreceives a request from the client and spits out xml.To be morespecific, a set of classes that call ZSQL methods and retrieverecords, then send that back in xml format. We've had this built in to Zope for a long time in the form of XML- RPC.There are several _javascript_ libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.http://myzope.kedai.com.my/blogs/kedai/49 shows a few different ways to do Ajax and Zope. Michael--http://zope.org/Members/d2m http://planetzope.org___Zope maillist- Zope@zope.org http://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding!**(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )-- Greg Fischer1st Byte Solutions http://www.1stbyte.com -- Greg Fischer1st Byte Solutionshttp://www.1stbyte.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )