Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netaddr.ip.iana.SaxRecordParser.endElement() incompatible with Python 3.1 #34

Closed
Arfrever opened this issue Aug 29, 2012 · 2 comments
Closed

Comments

@Arfrever
Copy link

netaddr/compat.py defines _callable.
netaddr/ip/iana.py uses callable instead of _callable.
callable built-in has been restored in Python 3.2, so this problem does not occur with Python >=3.2.
netaddr has Programming Language :: Python :: 3.1 classifier, so I assume that Python 3.1 is still supported by netaddr.

Additionally netaddr/compat.py could define _callable for Python 3 in the following way:

    if _sys.version_info >= (3, 2):
        _callable = lambda x: callable(x)
    else:
        _callable = lambda x: hasattr(x, '__call__')
@drkjam
Copy link
Collaborator

drkjam commented Aug 29, 2012

Thanks for the bug report, fixed in the repo. Next release out soon (out of time today).

@drkjam
Copy link
Collaborator

drkjam commented Sep 6, 2012

Available in netaddr 0.7.10

@drkjam drkjam closed this as completed Sep 6, 2012
@snordhausen snordhausen modified the milestone: 0.7.11 Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants