Skip to content

Commit

Permalink
Issue a deprecation warning when importing wx.lib.pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinD42 committed Jul 19, 2018
1 parent dfd79fd commit 8886acb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -42,7 +42,8 @@ Changes in this release include the following:
and encouraged users to switch to the real PyPubSub package instead. Removing
it caused more issues than were expected so it has been restored and the code
updated to PyPubSub v3.3.0. Version 4.0.0 is available upstream, but it is not
compatible with Python 2.7. (#932)
compatible with Python 2.7. Now, wx.lib.pubsub is actually deprecated instead
of just trying to pass control over to the upstream PyPubSub library. (#932)



Expand Down
7 changes: 6 additions & 1 deletion wx/lib/pubsub/__init__.py
@@ -1,5 +1,5 @@
"""
Pubsub package initialization.
Pubsub package initialization.
:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE_BSD_Simple.txt for details.
Expand All @@ -18,3 +18,8 @@
'__version__'
]

import wx
import warnings
warnings.warn('wx.lib.pubsub has been deprecated, plese migrate your '
'code to use pypubsub, available on PyPI.',
wx.wxPyDeprecationWarning)

0 comments on commit 8886acb

Please sign in to comment.