[issue30772] If I make an attribute "

2017-06-29 Thread Nate Soares
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

[issue30772] If I make an attribute "[a unicode version of B]", it gets assigned to "[ascii B]", and so on.

2017-06-26 Thread Nate Soares
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

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-06-06 Thread Nate Soares
Changes by Nate Soares <so8...@gmail.com>: -- pull_requests: +2045 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29822> ___ _

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-04-25 Thread Nate Soares
Changes by Nate Soares <so8...@gmail.com>: -- pull_requests: +1390 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29581> ___ _

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-03-18 Thread Nate Soares
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

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-03-15 Thread Nate Soares
Changes by Nate Soares <so8...@gmail.com>: -- pull_requests: +556 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29822> ___ __

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-03-15 Thread Nate Soares
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

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-02-16 Thread Nate Soares
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