File: _compat.py

package info (click to toggle)
python-tinyrpc 0.6-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 352 kB
  • sloc: python: 1,648; makefile: 142; sh: 16
file content (8 lines) | stat: -rw-r--r-- 319 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
# from http://stackoverflow.com/questions/28215214/how-to-add-custom-renames-in-six

import six
mod = six.MovedModule('mock', 'mock', 'unittest.mock')
six.add_move(mod)
six._importer._add_module(mod, "moves." + mod.name)

# issue open at https://bitbucket.org/gutworth/six/issue/116/enable-importing-from-within-custom