Public bug reported:

issubclass(a_type, union_type) has stopped working:

In zesty:

  # python3
  Python 3.5.2+ (default, Dec 13 2016, 14:16:35)
  [GCC 6.2.1 20161212] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import typing
  >>> issubclass(str, typing.Optional[str])
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python3.5/typing.py", line 770, in __subclasscheck__
      raise TypeError("Unions cannot be used with issubclass().")
  TypeError: Unions cannot be used with issubclass().

In yakkety:

  $ python3
  Python 3.5.2+ (default, Sep 22 2016, 12:18:14)
  [GCC 6.2.0 20160927] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import typing
  >>> issubclass(str, typing.Optional[str])
  True

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: python3.5 3.5.2-9
ProcVersionSignature: Ubuntu 4.8.0-30.32-generic 4.8.6
Uname: Linux 4.8.0-30-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
Date: Thu Dec 15 09:58:29 2016
ProcEnviron:
 TERM=screen.xterm-256color
 PATH=(custom, no user)
SourcePackage: python3.5
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: python3.5 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug zesty

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1650202

Title:
  issubclass(a_type, union_type) has stopped working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to