History¶
v12.0.0¶
01 Sep 2023
Deprecations and Removals¶
Require pymongo 3.5.
Dropped deprecated methods in helper:
helper.filter_warnings
helper.connect
(#12748811)
v11.5.1¶
01 Sep 2023
Bugfixes¶
Extended the timeout dramatically on Windows, but only when GITHUB_ACTIONS is configured. (#32)
v11.5.0¶
31 Aug 2023
Features¶
Added special handling for MongoDB 7 query plan structure (#35)
Bugfixes¶
Removed MongoDBInstance.mongod_args, removing default to ephemeralForTest storage engine, which no longer exists (#34)
v11.4.1¶
30 Aug 2023
Bugfixes¶
Pin to Mongodb 6.0.9 to prevent installation of breaking 7.0 release (#34)
v11.4.0¶
29 Jul 2023
Features¶
v11.3.0¶
29 Jul 2023
Features¶
Require Python 3.8 or later.
v11.2.1¶
27 Jul 2021
#27: In oplog module, once again support createIndex operations even on MongoDB 4.4 and later.
mongodb_instance
now uses preferred simple fixture
instead of deprecated yield_fixture
.
v11.2.0¶
30 Apr 2021
Rely on native f-strings and remove dependency on future-fstrings.
v11.1.0¶
30 Apr 2021
#22: The pytest fixture now honors --mongodb-uri
or
the environment variable MONGODB_URL
to run tests
against an existing instance of MongoDB rather than starting
up a new one.
v11.0.1¶
14 Mar 2021
Rely on PEP 420 for namespace package.
v11.0.0¶
21 Nov 2020
Require Python 3.6 or later.
#26: Removed --noprealloc
and --smallfiles
from
MongoDBReplicaSet class, restoring compatibility on
later MongoDB releases.
10.3.0¶
18 Apr 2019
Added jaraco.mongodb.sampling
with the new
estimate
function for estimating the count of
objects matching a query.
10.2.0¶
16 Apr 2019
Remove dependency on namespace_format
from
(otherwise pinned) jaraco.text
and instead rely
on future-fstrings
to provide for f-strings on
supported Python versions.
10.1.3¶
15 Apr 2019
#25: Pin dependency on jaraco.text 2.x to avoid error.
10.1.2¶
27 Feb 2019
Fixed DeprecationWarning in assert_distinct_covered.
10.1.1¶
27 Feb 2019
Fix a couple of deprecation warnings, including an emergent one on recent pytest versions.
10.1¶
12 Jan 2019
Add codec
module with support for parsing dates from
JSON input, suitable for making queries.
10.0¶
01 Jan 2019
Switch to pkgutil namespace technique
for the jaraco
namespace.
9.4¶
14 Dec 2018
create_database_in_shard
now also reports the ‘nodes’
on which the database was created.
9.3¶
11 Dec 2018
Added testing.assert_index_used
function.
9.2.1¶
14 Nov 2018
Removed deprecation of helper.connect_db
, as the
upstream implementation still doesn’t provide for a
nice ‘default’.
9.2¶
14 Nov 2018
Disabled and deprecated helper.filter_warnings
.
Deprecated helper.connect
.
Deprecated helper.connect_db
in favor of functions
now available in pymongo 3.5.
Added helper.get_collection
.
9.1¶
12 Nov 2018
#21: In mongodb_instance
fixture, allow --port
to be
passed as mongod args, overriding default behavior of starting
on an ephemeral port.
9.0¶
28 Oct 2018
Refreshed project metadata, including conversion to declarative config. Requires Setuptools 34.4 to install from sdist.
8.1¶
26 Oct 2018
In query.upsert_and_fetch
, allow keyword arguments to pass
to the underlying call.
Fix return value in query.upsert_and_fetch
.
8.0¶
06 Oct 2018
MongoDB Instances are now started with
--storageEngine ephemeralForTest
instead of deferring to
the default storage engine. As a result, these options have
also been removed from the mongod invocation:
noprealloc
nojournal
syncdelay
noauth
This change also means that the soft_stop
method has no
benefit and so has been removed.
7.10¶
13 Sep 2018
MongoDBInstances will no longer attempt to store their data in the root of the virtualenv (if present). Instead, they unconditionally use a temp directory.
7.9¶
21 Aug 2018
#12: Ensure indexes when moving files using move-gridfs
script.
7.8¶
21 Aug 2018
#19: Added Python 2 compatibility to the monitor-index-creation
script.
7.7¶
31 Jul 2018
Added compat.Collection
with save
method added in 6.2.
7.6¶
09 Jul 2018
No longer pass --ipv6
to mongod in MongoDBInstance. IPv6
is supported since MongoDB 3.0 without this option, and in
some environments, supplying this parameter causes the daemon
to fail to bind to any interfaces.
7.5¶
13 Feb 2018
Added jaraco.mongodb.insert-doc
to take a JSON document
from the command-line and insert it into the indicated collection.
7.4¶
25 Jan 2018
#18: Allow pmxbot command to connect to the MongoDB database other than localhost.
7.3¶
11 Jan 2018
Add jaraco.mongodb.fields
for escaping values for document
fields.
7.2.3¶
10 Jan 2018
#17: Remove --nohttpinterface
when constructing MongoDB
instances, following the same approach taken by MongoDB.
7.2.2¶
14 Dec 2017
#16: Fixed monitor-index-creation script for MongoDB 3.2+.
7.2.1¶
15 Nov 2017
Corrected oplog replication issues for MongoDB 3.6 (#13, #14).
7.2¶
Moved Extend
action in oplog module to
jaraco.ui 1.6.
7.1¶
11 Jul 2017
In move-gridfs
, explicitly handle interrupt to allow a
move to complete and only stop between moves.
7.0.2¶
11 Jul 2017
Fix AttributeError in move-gridfs
get_args.
7.0.1¶
10 Jul 2017
Miscellaneous packaging fixes.
7.0¶
21 Jun 2017
Removed support for seconds
argument to oplog
command.
6.4¶
17 Jun 2017
move-gridfs
now accepts a limit-date option, allowing
for the archival of files older than a certain date.
6.3.1¶
01 May 2017
#11: With save, only use replace when an _id is specified.
6.3¶
28 Apr 2017
#10: MongoDBInstance now passes the subprocess output
through to stderr and stdout. Callers should either
capture this output separately (such as pytest already
does) or set a .process_kwargs
property on the
instance to customize the stdout
and/or stderr
parameters to Popen.
6.2.1¶
27 Apr 2017
Use portend for finding available local port, eliminating remaining DeprecationWarnings.
6.2¶
27 Apr 2017
Add compat module and compat.save
method for
supplying the Collection.save
behavior, deprecated
in PyMongo.
Updated PyMongo 3.0 API usage to eliminate DeprecationWarnings.
6.1.1¶
30 Mar 2017
#9: Fix issue with MongoDBInstance by using
subprocess.PIPE
for stdout. Users may read from
this pipe by reading instance.process.stdout
.
6.1¶
29 Mar 2017
Now, suppress creation of MongoDBInstance log file in fixture and MongoDBInstance service.
6.0¶
Removed workarounds module.
5.6¶
07 Feb 2017
Added workarounds module with safe_upsert_27707
.
5.5¶
19 Dec 2016
No longer startup MongoDBInstance with
textSearchEnabled=true
, fixing startup on MongoDB 3.4
and dropping implicit support for text search on MongoDB 2.4.
#7: Oplog tool now supports MongoDB 3.4 for the tested use cases.
5.4¶
28 Sep 2016
assert_covered
now will fail when the candidate cursor
returns no results, as that’s almost certainly not an effective
assertion.
5.3¶
21 Sep 2016
Nicer rendering of operations in the oplog tool.
In testing
module, assertions now return the objects
on which they’ve asserted (for troubleshooting or additional
assertions).
5.2.1¶
16 Aug 2016
#6: Oplog tool will now include, exclude, and apply namespace renames on ‘renameCollection’ commands.
5.2¶
16 Aug 2016
Oplog tool no longer has a default window of 86400 seconds, but instead requires that a window or valid resume file be specified. Additionally, there is no longer a default resume file (avoiding potential issues with multiple processes writing to the same file).
Oplog tool now accepts a --window
argument, preferred
to the now deprecated --seconds
argument. Window
accepts simple time spans, like “3 days” or “04:20” (four
hours, twenty minutes). See the docs for pytimeparse for specifics
on which formats are supported.
5.1.1¶
16 Aug 2016
Fix version reporting when invoked with -m
.
5.1¶
16 Aug 2016
Oplog tool no longer defaults to localhost
for the dest,
but instead allows the value to be None. When combined with
--dry-run
, dest is not needed and a connection is only
attempted if --dest
is indicated.
Oplog tool now logs the name and version on startup.
5.0¶
15 Aug 2016
Removed oplog.increment_ts
and Timestamp.next
operation
(no longer needed).
Ensure that ts is a oplog.Timestamp during save_ts
.
4.4¶
12 Aug 2016
#3: create_db_in_shard
no longer raises an exception when
the database happens to be created in the target shard.
#5: Better MongoDB 3.2 support for oplog replication.
Tests in continuous integration are now run against MongoDB 2.6, 3.0, and 3.2.
4.3¶
10 Aug 2016
Oplog replay now warns if there are no operations preceding the cutoff.
4.2.2¶
04 Aug 2016
#2: Retain key order when loading Oplog events for replay.
4.2.1¶
02 Aug 2016
Avoid race condition if an operation was being applied when sync was cancelled.
4.2¶
02 Aug 2016
oplog
now reports the failed operation when an oplog
entry fails to apply.
4.1¶
29 Jul 2016
oplog
command now accepts multiple indications of the
following arguments:
- --ns
- --exclude
- --rename
See the docstring for the implications of this change.
4.0¶
21 Jul 2016
Drop support for Python 3.2.
3.18.1¶
21 Jul 2016
Add helper module to docs.
3.18¶
23 Jun 2016
Added sharding
module with create_db_in_shard
function and pmxbot command.
3.17¶
21 Jun 2016
Add Trove classifier for Pytest Framework.
3.16¶
20 Jun 2016
Extract migration manager functionality from YouGov’s cases migration.
3.15.2¶
11 May 2016
Correct syntax error.
3.15.1¶
11 May 2016
Set a small batch size on fs query for move-gridfs to prevent the cursor timing out while chunks are moved.
3.15¶
11 May 2016
Add jaraco.mongodb.move-gridfs
command.
3.14¶
07 Mar 2016
Exposed mongod_args
on MongoDBInstance
and MongoDBReplicaSet
.
Allow arbitrary arguments to be included as mongodb args with pytest plugin. For example:
pytest --mongod-args=--storageEngine=wiredTiger
3.13¶
07 Mar 2016
Added manage
module with support for purging all databases.
Added .purge_all_databases
to MongoDBInstance.
3.12¶
21 Dec 2015
Minor usability improvements in monitor-index-creation script.
3.11¶
04 Dec 2015
Better error reporting in mongodb_instance fixture.
3.10¶
02 Dec 2015
MongoDBInstance now allows for a .soft_stop
and subsequent .start
to restart the instance against the same data_dir.
3.8¶
11 Nov 2015
repair-gridfs
command now saves documents before removing
files.
3.7¶
11 Nov 2015
Add helper.connect_gridfs
function.
Add script for removing corrupt GridFS files:
jaraco.mongodb.repair-gridfs
.
3.6¶
10 Nov 2015
Add helper
and uri
modules with functions to facilitate common
operations in PyMongo.
3.5¶
10 Nov 2015
Add script for checking GridFS. Invoke with
python -m jaraco.mongodb.check-gridfs
.
3.4¶
04 Nov 2015
#1: Rename a namespace in index operations.
3.3¶
03 Nov 2015
Add a dry-run
option to suppress application of operations.
3.0¶
31 Oct 2015
Oplog command no longer accepts ‘-h’, ‘–host’, ‘–to’, ‘–port’, ‘-p’, or ‘–from’, but instead accepts ‘–source’ and ‘–dest’ options for specifying source and destination hosts/ports.
2.8¶
29 Oct 2015
Adopt abandoned mongooplog_alt
as jaraco.mongodb.oplog
.
2.7¶
22 Jul 2015
Support PyMongo 2.x and 3.x.
2.6¶
24 Apr 2015
Adopted service
module from jaraco.test.services.
2.4¶
13 Feb 2015
Add testing.assert_distinct_covered
.
2.3¶
10 Feb 2015
Add query.compat_explain
, providing forward compatibility
for MongoDB 3.0 explain changes.
testing.assert_covered
uses compat_explain for MongoDB 3.0
compatibility.
2.2¶
05 Sep 2014
Add query module with project
function.
2.0¶
26 Jan 2014
Removed references to jaraco.modb
. Instead, allow the Sessions object to
accept a codec
parameter. Applications that currently depend on the
use_modb
functionality must instead use the following in the config:
"sessions.codec": jaraco.modb
1.0¶
26 Jan 2014
Initial release, introducing sessions
module based on yg.mongodb
2.9.