Adding python 3.3 to test environment, mani fixes

Added python 3.3 to test-suite

Removed unused import

Removed unused import

Migrated to EAFP for attribute checking

Bumped version of ModulePickling for migration to hashlib

Added py33 environment to tox

Fixed issue with package importing on python 3.3
This commit is contained in:
Aldo Stracquadanio
2013-03-24 10:14:14 +00:00
parent 3ef564847d
commit 07ec134bc9
6 changed files with 15 additions and 12 deletions

View File

@@ -9,7 +9,6 @@ will be dropped, we'll get rid of most code.
import sys
import imp
import os
import io
try:
import importlib
except:
@@ -31,11 +30,14 @@ def find_module_py33(string, path=None):
raise ImportError
try:
filename = importing.get_filename(string)
if filename and os.path.exists(filename):
returning = (open(filename, 'U'), filename, False)
if (importing.is_package(string)):
returning = (None, os.path.dirname(importing.path), True)
else:
returning = (None, filename, False)
filename = importing.get_filename(string)
if filename and os.path.exists(filename):
returning = (open(filename, 'U'), filename, False)
else:
returning = (None, filename, False)
except AttributeError:
returning = (None, importing.load_module(string).__name__, False)