allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [allura] 03/13: [#7878] ming needs this to be "str" (not py2 unicode) Can revert when fully on py3 (str/unicode there is ok)
Date Fri, 24 Jan 2020 18:58:56 GMT
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit e9d825a29a5d8badca5eca8c763ce4399adcb07c
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
AuthorDate: Thu Jan 16 18:17:16 2020 +0000

    [#7878] ming needs this to be "str" (not py2 unicode)  Can revert when fully on py3 (str/unicode
there is ok)
---
 Allura/allura/model/artifact.py                | 22 +++++++++++-----------
 Allura/allura/model/attachments.py             |  2 +-
 Allura/allura/model/auth.py                    | 14 +++++++-------
 Allura/allura/model/discuss.py                 | 10 +++++-----
 Allura/allura/model/filesystem.py              |  2 +-
 Allura/allura/model/index.py                   |  4 ++--
 Allura/allura/model/monq_model.py              |  2 +-
 Allura/allura/model/multifactor.py             |  4 ++--
 Allura/allura/model/neighborhood.py            |  2 +-
 Allura/allura/model/notification.py            |  6 +++---
 Allura/allura/model/oauth.py                   | 10 +++++-----
 Allura/allura/model/project.py                 |  8 ++++----
 Allura/allura/model/repository.py              | 10 +++++-----
 Allura/allura/model/stats.py                   |  2 +-
 Allura/allura/model/webhook.py                 |  2 +-
 Allura/allura/tests/model/test_artifact.py     |  2 +-
 ForgeBlog/forgeblog/model/blog.py              |  8 ++++----
 ForgeChat/forgechat/model/chat.py              |  4 ++--
 ForgeDiscussion/forgediscussion/model/forum.py | 10 +++++-----
 ForgeFeedback/forgefeedback/model/feedback.py  |  2 +-
 ForgeGit/forgegit/model/git_repo.py            |  2 +-
 ForgeSVN/forgesvn/model/svn.py                 |  2 +-
 ForgeShortUrl/forgeshorturl/model/shorturl.py  |  2 +-
 ForgeTracker/forgetracker/model/ticket.py      | 12 ++++++------
 ForgeUserStats/forgeuserstats/model/stats.py   |  2 +-
 ForgeWiki/forgewiki/model/wiki.py              |  8 ++++----
 26 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index 89f2159..71a22ee 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -65,7 +65,7 @@ class Artifact(MappedClass, SearchIndexable):
     """
     class __mongometa__:
         session = artifact_orm_session
-        name = 'artifact'
+        name = str('artifact')
         indexes = [
             ('app_config_id', 'labels'),
         ]
@@ -492,7 +492,7 @@ class Snapshot(Artifact):
     """
     class __mongometa__:
         session = artifact_orm_session
-        name = 'artifact_snapshot'
+        name = str('artifact_snapshot')
         unique_indexes = [('artifact_class', 'artifact_id', 'version')]
         indexes = [('artifact_id', 'version'),
                    'author.id',
@@ -568,7 +568,7 @@ class VersionedArtifact(Artifact):
     """
     class __mongometa__:
         session = artifact_orm_session
-        name = 'versioned_artifact'
+        name = str('versioned_artifact')
         history_class = Snapshot
 
     version = FieldProperty(S.Int, if_missing=0)
@@ -687,7 +687,7 @@ class Message(Artifact):
 
     class __mongometa__:
         session = artifact_orm_session
-        name = 'message'
+        name = str('message')
     type_s = 'Generic Message'
 
     _id = FieldProperty(str, if_missing=h.gen_message_id)
@@ -735,7 +735,7 @@ class AwardFile(File):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'award_file'
+        name = str('award_file')
     award_id = FieldProperty(S.ObjectId)
 
 
@@ -743,7 +743,7 @@ class Award(Artifact):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'award'
+        name = str('award')
         indexes = ['short']
     type_s = 'Generic Award'
 
@@ -786,7 +786,7 @@ class AwardGrant(Artifact):
     "An :class:`Award <allura.model.artifact.Award>` can be bestowed upon a project
by a neighborhood"
     class __mongometa__:
         session = main_orm_session
-        name = 'grant'
+        name = str('grant')
         indexes = ['short']
     type_s = 'Generic Award Grant'
 
@@ -858,7 +858,7 @@ class Feed(MappedClass):
     """
     class __mongometa__:
         session = project_orm_session
-        name = 'artifact_feed'
+        name = str('artifact_feed')
         indexes = [
             'pubdate',
             ('artifact_ref.project_id', 'artifact_ref.mount_point'),
@@ -997,7 +997,7 @@ class VotableArtifact(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'vote'
+        name = str('vote')
 
     votes = FieldProperty(int, if_missing=0)
     votes_up = FieldProperty(int, if_missing=0)
@@ -1124,7 +1124,7 @@ class MovedArtifact(Artifact):
 
     class __mongometa__:
         session = artifact_orm_session
-        name = 'moved_artifact'
+        name = str('moved_artifact')
 
     _id = FieldProperty(S.ObjectId)
     app_config_id = ForeignIdProperty(
@@ -1136,7 +1136,7 @@ class MovedArtifact(Artifact):
 class SpamCheckResult(MappedClass):
     class __mongometa__:
         session = main_orm_session
-        name = 'spam_check_result'
+        name = str('spam_check_result')
         indexes = [
             ('project_id', 'result'),
             ('user_id', 'result'),
diff --git a/Allura/allura/model/attachments.py b/Allura/allura/model/attachments.py
index ad5549b..b62cd80 100644
--- a/Allura/allura/model/attachments.py
+++ b/Allura/allura/model/attachments.py
@@ -31,7 +31,7 @@ class BaseAttachment(File):
     ArtifactType = None
 
     class __mongometa__:
-        name = 'attachment'
+        name = str('attachment')
         polymorphic_on = 'attachment_type'
         polymorphic_identity = None
         session = project_orm_session
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 12571a9..fdda9ca 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -68,7 +68,7 @@ class EmailAddress(MappedClass):
     re_format = re.compile('^.*\s+<(.*)>\s*$')
 
     class __mongometa__:
-        name = 'email_address'
+        name = str('email_address')
         session = main_orm_session
         indexes = ['nonce', ]
         unique_indexes = [('email', 'claimed_by_user_id'), ]
@@ -176,7 +176,7 @@ please visit the following URL:
 
 class AuthGlobals(MappedClass):
     class __mongometa__:
-        name = 'auth_globals'
+        name = str('auth_globals')
         session = main_orm_session
 
     _id = FieldProperty(int)
@@ -225,7 +225,7 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
     SALT_LEN = 8
 
     class __mongometa__:
-        name = 'user'
+        name = str('user')
         session = main_orm_session
         indexes = ['tool_data.sfx.userid', 'tool_data.AuthPasswordReset.hash']
         unique_indexes = ['username']
@@ -818,7 +818,7 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
 class OldProjectRole(MappedClass):
     class __mongometa__:
         session = project_orm_session
-        name = 'user'
+        name = str('user')
         unique_indexes = [('user_id', 'project_id', 'name')]
 
 
@@ -836,7 +836,7 @@ class ProjectRole(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'project_role'
+        name = str('project_role')
         unique_indexes = [('user_id', 'project_id', 'name')]
         indexes = [
             ('user_id',),
@@ -968,7 +968,7 @@ class ProjectRole(MappedClass):
 
 
 audit_log = collection(
-    'audit_log', main_doc_session,
+    str('audit_log'), main_doc_session,
     Field('_id', S.ObjectId()),
     Field('project_id', S.ObjectId, if_missing=None,
           index=True),  # main view of audit log queries by project_id
@@ -1039,7 +1039,7 @@ class UserLoginDetails(MappedClass):
     """
 
     class __mongometa__:
-        name = 'user_login_details'
+        name = str('user_login_details')
         session = main_explicitflush_orm_session
         indexes = ['user_id']
         unique_indexes = [('user_id', 'ip', 'ua'),  # DuplicateKeyError checked in add_login_detail
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index ed3db2f..c0b559a 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -49,7 +49,7 @@ log = logging.getLogger(__name__)
 class Discussion(Artifact, ActivityObject):
 
     class __mongometa__:
-        name = 'discussion'
+        name = str('discussion')
     type_s = 'Discussion'
 
     parent_id = FieldProperty(schema.Deprecated)
@@ -134,7 +134,7 @@ class Discussion(Artifact, ActivityObject):
 class Thread(Artifact, ActivityObject):
 
     class __mongometa__:
-        name = 'thread'
+        name = str('thread')
         indexes = [
             ('artifact_id',),
             ('ref_id',),
@@ -458,7 +458,7 @@ class Thread(Artifact, ActivityObject):
 class PostHistory(Snapshot):
 
     class __mongometa__:
-        name = 'post_history'
+        name = str('post_history')
 
     artifact_id = ForeignIdProperty('Post')
 
@@ -493,7 +493,7 @@ class PostHistory(Snapshot):
 class Post(Message, VersionedArtifact, ActivityObject, ReactableArtifact):
 
     class __mongometa__:
-        name = 'post'
+        name = str('post')
         history_class = PostHistory
         indexes = [
             # used in general lookups, last_post, etc
@@ -817,7 +817,7 @@ class DiscussionAttachment(BaseAttachment):
     thumbnail_size = (100, 100)
 
     class __mongometa__:
-        polymorphic_identity = 'DiscussionAttachment'
+        polymorphic_identity = str('DiscussionAttachment')
         indexes = ['filename', 'discussion_id', 'thread_id', 'post_id']
 
     discussion_id = FieldProperty(schema.ObjectId)
diff --git a/Allura/allura/model/filesystem.py b/Allura/allura/model/filesystem.py
index e1c1bed..70f335b 100644
--- a/Allura/allura/model/filesystem.py
+++ b/Allura/allura/model/filesystem.py
@@ -47,7 +47,7 @@ class File(MappedClass):
 
     class __mongometa__:
         session = project_orm_session
-        name = 'fs'
+        name = str('fs')
         indexes = ['filename']
 
     _id = FieldProperty(schema.ObjectId)
diff --git a/Allura/allura/model/index.py b/Allura/allura/model/index.py
index f468608..02edea3 100644
--- a/Allura/allura/model/index.py
+++ b/Allura/allura/model/index.py
@@ -42,7 +42,7 @@ log = logging.getLogger(__name__)
 
 # Collection definitions
 ArtifactReferenceDoc = collection(
-    'artifact_reference', main_doc_session,
+    str('artifact_reference'), main_doc_session,
     Field('_id', str),
     Field('artifact_reference', dict(
         cls=S.Binary(),
@@ -54,7 +54,7 @@ ArtifactReferenceDoc = collection(
 )
 
 ShortlinkDoc = collection(
-    'shortlink', main_doc_session,
+    str('shortlink'), main_doc_session,
     Field('_id', S.ObjectId()),
     # index needed for from_artifact() and index_tasks.py:del_artifacts
     Field('ref_id', str, index=True),
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index 97db4e2..ded8229 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -65,7 +65,7 @@ class MonQTask(MappedClass):
 
     class __mongometa__:
         session = task_orm_session
-        name = 'monq_task'
+        name = str('monq_task')
         indexes = [
             [
                 # used in MonQTask.get() method
diff --git a/Allura/allura/model/multifactor.py b/Allura/allura/model/multifactor.py
index 5f6c6ee..d67bcb1 100644
--- a/Allura/allura/model/multifactor.py
+++ b/Allura/allura/model/multifactor.py
@@ -34,7 +34,7 @@ class TotpKey(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'multifactor_totp'
+        name = str('multifactor_totp')
         unique_indexes = ['user_id']
 
     _id = FieldProperty(S.ObjectId)
@@ -49,7 +49,7 @@ class RecoveryCode(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'multifactor_recovery_code'
+        name = str('multifactor_recovery_code')
         indexes = ['user_id']
 
     _id = FieldProperty(S.ObjectId)
diff --git a/Allura/allura/model/neighborhood.py b/Allura/allura/model/neighborhood.py
index ac40a13..f030077 100644
--- a/Allura/allura/model/neighborhood.py
+++ b/Allura/allura/model/neighborhood.py
@@ -63,7 +63,7 @@ class Neighborhood(MappedClass):
     '''
     class __mongometa__:
         session = main_orm_session
-        name = 'neighborhood'
+        name = str('neighborhood')
         unique_indexes = ['url_prefix']
 
     _id = FieldProperty(S.ObjectId)
diff --git a/Allura/allura/model/notification.py b/Allura/allura/model/notification.py
index 4ea53eb..e085897 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -73,7 +73,7 @@ class Notification(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'notification'
+        name = str('notification')
         indexes = ['project_id']
 
     _id = FieldProperty(str, if_missing=h.gen_message_id)
@@ -388,7 +388,7 @@ class Mailbox(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'mailbox'
+        name = str('mailbox')
         unique_indexes = [
             ('user_id', 'project_id', 'app_config_id',
              'artifact_index_id', 'topic', 'is_flash'),
@@ -710,7 +710,7 @@ class SiteNotification(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'site_notification'
+        name = str('site_notification')
         indexes = [
             ('active', '_id'),
         ]
diff --git a/Allura/allura/model/oauth.py b/Allura/allura/model/oauth.py
index b1d324d..e2016ae 100644
--- a/Allura/allura/model/oauth.py
+++ b/Allura/allura/model/oauth.py
@@ -40,7 +40,7 @@ class OAuthToken(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'oauth_token'
+        name = str('oauth_token')
         indexes = ['api_key']
         polymorphic_on = 'type'
         polymorphic_identity = None
@@ -60,8 +60,8 @@ class OAuthToken(MappedClass):
 class OAuthConsumerToken(OAuthToken):
 
     class __mongometa__:
-        polymorphic_identity = 'consumer'
-        name = 'oauth_consumer_token'
+        polymorphic_identity = str('consumer')
+        name = str('oauth_consumer_token')
         unique_indexes = [('name', 'user_id')]
 
     type = FieldProperty(str, if_missing='consumer')
@@ -105,7 +105,7 @@ class OAuthConsumerToken(OAuthToken):
 class OAuthRequestToken(OAuthToken):
 
     class __mongometa__:
-        polymorphic_identity = 'request'
+        polymorphic_identity = str('request')
 
     type = FieldProperty(str, if_missing='request')
     consumer_token_id = ForeignIdProperty('OAuthConsumerToken')
@@ -119,7 +119,7 @@ class OAuthRequestToken(OAuthToken):
 class OAuthAccessToken(OAuthToken):
 
     class __mongometa__:
-        polymorphic_identity = 'access'
+        polymorphic_identity = str('access')
 
     type = FieldProperty(str, if_missing='access')
     consumer_token_id = ForeignIdProperty('OAuthConsumerToken')
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 1ed8c72..d6461b5 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -86,7 +86,7 @@ class ProjectCategory(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'project_category'
+        name = str('project_category')
 
     _id = FieldProperty(S.ObjectId)
     parent_id = FieldProperty(S.ObjectId, if_missing=None)
@@ -119,7 +119,7 @@ class TroveCategory(MappedClass):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'trove_category'
+        name = str('trove_category')
         extensions = [TroveCategoryMapperExtension]
         indexes = ['trove_cat_id', 'trove_parent_id', 'shortname', 'fullpath']
 
@@ -192,7 +192,7 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
 
     class __mongometa__:
         session = main_orm_session
-        name = 'project'
+        name = str('project')
         indexes = [
             'name',
             'neighborhood_id',
@@ -1301,7 +1301,7 @@ class AppConfig(MappedClass, ActivityObject):
 
     class __mongometa__:
         session = project_orm_session
-        name = 'config'
+        name = str('config')
         indexes = [
             'project_id',
             'options.import_id',
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 512dd68..cf688df 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -344,7 +344,7 @@ class Repository(Artifact, ActivityObject):
     BATCH_SIZE = 100
 
     class __mongometa__:
-        name = 'generic-repository'
+        name = str('generic-repository')
         indexes = ['upstream_repo.name']
     _impl = None
     repo_id = 'repo'
@@ -794,7 +794,7 @@ class MergeRequest(VersionedArtifact, ActivityObject):
     statuses = ['open', 'merged', 'rejected']
 
     class __mongometa__:
-        name = 'merge-request'
+        name = str('merge-request')
         indexes = ['commit_id', 'creator_id']
         unique_indexes = [('app_config_id', 'request_number')]
     type_s = 'MergeRequest'
@@ -989,7 +989,7 @@ class MergeRequest(VersionedArtifact, ActivityObject):
 # One of these for each commit in the physical repo on disk. The _id is the
 # hexsha of the commit (for Git and Hg).
 CommitDoc = collection(
-    'repo_ci', main_doc_session,
+    str('repo_ci'), main_doc_session,
     Field('_id', str),
     Field('tree_id', str),
     Field('committed', SUser),
@@ -1001,7 +1001,7 @@ CommitDoc = collection(
 
 # Basic tree information
 TreeDoc = collection(
-    'repo_tree', main_doc_session,
+    str('repo_tree'), main_doc_session,
     Field('_id', str),
     Field('tree_ids', [dict(name=str, id=str)]),
     Field('blob_ids', [dict(name=str, id=str)]),
@@ -1009,7 +1009,7 @@ TreeDoc = collection(
 
 # Information about the last commit to touch a tree
 LastCommitDoc = collection(
-    'repo_last_commit', main_doc_session,
+    str('repo_last_commit'), main_doc_session,
     Field('_id', S.ObjectId()),
     Field('commit_id', str),
     Field('path', str),
diff --git a/Allura/allura/model/stats.py b/Allura/allura/model/stats.py
index 726f08a..9cee2e2 100644
--- a/Allura/allura/model/stats.py
+++ b/Allura/allura/model/stats.py
@@ -33,7 +33,7 @@ from allura.model.session import main_orm_session
 class Stats(MappedClass):
 
     class __mongometa__:
-        name = 'basestats'
+        name = str('basestats')
         session = main_orm_session
         unique_indexes = ['_id']
 
diff --git a/Allura/allura/model/webhook.py b/Allura/allura/model/webhook.py
index b4810d2..5f923ca 100644
--- a/Allura/allura/model/webhook.py
+++ b/Allura/allura/model/webhook.py
@@ -30,7 +30,7 @@ import six
 
 class Webhook(Artifact):
     class __mongometa__:
-        name = 'webhook'
+        name = str('webhook')
         unique_indexes = [('app_config_id', 'type', 'hook_url')]
 
     type = FieldProperty(str)
diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py
index 06b2b2a..e9d617b 100644
--- a/Allura/allura/tests/model/test_artifact.py
+++ b/Allura/allura/tests/model/test_artifact.py
@@ -46,7 +46,7 @@ from forgewiki import model as WM
 class Checkmessage(M.Message):
 
     class __mongometa__:
-        name = 'checkmessage'
+        name = str('checkmessage')
 
     def url(self):
         return ''
diff --git a/ForgeBlog/forgeblog/model/blog.py b/ForgeBlog/forgeblog/model/blog.py
index e2c536d..83e8161 100644
--- a/ForgeBlog/forgeblog/model/blog.py
+++ b/ForgeBlog/forgeblog/model/blog.py
@@ -43,7 +43,7 @@ config = utils.ConfigProxy(
 class Globals(MappedClass):
 
     class __mongometa__:
-        name = 'blog-globals'
+        name = str('blog-globals')
         session = M.project_orm_session
         indexes = ['app_config_id']
 
@@ -57,7 +57,7 @@ class Globals(MappedClass):
 class BlogPostSnapshot(M.Snapshot):
 
     class __mongometa__:
-        name = 'blog_post_snapshot'
+        name = str('blog_post_snapshot')
     type_s = 'Blog Post Snapshot'
 
     def original(self):
@@ -102,7 +102,7 @@ class BlogPostSnapshot(M.Snapshot):
 class BlogPost(M.VersionedArtifact, ActivityObject):
 
     class __mongometa__:
-        name = 'blog_post'
+        name = str('blog_post')
         history_class = BlogPostSnapshot
         unique_indexes = [('app_config_id', 'slug')]
         indexes = [
@@ -334,7 +334,7 @@ class BlogAttachment(M.BaseAttachment):
     thumbnail_size = (100, 100)
 
     class __mongometa__:
-        polymorphic_identity = 'BlogAttachment'
+        polymorphic_identity = str('BlogAttachment')
     attachment_type = FieldProperty(str, if_missing='BlogAttachment')
 
 
diff --git a/ForgeChat/forgechat/model/chat.py b/ForgeChat/forgechat/model/chat.py
index 7513f8e..e444438 100644
--- a/ForgeChat/forgechat/model/chat.py
+++ b/ForgeChat/forgechat/model/chat.py
@@ -29,7 +29,7 @@ from allura.model.types import MarkdownCache
 class ChatChannel(MappedClass):
 
     class __mongometa__:
-        name = 'globals'
+        name = str('globals')
         session = M.main_orm_session
         indexes = ['project_id']
         unique_indexes = ['channel']
@@ -43,7 +43,7 @@ class ChatChannel(MappedClass):
 class ChatMessage(M.Artifact):
 
     class __mongometa__:
-        name = 'chat_message'
+        name = str('chat_message')
         indexes = ['timestamp']
     type_s = 'Chat Message'
 
diff --git a/ForgeDiscussion/forgediscussion/model/forum.py b/ForgeDiscussion/forgediscussion/model/forum.py
index e4e1b98..1916f55 100644
--- a/ForgeDiscussion/forgediscussion/model/forum.py
+++ b/ForgeDiscussion/forgediscussion/model/forum.py
@@ -42,7 +42,7 @@ log = logging.getLogger(__name__)
 class Forum(M.Discussion):
 
     class __mongometa__:
-        name = 'forum'
+        name = str('forum')
     type_s = 'Discussion'
 
     parent_id = FieldProperty(schema.ObjectId, if_missing=None)
@@ -138,7 +138,7 @@ class Forum(M.Discussion):
 class ForumThread(M.Thread):
 
     class __mongometa__:
-        name = 'forum_thread'
+        name = str('forum_thread')
         indexes = [
             'flags',
             'discussion_id',
@@ -209,7 +209,7 @@ class ForumThread(M.Thread):
 class ForumPostHistory(M.PostHistory):
 
     class __mongometa__:
-        name = 'post_history'
+        name = str('post_history')
 
     artifact_id = ForeignIdProperty('ForumPost')
 
@@ -217,7 +217,7 @@ class ForumPostHistory(M.PostHistory):
 class ForumPost(M.Post):
 
     class __mongometa__:
-        name = 'forum_post'
+        name = str('forum_post')
         history_class = ForumPostHistory
         indexes = [
             'timestamp',  # for the posts_24hr site_stats query
@@ -253,7 +253,7 @@ class ForumAttachment(M.DiscussionAttachment):
     PostClass = ForumPost
 
     class __mongometa__:
-        polymorphic_identity = 'ForumAttachment'
+        polymorphic_identity = str('ForumAttachment')
     attachment_type = FieldProperty(str, if_missing='ForumAttachment')
 
 
diff --git a/ForgeFeedback/forgefeedback/model/feedback.py b/ForgeFeedback/forgefeedback/model/feedback.py
index b3e566f..0dc78a2 100755
--- a/ForgeFeedback/forgefeedback/model/feedback.py
+++ b/ForgeFeedback/forgefeedback/model/feedback.py
@@ -41,7 +41,7 @@ log = logging.getLogger(__name__)
 class Feedback(VersionedArtifact, ActivityObject):
 
     class __mongometa__:
-        name = 'feedback'
+        name = str('feedback')
         indexes = [
             ('project_id', 'reported_by_id'),
         ]
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 7cb4bcf..67e0081 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -64,7 +64,7 @@ class Repository(M.Repository):
     type_s = 'Git Repository'
 
     class __mongometa__:
-        name = 'git-repository'
+        name = str('git-repository')
 
     @LazyProperty
     def _impl(self):
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index fdf7bf1..b9f1ecc 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -56,7 +56,7 @@ class Repository(M.Repository):
     type_s = 'SVN Repository'
 
     class __mongometa__:
-        name = 'svn-repository'
+        name = str('svn-repository')
     branches = FieldProperty([dict(name=str, object_id=str)])
     _refresh_precompute = False
 
diff --git a/ForgeShortUrl/forgeshorturl/model/shorturl.py b/ForgeShortUrl/forgeshorturl/model/shorturl.py
index b1c2559..98fecae 100644
--- a/ForgeShortUrl/forgeshorturl/model/shorturl.py
+++ b/ForgeShortUrl/forgeshorturl/model/shorturl.py
@@ -28,7 +28,7 @@ from allura import model as M
 class ShortUrl(M.Artifact):
 
     class __mongometa__:
-        name = 'short_urls'
+        name = str('short_urls')
         unique_indexes = [('short_name', 'app_config_id')]
 
     type_s = 'ShortUrl'
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 52563d7..6824e42 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -95,7 +95,7 @@ config = utils.ConfigProxy(
 class Globals(MappedClass):
 
     class __mongometa__:
-        name = 'globals'
+        name = str('globals')
         session = project_orm_session
         indexes = ['app_config_id']
 
@@ -540,7 +540,7 @@ class Globals(MappedClass):
 class TicketHistory(Snapshot):
 
     class __mongometa__:
-        name = 'ticket_history'
+        name = str('ticket_history')
 
     def original(self):
         return Ticket.query.get(_id=self.artifact_id)
@@ -586,7 +586,7 @@ class TicketHistory(Snapshot):
 class Bin(Artifact, ActivityObject):
 
     class __mongometa__:
-        name = 'bin'
+        name = str('bin')
 
     type_s = 'Bin'
     _id = FieldProperty(schema.ObjectId)
@@ -628,7 +628,7 @@ class Bin(Artifact, ActivityObject):
 class Ticket(VersionedArtifact, ActivityObject, VotableArtifact):
 
     class __mongometa__:
-        name = 'ticket'
+        name = str('ticket')
         history_class = TicketHistory
         indexes = [
             'ticket_num',
@@ -1368,7 +1368,7 @@ class TicketAttachment(BaseAttachment):
     ArtifactType = Ticket
 
     class __mongometa__:
-        polymorphic_identity = 'TicketAttachment'
+        polymorphic_identity = str('TicketAttachment')
     attachment_type = FieldProperty(str, if_missing='TicketAttachment')
 
 
@@ -1376,7 +1376,7 @@ class MovedTicket(MovedArtifact):
 
     class __mongometa__:
         session = artifact_orm_session
-        name = 'moved_ticket'
+        name = str('moved_ticket')
         indexes = [
             ('app_config_id', 'ticket_num'),
         ]
diff --git a/ForgeUserStats/forgeuserstats/model/stats.py b/ForgeUserStats/forgeuserstats/model/stats.py
index 4ac9bd6..1298a09 100644
--- a/ForgeUserStats/forgeuserstats/model/stats.py
+++ b/ForgeUserStats/forgeuserstats/model/stats.py
@@ -30,7 +30,7 @@ from allura.model import Stats
 class UserStats(Stats):
 
     class __mongometa__:
-        name = 'userstats'
+        name = str('userstats')
         session = main_orm_session
         unique_indexes = ['_id', 'user_id']
 
diff --git a/ForgeWiki/forgewiki/model/wiki.py b/ForgeWiki/forgewiki/model/wiki.py
index 2d1b71c..a829e10 100644
--- a/ForgeWiki/forgewiki/model/wiki.py
+++ b/ForgeWiki/forgewiki/model/wiki.py
@@ -55,7 +55,7 @@ config = utils.ConfigProxy(
 class Globals(MappedClass):
 
     class __mongometa__:
-        name = 'wiki-globals'
+        name = str('wiki-globals')
         session = project_orm_session
         indexes = ['app_config_id']
 
@@ -69,7 +69,7 @@ class Globals(MappedClass):
 class PageHistory(Snapshot):
 
     class __mongometa__:
-        name = 'page_history'
+        name = str('page_history')
 
     def original(self):
         return Page.query.get(_id=self.artifact_id)
@@ -105,7 +105,7 @@ class PageHistory(Snapshot):
 class Page(VersionedArtifact, ActivityObject):
 
     class __mongometa__:
-        name = 'page'
+        name = str('page')
         history_class = PageHistory
         unique_indexes = [('app_config_id', 'title')]
 
@@ -282,7 +282,7 @@ class WikiAttachment(BaseAttachment):
     thumbnail_size = (100, 100)
 
     class __mongometa__:
-        polymorphic_identity = 'WikiAttachment'
+        polymorphic_identity = str('WikiAttachment')
     attachment_type = FieldProperty(str, if_missing='WikiAttachment')
 
 Mapper.compile_all()


Mime
View raw message