diff --git a/docs/development.rst b/docs/development.rst index a54fa94fd4..5117d38d56 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -417,12 +417,12 @@ include extra code to make sure it works in all the supported versions. Some examples which show how to handle those cases are described below. -Context Managers +Type annotation for unions ~~~~~~~~~~~~~~~~ -Context managers aren't available in Python 2.5 by default. If you want to use -them make sure to put from ``__future__ import with_statement`` on top of the -file where you use them. +In Python 3.9 and below, the pipe character (``|``) cannot be used for union +types in type annotations. Instead, you should use ``Union`` from the ``typing`` +module: Utility functions for cross-version compatibility ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~