Menu

ClassicStructuredText - deprecated regsub

2002-08-21
2002-08-21
  • Joseph VanAndel

    Joseph VanAndel - 2002-08-21

    First a question:
    Now that I'm using happydoc 2.0.1,
    to generate HTML tables  from docstrings,   I need to specify:

    happydoc parser_docStringFormat=ClassicStructuredText
    my_file.py

    If I use the default docstring processing, the '||' characters in my doc strings are not processed as table cell delimiters and simply appear in my HTML output.

    Will "ClassicStructuredText" be supported in future versions, or should I migrate to some other format for my docstrings?

    Also, when I use ClassicStructuredText,  python compains:
    /usr/local/lib/python2.2/site-packages/happydoclib/docstring/StructuredText/ts_regex.py:87: DeprecationWarning: the regex module is deprecated; please use the re module
      import regex, regsub #, Sync
    /usr/local/lib/python2.2/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub()
      DeprecationWarning)

     
    • Doug Hellmann

      Doug Hellmann - 2002-08-21

      The default formatting was changed from classic to NG because of the regsub deprecation issue.  Most classic ST should work with the NG parser, except a few items such as tables (which you have discovered).  There is a new table format which supports multi-row cells and is a bit easier to make sense out of when looking at the plain text form.

      Classic ST support will always be retained via the parser_docStringFormat option, so you do not need to worry about converting your tables over now. 

      I do not believe there is any way to eliminate the deprecation warning from the regsub module, so those will continue until you do convert to the NG form.

      Doug

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.