Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Fix Python 2 bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Mar 1, 2013
1 parent ed5f2eb commit 52f7fb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/zope/apidoc/utilities.py
Expand Up @@ -30,7 +30,7 @@
import zope.i18nmessageid
from zope.container.interfaces import IReadContainer

from zope.apidoc._compat import unicode, MethodType
from zope.apidoc._compat import unicode, MethodType, PY3
from zope.apidoc.classregistry import safe_import, IGNORE_MODULES

_ = zope.i18nmessageid.MessageFactory("zope")
Expand Down Expand Up @@ -74,7 +74,7 @@ def getPythonPath(obj):
naked = naked.im_class
name = naked.__name__
# Py3 version:
if isinstance(naked, types.FunctionType):
if PY3 and isinstance(naked, types.FunctionType):
name = naked.__qualname__.split('.')[0]
module = getattr(naked, '__module__', _marker)
if module is _marker:
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
@@ -1,7 +1,6 @@
[tox]
envlist =
py26,py27
#,py33
py26,py27,py33

[testenv]
commands =
Expand Down

0 comments on commit 52f7fb9

Please sign in to comment.