Skip to content

Some differences between Python 3.6 and 3.8 #103

Open
@mitar

Description

@mitar

I know that Python 3.7/3.8 support is still in progress and I was testing the master branch and found some differences so I am reporting them to maybe use them as unit tests. With Python 3.6:

>>> import typing
>>> from pytypes import type_util
>>> type_util._issubclass(type_util.deep_type({}), typing.Union[typing.Dict, type(None)])
True
>>> type_util._issubclass(type_util.deep_type({}), typing.Union[typing.Dict[str, typing.Any], type(None)])
True
>>> type_util._issubclass(type_util.deep_type({}), typing.Dict[str, typing.Any])
True

Python 3.8:

>>> import typing
>>> from pytypes import type_util
>>> type_util._issubclass(type_util.deep_type({}), typing.Union[typing.Dict, type(None)])
True
>>> type_util._issubclass(type_util.deep_type({}), typing.Union[typing.Dict[str, typing.Any], type(None)])
False
>>> type_util._issubclass(type_util.deep_type({}), typing.Dict[str, typing.Any])
True

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