David Goodger | 1 Jan 2003 04:00
Favicon

Updates to Docutils

I just checked in a change to docutils/frontend.py, removing some nasty
internals-fiddling code (in ``ConfigParser.get_section()``) and replacing it
with simpler, correct code (possibly a bit slower, but so what).  This was
prompted by bug reports from Fred Drake and Guido van Rossum (thank you!),
who ran Docutils with the newly-released Python 2.3a1, in which some
ConfigParser internals had changed.

There may be another bug that only shows up with Python 2.3, but I won't be
able to check it until Thursday or Friday.

Anybody using Python 2.3 should definitely get the latest Docutils code from
CVS or from the snapshot: <http://docutils.sf.net/docutils-snapshot.tgz>.

Happy New Year!

--

-- 
David Goodger  <goodger <at> python.org>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
David Goodger | 3 Jan 2003 05:03
Favicon

Re: Updates to Docutils

I have fixed the remaining (known) bugs related to Python 2.3 and PyXML.

Fred Drake pointed out that Python 2.1 didn't have the "compiler" package as
part of the standard library (it was a separate install), and that's crucial
to the Python Source Reader work that's ongoing.  Therefore I've decided to
upgrade the minimum Python requirement to 2.2 (2.2.2 recommended).
Everything except the test suite and the docutils/readers/python code still
works with Python 2.1 though.

--

-- 
David Goodger  <goodger <at> python.org>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/

_______________________________________________
Doc-SIG maillist  -  Doc-SIG <at> python.org
http://mail.python.org/mailman/listinfo/doc-sig

Fred L. Drake, Jr. | 3 Jan 2003 06:18
Picon
Favicon
Gravatar

Re: Re: Updates to Docutils


David Goodger writes:
 > I have fixed the remaining (known) bugs related to Python 2.3 and PyXML.

Yee haw!  ;-)

 > Fred Drake pointed out that Python 2.1 didn't have the "compiler" package as
 > part of the standard library (it was a separate install), and that's crucial
 > to the Python Source Reader work that's ongoing.  Therefore I've decided to
 > upgrade the minimum Python requirement to 2.2 (2.2.2 recommended).

It's not clear that this is the right way to deal with this; I'd be
happy that just the one component isn't necessarily available with
Python 2.1.x unless the compiler package is installed.

(I vaguely recall that the compiler package shipped as part of the
source package, but not as part of the standard library, but I'm not
sure offhand.  Maybe it was in the Tools/ directory?)

I've not dug into the alltests.py script yet; perhaps there's a way to
do something similar to the "skipped tests" idea that we use with the
Python test suite.  That's probably more a matter of mechanics than
anything.  I won't have time to look into that for at least a few
days; if anyone beats me to it I won't complain.  ;-)

 > Everything except the test suite and the docutils/readers/python code still
 > works with Python 2.1 though.

Which means the tests need to run, at least for the parts that are
supposed to work!  ;-)
(Continue reading)

Tony J Ibbs (Tibs | 3 Jan 2003 09:45
Picon

RE: [Docutils-develop] Re: Updates to Docutils

David Goodger wrote:
> ...that Python 2.1 didn't have the "compiler" package as
> part of the standard library (it was a separate install), and
> that's crucial to the Python Source Reader work that's ongoing.
> Therefore I've decided to upgrade the minimum Python requirement
> to 2.2 (2.2.2 recommended).

I don't have any personal (!) objection to specifying 2.2, but it's
surely easy enough to require the compiler package, and provide a
reference copy on the docutils site for those who install without the
appropriate bit of source/Tools/whatever.

Whether there was significant *change* in the compiler code in the
interim, though, which might also be influential, I can't remember.

Of course, this might just be that "one thing" that's enough to tip your
decision on which version of Python to go for.

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
Give a pedant an inch and they'll take 25.4mm
(once they've established you're talking a post-1959 inch, of course)
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)

_______________________________________________
Doc-SIG maillist  -  Doc-SIG <at> python.org
http://mail.python.org/mailman/listinfo/doc-sig

(Continue reading)

Benja Fallenstein | 3 Jan 2003 18:57
Picon
Picon

Re: [Docutils-develop] Re: Updates to Docutils


Hi David,

David Goodger wrote:
> I have fixed the remaining (known) bugs related to Python 2.3 and PyXML.
> 
> Fred Drake pointed out that Python 2.1 didn't have the "compiler" package as
> part of the standard library (it was a separate install), and that's crucial
> to the Python Source Reader work that's ongoing.  Therefore I've decided to
> upgrade the minimum Python requirement to 2.2 (2.2.2 recommended).
> Everything except the test suite and the docutils/readers/python code still
> works with Python 2.1 though.

