You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2024/06/20 11:38:28 UTC
(allura) branch dw/pymongo4 updated (4ddfcc1df -> 6cd8656f4)
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a change to branch dw/pymongo4
in repository https://gitbox.apache.org/repos/asf/allura.git
from 4ddfcc1df update ming calls from find_and_modify to find_one_and_update
new 58badb930 replace deprecated ming/mongo database_names() with list_database_names()
new e86a182b8 replace deprecated ming/mongo collection_names() with list_collection_names()
new 6cd8656f4 remove ming/pymongo map_reduce and inline_map_reduce. no longer provided by mongo
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Allura/allura/lib/custom_middleware.py | 6 +++---
Allura/allura/websetup/bootstrap.py | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
(allura) 01/03: replace deprecated ming/mongo database_names() with list_database_names()
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch dw/pymongo4
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 58badb930c316c8a1ea7799cb43509922fed7f80
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Jun 19 15:27:44 2024 -0400
replace deprecated ming/mongo database_names() with list_database_names()
---
Allura/allura/websetup/bootstrap.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 21cfa6781..981df8438 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -279,10 +279,10 @@ def wipe_database():
conn = M.main_doc_session.bind.conn
if isinstance(conn, mim.Connection):
clear_all_database_tables()
- for db in conn.database_names():
+ for db in conn.list_database_names():
db = conn[db]
else:
- for database in conn.database_names():
+ for database in conn.list_database_names():
if database not in ('allura', 'pyforge', 'project-data'):
continue
log.info('Wiping database %s', database)
@@ -299,7 +299,7 @@ def wipe_database():
def clear_all_database_tables():
conn = M.main_doc_session.bind.conn
- for db in conn.database_names():
+ for db in conn.list_database_names():
db = conn[db]
for coll in list(db.collection_names()):
if coll == 'system.indexes':
(allura) 02/03: replace deprecated ming/mongo collection_names() with list_collection_names()
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch dw/pymongo4
in repository https://gitbox.apache.org/repos/asf/allura.git
commit e86a182b88a75227613de79326a79d39e83ff9df
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Jun 19 15:28:05 2024 -0400
replace deprecated ming/mongo collection_names() with list_collection_names()
---
Allura/allura/websetup/bootstrap.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 981df8438..78a602d54 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -287,7 +287,7 @@ def wipe_database():
continue
log.info('Wiping database %s', database)
db = conn[database]
- for coll in list(db.collection_names()):
+ for coll in list(db.list_collection_names()):
if coll.startswith('system.'):
continue
log.info('Dropping collection %s:%s', database, coll)
@@ -301,7 +301,7 @@ def clear_all_database_tables():
conn = M.main_doc_session.bind.conn
for db in conn.list_database_names():
db = conn[db]
- for coll in list(db.collection_names()):
+ for coll in list(db.list_collection_names()):
if coll == 'system.indexes':
continue
db.drop_collection(coll)
(allura) 03/03: remove ming/pymongo map_reduce and inline_map_reduce. no longer provided by mongo
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch dw/pymongo4
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 6cd8656f4bc93fa2abeb04f39c431ef7971b2d91
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Jun 19 15:28:45 2024 -0400
remove ming/pymongo map_reduce and inline_map_reduce. no longer provided by mongo
---
Allura/allura/lib/custom_middleware.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py
index 16ca53479..1baf4c4f1 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -328,7 +328,7 @@ class AlluraTimerMiddleware(TimerMiddleware):
'insert_now', 'update_now', 'delete_now',
'find', 'find_one_and_update', 'find_one_and_replace', 'find_one_and_delete',
'remove', 'update', 'update_if_not_modified',
- 'aggregate', 'group', 'map_reduce', 'inline_map_reduce', 'distinct',
+ 'aggregate', 'group', 'distinct',
),
# Timer('ming', ming.schema.Document, 'validate',
# debug_each_call=False),
@@ -336,8 +336,8 @@ class AlluraTimerMiddleware(TimerMiddleware):
# '_validate_fast_missing', '_validate_optional',
# debug_each_call=False),
Timer('mongo', pymongo.collection.Collection, 'count', 'find',
- 'find_one', 'aggregate', 'group', 'map_reduce',
- 'inline_map_reduce', 'find_one_and_update', 'find_one_and_replace', 'find_one_and_delete',
+ 'find_one', 'aggregate', 'group',
+ 'find_one_and_update', 'find_one_and_replace', 'find_one_and_delete',
'insert', 'save', 'update', 'remove', 'drop'),
Timer('mongo', pymongo.cursor.Cursor, 'count', 'distinct',
'_refresh'),