Commits

Andy Mikhailenko  committed cd12681

Fixed comments; removed unused imports everywhere.

  • Participants
  • Parent commits 1648ad2

Comments (0)

Files changed (28)

File doqu/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 from document_base import Document, Many
 from utils import get_db, load_fixture

File doqu/backend_base.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 Backend API

File doqu/dist.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 """
 Distribution internals
 ======================

File doqu/document_base.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 Document API
 import copy
 import logging
 import types
-import re
 
 import validators
 from utils import camel_case_to_underscores
-from utils.data_structures import DotDict, ProxyDict, ReprMixin
+from utils.data_structures import DotDict, ReprMixin
 
 
 __all__ = ['Document', 'Many']

File doqu/ext/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.

File doqu/ext/fields/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 """
 Document Fields
 ===============
 
     This abstraction is by no means a complete replacement for the normal
     approach of semantic grouping. Please use it with care. Also note that the
-    API can change. The class can even be removed in future versions of Docu.
+    API can change. The class can even be removed in future versions of Doqu.
 
 """
 from .base import Field

File doqu/ext/fields/files.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 """
 File-related Fields
 ===================

File doqu/ext/forms.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 WTForms extension
 import wtforms
 import wtforms.ext
 
-from doqu import Document
 from doqu.document_base import OneToManyRelation, _get_related_document_class # XXX
-from doqu.validators import Required, Optional, AnyOf
+from doqu.validators import Required, AnyOf
 
 
 __all__ = (
     :param document_class:
         the Doqu document class for which the form should be created
     :param storage:
-        a Docu-compatible storage; we need it to generate lists of choices
+        a Doqu-compatible storage; we need it to generate lists of choices
         for references to other models. If not defined, references will not
         appear in the form.
 

File doqu/ext/mongodb/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 MongoDB extension
     involving complex queries. Patches, improvements, rewrites are welcome.
 
 """
-import warnings
-
 from doqu import dist
 dist.check_dependencies(__name__)
 

File doqu/ext/mongodb/converters.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 import datetime
 import decimal

File doqu/ext/mongodb/lookups.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
-import datetime
 from functools import wraps
 import re
 
 
 class MongoLookupManager(LookupManager):
     """
-    Lookup manager for the Docu's MongoDB adapter.
+    Lookup manager for the Doqu's MongoDB adapter.
     """
     def combine_conditions(self, conditions):
         """

File doqu/ext/shelve_db/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 
 """

File doqu/ext/shelve_db/converters.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 import datetime
 import decimal
-import re
 
 from doqu.backend_base import ConverterManager
 from doqu.document_base import Document

File doqu/ext/shelve_db/lookups.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
-import datetime
 from functools import wraps
 import re
 

File doqu/ext/shove_db/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 
 """
 
 """
 
-import uuid
-
 from doqu import dist
 dist.check_dependencies(__name__)
 
 from shove import Shove
 
-from doqu.backend_base import BaseStorageAdapter, BaseQueryAdapter
-from doqu.utils.data_structures import CachedIterator
-
 # reuse most of the shelve extension's code
 from doqu.ext import shelve_db
 

File doqu/ext/tokyo_cabinet/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 
 """
 from doqu import dist
 dist.check_dependencies(__name__)
 
-from decimal import Decimal    # for order_by introspection
 import logging
 
 import tokyo.cabinet as tc
 
 from doqu.backend_base import BaseStorageAdapter, BaseQueryAdapter
-from doqu import utils
 from doqu.utils.data_structures import CachedIterator
 
 from converters import converter_manager

File doqu/ext/tokyo_cabinet/converters.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 import datetime
 import decimal

File doqu/ext/tokyo_cabinet/lookups.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
-import datetime
 from functools import wraps
 import tokyo.cabinet as tc
 

File doqu/ext/tokyo_tyrant/__init__.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 Tokyo Tyrant extension
 # let backend-specific stuff register itself with managers
 import converters
 import lookups
-

File doqu/ext/tokyo_tyrant/converters.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 import datetime
 import decimal

File doqu/ext/tokyo_tyrant/lookups.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
-import datetime
-
-from managers import lookup_manager, converter_manager
+from managers import lookup_manager
 
 
 DEFAULT_OPERATION = 'equals'

File doqu/ext/tokyo_tyrant/managers.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 from doqu.backend_base import ConverterManager, LookupManager
 

File doqu/ext/tokyo_tyrant/query.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
-
-import uuid
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 from doqu.backend_base import BaseQueryAdapter
 

File doqu/ext/tokyo_tyrant/storage.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
-
-import uuid
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 from doqu.backend_base import BaseStorageAdapter
 from managers import converter_manager, lookup_manager

File doqu/future.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 """
 Future features
 ===============

File doqu/utils/__init__.py

 #    Doqu is a lightweight schema/query framework for doqument databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 Utilities
     settings = dict(settings_dict or {})
     settings.update(settings_kwargs)
 
-    # extract the dot-delimited path to the Docu-compatible backend
+    # extract the dot-delimited path to the Doqu-compatible backend
     backend_path = settings.pop('backend')
 
     # import the backend module

File doqu/utils/data_structures.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 from collections import MutableMapping
 

File doqu/validators.py

 #    Doqu is a lightweight schema/query framework for document databases.
 #    Copyright © 2009—2010  Andrey Mikhaylenko
 #
-#    This file is part of Docu.
+#    This file is part of Doqu.
 #
 #    Doqu is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Lesser General Public License as published
 #    GNU Lesser General Public License for more details.
 #
 #    You should have received a copy of the GNU Lesser General Public License
-#    along with Docu.  If not, see <http://gnu.org/licenses/>.
+#    along with Doqu.  If not, see <http://gnu.org/licenses/>.
 
 """
 Validators