My project [http://gzz.info] is using ReST heavily for documentation (we 
intend to write all future documentation in it, and have converted some 
of the existing). However, since we're a Java project, we use it through 
Jython, whose newest version is currently up to par with Python 2.1. 
Therefore, I'd be much happier if you could formally keep the docutils 
requirement at 2.1 for everything except the Python reader (or say, 
"Requirement: Python 2.2 or Python 2.1 with the compiler package 
installed"). When a 2.2-compliant Jython ever comes out, this won't be 
an issue any more.

Thanks,
- Benja

_______________________________________________
Doc-SIG maillist  -  Doc-SIG <at> python.org
http://mail.python.org/mailman/listinfo/doc-sig

(Continue reading)

Fred L. Drake, Jr. | 3 Jan 2003 19:09
Picon
Favicon
Gravatar

Re: [Doc-SIG] Re: [Docutils-develop] Re: Updates to Docutils


Benja Fallenstein writes:
 > My project [http://gzz.info] is using ReST heavily for documentation (we 
 > intend to write all future documentation in it, and have converted some 
 > of the existing). However, since we're a Java project, we use it through 
 > Jython, whose newest version is currently up to par with Python 2.1. 

Jython is a really good reason to maintain Python 2.1 compatibility in
my book.

  -Fred

--

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
David Goodger | 4 Jan 2003 02:11
Favicon

Re: Updates to Docutils

[David Goodger]
> Fred Drake pointed out that Python 2.1 didn't have the "compiler"
> package as part of the standard library (it was a separate
> install), and that's crucial to the Python Source Reader work
> that's ongoing.  Therefore I've decided to upgrade the minimum
> Python requirement to 2.2 (2.2.2 recommended).  Everything except
> the test suite and the docutils/readers/python code still works
> with Python 2.1 though.

Thanks Fred, Tony, and Benja, for your input.  I agree that Jython
currently at 2.1 presents a strong case for maintaining 2.1
compatibility.  The compiler package was in the Tools/ directory of
the Python source distribution, complete with a Distutils setup.py for
installation.

I wonder, does the compiler package work with Jython at all?  Benja?

Another issue is that I've been using tokenize.py's generate_tokens()
call in docutils/readers/python/moduleparser.py, which uses
generators, which requires Python 2.2.  Although this has been more of
an experiment than a requirement, it was a pleasant experiment and it
would be painful and a waste to reimplement it without iterators and
generators.

I put back the pre-generators difflib.py (used by the test suite) and
added footnotes to the README and the home page saying:

   Python 2.1 may be used providing the compiler package is
   installed.  The compiler package can be found in the Tools/
   directory of Python's source distribution.
(Continue reading)

Brett g Porter | 6 Jan 2003 16:03
Picon
Favicon

Special characters

It's probably staring me in the face, but what's the correct reST way to get
characters like HTML character entities? I can't be the first to want to
include "&copy;" or "&trade;" in a document. I know that HTML isn't the only
output format supported, so I'm not surprised that character entities aren't
just passed through, I guess.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
David Goodger | 7 Jan 2003 01:45
Favicon

Re: Special characters

Brett g Porter wrote:
> It's probably staring me in the face, but what's the correct reST
> way to get characters like HTML character entities?

Just type the characters into your input file, using whatever extended
character set input mechanism your OS has.  Save the file using
whatever encoding you want (Latin-1, UTF-8, cp1252, unicode-escape,
etc.), and tell the Docutils tool what that encoding is
(-i/--input-encoding option).

The default output encoding, UTF-8, is well-supported and handles all
Unicode characters.

> I can't be the first to want to include "&copy;" or "&trade;" in a
> document.

Unfortunately, there's no 'html-character-entity' codec in the stdlib
[#]_.  If you were to use such a codec though, you'd have to encode
every "&" as "&amp;" (unless it was a forgiving codec).  Does such a
codec exist?

.. [#] There is an "xmlcharrefreplace" error handler in Python 2.3,
   but it only converts characters to "&#169;" forms, not "&copy;",
   and only when encoding.  I don't know of an official codec for
   *decoding* character entities.

> I know that HTML isn't the only output format supported, so I'm not
> surprised that character entities aren't just passed through, I
> guess.

(Continue reading)

Bruce Smith | 9 Jan 2003 09:35

include errors in buildhtml.py from snapshot, Mac OS X

Hi,

I've just downloaded docutils from the snapshot at

  http://docutils.sf.net/docutils-snapshot.tgz

and installed it into the python 2.2 that ships with Mac OS X 10.2.3,
i.e. /usr/bin/python, following the instructions on

  http://docutils.sourceforge.net/README.html

I noticed no problems during the install, and the test suite passes with no
errors, but during "cd tools; ./buildhtml.py ../" I get some include
errors -- output is below. (These occur before the test.txt file with its
intentional errors is mentioned in the output.)

There is also an error in the "./quicktest.py --version" command.

(I took a look at some of the generated HTML and it looks correct to my
untrained eye. See end of file for more pedantic details.)

BTW, Thanks loads for docutils! It looks like it'll help a lot with some
documentation I'm writing right now. (Not about anything related to Python,
unfortunately.)

Here are the relevant parts of my shell session, showing the include errors
(about include4.txt, include5.txt, and include6.txt), and a few things I did
to look into them. I didn't try to debug this, but I'll be glad to supply
more info, or to try to debug it if someone more central to the project
can't reproduce it.
(Continue reading)


Gmane