Skip to content

Commit

Permalink
Add deprecation warnings to sandbox modules
Browse files Browse the repository at this point in the history
  • Loading branch information
justinvdm committed Mar 23, 2015
1 parent 4b56e92 commit efbe22e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vumi/application/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import operator
from uuid import uuid4
from StringIO import StringIO
import warnings

from treq.client import HTTPClient

Expand All @@ -37,6 +38,13 @@
from vumi.application.sandbox_rlimiter import SandboxRlimiter


warnings.warn(
"Use of vumi.application.sandbox is deprecated, the vumi sandbox worker "
"and its components have moved to the vxsandbox package:"
"pypi.python.org/pypi/vxsandbox",
category=DeprecationWarning)


class MultiDeferred(object):
"""A callable that returns new deferreds each time and
then fires them all together."""
Expand Down
8 changes: 8 additions & 0 deletions vumi/application/tests/test_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import logging
from collections import defaultdict
from datetime import datetime
import warnings

from OpenSSL.SSL import (
VERIFY_PEER, VERIFY_FAIL_IF_NO_PEER_CERT, VERIFY_NONE,
Expand All @@ -30,6 +31,13 @@
from vumi.tests.helpers import VumiTestCase, PersistenceHelper


warnings.warn(
"Use of vumi.application.tests.test_sandbox is deprecated, the vumi "
"sandbox worker and its components have moved to the vxsandbox package:"
"pypi.python.org/pypi/vxsandbox",
category=DeprecationWarning)


class MockResource(SandboxResource):
def __init__(self, name, app_worker, **handlers):
super(MockResource, self).__init__(name, app_worker, {})
Expand Down

0 comments on commit efbe22e

Please sign in to comment.