# HG changeset patch # User Martin Bornhold # Date 2016-09-20 13:15:12 # Node ID e970000e18092b79f513c5117229799266564d85 # Parent 73741d3984172c400eda134fd04fbfe5a9dbcbe1 models: Remove unused imports. diff --git a/rhodecode/lib/caches.py b/rhodecode/lib/caches.py --- a/rhodecode/lib/caches.py +++ b/rhodecode/lib/caches.py @@ -24,9 +24,10 @@ import logging import threading from beaker.cache import _cache_decorate, cache_regions, region_invalidate +from sqlalchemy.exc import IntegrityError from rhodecode.lib.utils import safe_str, md5 -from rhodecode.model.db import Session, CacheKey, IntegrityError +from rhodecode.model.db import Session, CacheKey log = logging.getLogger(__name__) diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -24,7 +24,6 @@ Database Models for RhodeCode Enterprise import re import os -import sys import time import hashlib import logging @@ -37,29 +36,25 @@ import collections from sqlalchemy import * -from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import ( relationship, joinedload, class_mapper, validates, aliased) from sqlalchemy.sql.expression import true -from beaker.cache import cache_region, region_invalidate +from beaker.cache import cache_region from webob.exc import HTTPNotFound from zope.cachedescriptors.property import Lazy as LazyProperty from pylons import url from pylons.i18n.translation import lazy_ugettext as _ -from rhodecode.lib.vcs import get_backend, get_vcs_instance -from rhodecode.lib.vcs.utils.helpers import get_scm -from rhodecode.lib.vcs.exceptions import VCSError -from rhodecode.lib.vcs.backends.base import ( - EmptyCommit, Reference, MergeFailureReason) +from rhodecode.lib.vcs import get_vcs_instance +from rhodecode.lib.vcs.backends.base import EmptyCommit, Reference from rhodecode.lib.utils2 import ( - str2bool, safe_str, get_commit_safe, safe_unicode, remove_prefix, md5_safe, + str2bool, safe_str, get_commit_safe, safe_unicode, md5_safe, time_to_datetime, aslist, Optional, safe_int, get_clone_url, AttributeDict, glob2re) -from rhodecode.lib.jsonalchemy import MutationObj, MutationList, JsonType, JSONDict +from rhodecode.lib.jsonalchemy import MutationObj, MutationList, JsonType from rhodecode.lib.ext_json import json from rhodecode.lib.caching_query import FromCache from rhodecode.lib.encrypt import AESCipher