-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Felix Schwarz wrote:

> I found two minor issues by using repoze.sphinx.autointerface:
> 
> 1. Can someone please update the pypi page?
> http://pypi.python.org/pypi/repoze.sphinx.autointerface/0.1.2 still says
> '.. autoinclude:: yourpackage.interfaces.IFoo' however this did not work for 
> me and indeed README.txt says
> '.. autointerface:: yourpackage.interfaces.IFoo' which works.

I will upload 0.1.3 to PyPI, including the changed README.txt in the
long_description field.

> 2. I was unable to use autointerface 0.1.2 on Fedora 10 (Python 2.5.2) 
> because 
> of this:
>    File ".../repoze/sphinx/autointerface.py", line 87, in _resolve_dotted_name
>      thing = __import__('.'.join(path), {}, {}, [name])
> TypeError: Item in ``from list'' not a string
> 
> I found out that 'name' contained a unicode string (like u'IFoo'). I was able 
> to 'fix' this by changing '[name]' to '[str(name)]'. Maybe this is because I 
> have some umlauts in my full path name (but of course not in a Python module).

Does this patch work for you?

- --- repoze/sphinx/autointerface.py    (revision 3167)
+++ repoze/sphinx/autointerface.py      (working copy)
@@ -81,7 +81,7 @@

 def _resolve_dotted_name(dotted):
     #return EntryPoint.parse('x=%s' % dotted).load(False)
- -    tokens = dotted.split('.')
+    tokens = [str(x) for x in dotted.split('.')]
     path, name = tokens[:-1], tokens[-1]
     thing = __import__('.'.join(path), {}, {}, [name])
     return getattr(thing, name)


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJbd4Z+gerLs4ltQ4RAqjoAJ9xIN2x4MMEAlfqCJg6wZDgXTpkuwCeNeSV
V5UAIftAieEFzSOLDdSspfQ=
=IV2s
-----END PGP SIGNATURE-----
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to