On Wed, Jan 17, 2018 at 12:55:24AM +0100, Joerg Jung wrote:
> On Tue, Jan 16, 2018 at 11:40:57PM +0000, Stuart Henderson wrote:
> > On 2018/01/17 00:01, Joerg Jung wrote:
> > > Hi,
> > >
> > > please find attached an update for devel/py-typing.
> >
> > The update seems ok, but:
> >
> > > This update introduces a python3 FLAVOR, which is needed as a dependency
> > > for the upcoming homeassistant port.
> >
> > typing is in Python core for 3.5+, so I think it might be better to
> > skip the py3 flavour.
>
> From PEP 484: Type Hints:
>
> "The module is available in Python since version 3.5.0 on a provisional
> basis until Python 3.7.0."
> [...]
> "The changes are merged in three branches (3.5, 3.6, default) due to
> the module's provisional status."
>
> From what I understand, provisional basis means this module is the newer
> upstream-branch compared to the python built-in and it looks like
> homeassistant really wants this newer one.
>
> But I'm not sure about this assumption :(
My assumption was right, looks like the built-in is not enough, see
trace below.
However, it can be really removed from RUN_DEPENDS of py3-aiohttp-cors
port. Thanks for the pointer.
$ python3.6
Python 3.6.4 (default, Jan 5 2018, 14:05:05)
[GCC 4.2.1 Compatible OpenBSD Clang 5.0.1 (tags/RELEASE_501/final)] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import typing
>>> typing.__all__
['Any', 'Callable', 'ClassVar', 'Generic', 'Optional', 'Tuple', 'Type',
'TypeVar', 'Union', 'AbstractSet', 'GenericMeta', 'ByteString', 'Container',
'ContextManager', 'Hashable', 'ItemsView', 'Iterable', 'Iterator', 'KeysView',
'Mapping', 'MappingView', 'MutableMapping', 'MutableSequence', 'MutableSet',
'Sequence', 'Sized', 'ValuesView', 'Reversible', 'SupportsAbs',
'SupportsBytes', 'SupportsComplex', 'SupportsFloat', 'SupportsInt',
'SupportsRound', 'Counter', 'Deque', 'Dict', 'DefaultDict', 'List', 'Set',
'FrozenSet', 'NamedTuple', 'Generator', 'AnyStr', 'cast', 'get_type_hints',
'NewType', 'no_type_check', 'no_type_check_decorator', 'overload', 'Text',
'TYPE_CHECKING', 'Awaitable', 'Coroutine', 'AsyncIterable', 'AsyncIterator',
'Collection', 'AsyncContextManager', 'ChainMap', 'AsyncGenerator']
>>> <ctrl>+<d>
$ hass --verbose --debug
Traceback (most recent call last):
File "/usr/local/bin/hass", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line
2994, in <module>
@_call_aside
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line
2980, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line
3007, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line
658, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line
966, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line
852, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'typing<4,>=3' distribution was not
found and is required by homeassistant