diff --git a/tests/spec_test.py b/tests/spec_test.py
index <HASH>..<HASH> 100644
--- a/tests/spec_test.py
+++ b/tests/spec_test.py
@@ -19,6 +19,8 @@ builtins_path = '__builtin__'
 if sys.version_info > (3,):
     builtins_path = 'builtins'
     long = int
+else:
+    builtins_path = 'yapconf.spec'
 
 original_env = None
 original_yaml_flag = yapconf.yaml_support
diff --git a/yapconf/spec.py b/yapconf/spec.py
index <HASH>..<HASH> 100644
--- a/yapconf/spec.py
+++ b/yapconf/spec.py
@@ -3,6 +3,7 @@ import logging
 import json
 import six
 import os
+import sys
 
 from box import Box
 
@@ -11,6 +12,9 @@ from yapconf.exceptions import YapconfSpecError, YapconfLoadError, \
     YapconfItemNotFound
 from yapconf.items import from_specification
 
+if sys.version_info.major < 3:
+    from io import open
+
 
 class YapconfSpec(object):
     """Object which holds your configuration's specification.
Importing `open` from io package in Python 2