markstory / sphinxcontrib-phpdomain

A PHP domain for sphinx. Allows you to annotate PHP objects in your sphinx docs.
Other
19 stars 14 forks source link

problem with sphinx 1.5.3 & python 3.x #8

Closed alochym01 closed 7 years ago

alochym01 commented 7 years ago

i install sphinx and sphinxcontrib-phpdomain

i use sphinx-quickstart and add lines support php code to conf.py file and quick-sample.rst from github repo

from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers["php"] = PhpLexer(startinline=True, linenos=1) lexers["php-annotations"] = PhpLexer(startinline=True, linenos=1) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinxcontrib.phpdomain']

and then i do make html and error

Exception occurred: File "/home/hadn/python3/lib/python3.5/site-packages/sphinxcontrib/phpdomain.py", line 489, in generate modules = sorted(self.domain.data['namespaces'].iteritems(), AttributeError: 'dict' object has no attribute 'iteritems'

how to fix it

markstory commented 7 years ago

What version of python are you using?

alochym01 commented 7 years ago

hi @markstory (python3) hadn@ubuntu:~$ python Python 3.5.2 (default, Jul 5 2016, 12:43:10) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.

markstory commented 7 years ago

Ok. I've only ever tested this code against python 2. There are probably more python3 compatibility issues lurking about.

markstory commented 7 years ago

The AttributeErrors have been fixed. The test documentation now also builds in python 3.5 and 3.6, so hopefully you shouldn't have too many more issues with python 3 compatibility.

donguyenha commented 7 years ago

yeah it works well now @markstory thank you