Base class for subclasses that can track their own instances
Generally, that all looks pretty good - Pythonic and well laid out. A few possible improvements below.



Per PEP-0008, multiple imports from the same module can be done on one line, and I would recommend alphabetical order:

from __future__ import absolute_import, division, print_function, unicode_literals


If you have a line length problem doing so, use parentheses:

from __future__ import (absolute_import, division, 
                        print_function, unicode_literals)


Although it doesn't work with from __future__ ..., note that if you only want something imported in a particular version, you can do something like:

from sys import version_info

if version_info.major &lt; 3:
    ...




This line:

return tuple(
  [instance() for instance in cls._classnames[cls.__name__]])


Could be simplified to:

return tuple(
  instance() for instance in cls._classnames[cls.__name__])


You don't need to build the list, you can pass the generator expression straight to tuple().



I would check whether you have too many instances as the first thing in __new__; why do work you don't need to?

def __new__(cls):
    """Create instance, if not over limit, and store ref to it."""
    if cls.max is not None and len(cls.instances) &gt;= cls.max:
        raise Exception("Too many instances of class: {0}".format(cls.__name__))
    ...


Note:


Removal of the import - that should be at the top of the file, with the others; 
Use of str.format rather than + string concatenation; and 
Removal of redundant parentheses (just my personal taste) and comment.




Making SelfTrackingClass._classnames a defaultdict(list) from collections would save you from needing to manually check and add a new list when a new class name is used. Alternatively, you can use dict.setdefault:

cls._classnames.setdefault(cls.__name__, []).append(weakref.ref(instance))


It seems unnecessary to remove the empty list from _classnames when you delete an instance.