[Bug 905500] Re: `python setup.py register` fails if long_description contains RST

Jason Conti 905500 at bugs.launchpad.net
Sat Dec 17 22:06:00 UTC 2011


Looking at distutils/command/check.py , it subclasses Reporter from
docutils/utils.py in python-doctutils to override the system_message
method (I guess to stop it from writing output and raising exceptions).
But the original system_message method returns a nodes.system_message
object, which is used later in docutils/parsers/rst/states.py also in
the python-docutils package, and fails because the value is None.

The system message that it is failing on (using
https://bitbucket.org/techtonik/python-pager/raw/b8dba77eb4aa/README.rst
) is:

Unknown interpreted text role "func". (at debug level 3)

There is also a previous system message that makes it through before
raising the TypeError (at debug level 1):

No role entry for "func" in module "docutils.parsers.rst.languages.en".
Trying "func" as canonical role name.

The fix may be as simple as appending:

return nodes.system_message(message, level=level,
type=self.levels[level], *children, **kwargs)

to the system_message method in the SilentReporter class in
distutils/command/check.py. This should probably be reported upstream
(if it isn't already) so they can take a look at it and work out a
proper fix.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/905500

Title:
  `python setup.py register` fails if long_description contains RST

Status in “python2.7” package in Ubuntu:
  New

Bug description:
  In my setup.py long_description is read from external reStructuredText file:
      long_description=open('README.rst').read(),

  And it gives a traceback when I try to register package on PyPI. See
  traceback.txt in attach.

  Step to reproduce:
  1. hg clone https://bitbucket.org/techtonik/python-pager; cd python-pager
  2. hg up -r 24
  3. python setup.py register

  I presume that markup contains errors, but it should not fail with
  traceback.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: python2.7 2.7.2-5ubuntu1
  ProcVersionSignature: Ubuntu 2.6.38-11.50-generic 2.6.38.8
  Uname: Linux 2.6.38-11-generic i686
  NonfreeKernelModules: nvidia
  ApportVersion: 1.23-0ubuntu4
  Architecture: i386
  CheckboxSubmission: b346f016d264f3ef62407d5e29c198a2
  CheckboxSystem: daed2f3d6643b4a84b4520a2427f8c2b
  Date: Fri Dec 16 23:46:30 2011
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: python2.7
  UpgradeStatus: Upgraded to oneiric on 2011-10-02 (75 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/905500/+subscriptions




More information about the foundations-bugs mailing list