Skip to content

Except both AttributeError and TypeError when trying to enter context manager

David Pape requested to merge fix-python-311-context-manager-exception into master

Since Python 3.11, a TypeError is now raised instead of an AttributeError when an object doesn't support the context manager protocol. We can safely catch both cases here.

Merge request reports

Loading