Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect import in Python 3.7+ #963

Merged
merged 1 commit into from Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.d/963.bugfix.rst
@@ -0,0 +1,2 @@
Fixed issue where ``dateutil.tz`` was using a backport of ``contextlib.nullcontext``
even in Python 3.7 due to a malformed import statement.
2 changes: 1 addition & 1 deletion dateutil/tz/tz.py
Expand Up @@ -1823,7 +1823,7 @@ def _get_supported_offset(second_offset):

try:
# Python 3.7 feature
from contextmanager import nullcontext as _nullcontext
from contextlib import nullcontext as _nullcontext
except ImportError:
class _nullcontext(object):
"""
Expand Down