Nate Soares added the comment:
To be clear, the trouble I was trying to point at is that if foo.py didn't
have __all__, then it would still have a BB attribute. But if the module is
given __all__, the BB is normalized away into a B. This seems like pretty
strange/counterintuitive behavior
New submission from Nate Soares:
[NOTE: In this comment, I use BB to mean unicode character 0x1D539, b/c the
issue tracker won't let me submit a comment with unicode characters in it.]
Directory structure:
repro/
foo.py
test_foo.py
Contents of foo.py:
BB = 1
__all__ = ['BB
Changes by Nate Soares <so8...@gmail.com>:
--
pull_requests: +2045
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29822>
___
_
Changes by Nate Soares <so8...@gmail.com>:
--
pull_requests: +1390
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29581>
___
_
Nate Soares added the comment:
I didn't know about issue29638, and I'm not sure whether my PR fixes it.
Looking at that bug, I don't think that my PR would fix it, because I still
trust TPFLAGS_IS_ABSTRACT when __abstractmethods__ exists. That said, I'm not
clear on how the cache works, so
Changes by Nate Soares <so8...@gmail.com>:
--
pull_requests: +556
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29822>
___
__
New submission from Nate Soares:
Here's an example test that fails:
def test_isabstract_during_init_subclass(self):
from abc import ABCMeta, abstractmethod
isabstract_checks = []
class AbstractChecker(metaclass=ABCMeta):
def __init_subclass__(cls
New submission from Nate Soares:
I believe I've found a bug (or, at least, critical shortcoming) in the way that
python 3.6's __init_subclass__ interacts with abc.ABCMeta (and, presumably,
most other metaclasses in the standard library). In short, if a class
subclasses both an abstract class