8000 Restore metaclass functionality on all python versions · Issue #106 · jsocol/pystatsd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Restore metaclass functionality on all python versions #106
Closed
@jancespivo

Description

@jancespivo

Hi,
see

__metaclass__ = abc.ABCMeta

Unfortunately __metaclass__ has no effect in Python 3. The correct way in Python3 is: class StatsClientBase(metaclass=abc.ABCMeta):

The best way how to keep compatibility with the Python 2 is to use six or future.utils. For only this particular purpose I recommend the future.utils. See http://python-future.org/_modules/future/utils.html#with_metaclass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0