Skip to content

Commit

Permalink
publish deprecated Sentinel
Browse files Browse the repository at this point in the history
this was accidentially published before, we can't un-publish it now since that's a breakage
but publish with a deprecation warning
  • Loading branch information
minrk committed Mar 29, 2019
1 parent 6cebe10 commit bbbdfbb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions traitlets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
from warnings import warn

from . import traitlets
from .traitlets import *
from .utils.importstring import import_item
from ._version import version_info, __version__


class Sentinel(traitlets.Sentinel):
def __init__(self, *args, **kwargs):
super(Sentinel, self).__init__(*args, **kwargs)
warn(
"""
Sentinel is not a public part of the traitlets API.
It was published by mistake, and may be removed in the future.
""",
DeprecationWarning,
stacklevel=2,
)

0 comments on commit bbbdfbb

Please sign in to comment.