Contextlib2

Latest version: v21.6.0

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

21.6.0

^^^^^^^^^^^^^^^^^^^

* License update: due to the inclusion of type hints from the ``typeshed``
project, the ``contextlib2`` project is now under a combination of the
Python Software License (existing license) and the Apache License 2.0
(``typeshed`` license)
* Switched to calendar based versioning using a "year"-"month"-"serial" scheme,
rather than continuing with pre-1.0 semantic versioning
* Due to the inclusion of asynchronous features from Python 3.7+, the
minimum supported Python version is now Python 3.6
(`29 <https://github.com/jazzband/contextlib2/issues/29>`__)
* Synchronised with the Python 3.10 version of contextlib
(`12 <https://github.com/jazzband/contextlib2/issues/12>`__), making the
following new features available on Python 3.6+:

* ``asyncontextmanager`` (added in Python 3.7, enhanced in Python 3.10)
* ``aclosing`` (added in Python 3.10)
* ``AbstractAsyncContextManager`` (added in Python 3.7)
* ``AsyncContextDecorator`` (added in Python 3.10)
* ``AsyncExitStack`` (added in Python 3.7)
* async support in ``nullcontext`` (Python 3.10)

* ``contextlib2`` now includes an adapted copy of the ``contextlib``
type hints from ``typeshed`` (the adaptation removes the Python version
dependencies from the API definition)
(`33 <https://github.com/jazzband/contextlib2/issues/33>`__)
* to incorporate the type hints stub file and the ``py.typed`` marker file,
``contextlib2`` is now installed as a package rather than as a module
* Updates to the default compatibility testing matrix:

* Added: CPython 3.9, CPython 3.10
* Dropped: CPython 2.7, CPython 3.5, PyPy2

0.6.0.post1

^^^^^^^^^^^^^^^^^^^^^^^^

* Issue `24 <https://github.com/jazzband/contextlib2/issues/24>`__:
Correctly update NEWS.rst for the 0.6.0 release.

0.6.0

^^^^^^^^^^^^^^^^^^

* Issue `16 <https://github.com/jazzband/contextlib2/issues/16>`__:
Backport `AbstractContextManager` from Python 3.6 and `nullcontext`
from Python 3.7 (patch by John Vandenberg)

0.5.5

^^^^^^^^^^^^^^^^^^

* Issue `13 <https://github.com/jazzband/contextlib2/issues/13>`__:
``setup.py`` now falls back to plain ``distutils`` if ``setuptools`` is not
available (patch by Allan Harwood)

* Updates to the default compatibility testing matrix:

* Added: PyPy3, CPython 3.6 (maintenance), CPython 3.7 (development)
* Dropped: CPython 3.3

0.5.4

^^^^^^^^^^^^^^^^^^

* Thanks to the welcome efforts of Jannis Leidel, contextlib2 is now a
[Jazzband](https://jazzband.co/) project! This means that I (Nick Coghlan)
am no longer a single point of failure for backports of future contextlib
updates to earlier Python versions.

* Issue `7 <https://github.com/jazzband/contextlib2/issues/7>`__: Backported
fix for CPython issue `27122 <http://bugs.python.org/issue27122>`__,
preventing a potential infinite loop on Python 3.5 when handling
``RuntimeError`` (CPython updates by Gregory P. Smith & Serhiy Storchaka)

0.5.3

^^^^^^^^^^^^^^^^^^

* ``ExitStack`` now correctly handles context managers implemented as old-style
classes in Python 2.x (such as ``codecs.StreamReader`` and
``codecs.StreamWriter``)

* ``setup.py`` has been migrated to setuptools and configured to emit a
universal wheel file by default

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.