
from __future__ import unicode_literals

from testinfra.host import get_host
from testinfra.host import get_hosts

__all__ = ['get_host', 'get_hosts']


from __future__ import unicode_literals

import sys
from testinfra.host import get_host
from testinfra.host import get_hosts

__all__ = ['get_host', 'get_hosts']

if sys.version_info[0] == 2:
    import warnings

    class TestinfraDeprecationWarning(Warning):
        pass

    warnings.simplefilter("default", TestinfraDeprecationWarning)
    warnings.warn(
        'DEPRECATION: testinfra python2 support is unmaintained, please '
        'upgrade to python3', category=TestinfraDeprecationWarning,
        stacklevel=1)

Add warning about unmaintained python2
Add warning about unmaintained python2

  
  from __future__ import unicode_literals
  
+ import sys
  from testinfra.host import get_host
  from testinfra.host import get_hosts
  
  __all__ = ['get_host', 'get_hosts']
  
+ if sys.version_info[0] == 2:
+     import warnings
+ 
+     class TestinfraDeprecationWarning(Warning):
+         pass
+ 
+     warnings.simplefilter("default", TestinfraDeprecationWarning)
+     warnings.warn(
+         'DEPRECATION: testinfra python2 support is unmaintained, please '
+         'upgrade to python3', category=TestinfraDeprecationWarning,
+         stacklevel=1)
+ 
Add warning about unmaintained python2
## Code Before:

from __future__ import unicode_literals

from testinfra.host import get_host
from testinfra.host import get_hosts

__all__ = ['get_host', 'get_hosts']

## Instruction:
Add warning about unmaintained python2
## Code After:

from __future__ import unicode_literals

import sys
from testinfra.host import get_host
from testinfra.host import get_hosts

__all__ = ['get_host', 'get_hosts']

if sys.version_info[0] == 2:
    import warnings

    class TestinfraDeprecationWarning(Warning):
        pass

    warnings.simplefilter("default", TestinfraDeprecationWarning)
    warnings.warn(
        'DEPRECATION: testinfra python2 support is unmaintained, please '
        'upgrade to python3', category=TestinfraDeprecationWarning,
        stacklevel=1)
