-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PYTHON-2998 Remove md5 checksums from gridfs and remove disable_md5 #776
Conversation
doc/changelog.rst
Outdated
- :class:`~pymongo.mongo_client.MongoClient`` now raises an | ||
:exc:`~pymongo.errors.InvalidURI` exception | ||
when it encounters unescaped percent signs in username and password when | ||
parsing MongoDB URIs. | ||
- Removed the `disable_md5` parameter for :class:`~gridfs.GridFSBucket` and | ||
:class:`~gridfs.GridFS`. MD5 checksums are now always disabled in GridFS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of saying "checksums are now always disabled" I think you should say something like "gridfs no longer generates a checksum" and link to the guidance in the upgrade docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
doc/migrate-to-pymongo4.rst
Outdated
................................ | ||
|
||
Removed the `disable_md5` option for :class:`~gridfs.GridFSBucket` and | ||
:class:`~gridfs.GridFS`. MD5 checksums are now always disabled in GridFS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here about "are now always disabled".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
gridfs/__init__.py
Outdated
cannot be used for regulatory or other reasons. Defaults to False. | ||
|
||
.. versionchanged:: 4.0 | ||
Removed the `disable_md5` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also mention that gridfs no longer generates an md5sum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to link to the migration guide which describes the change in more detail.
gridfs/__init__.py
Outdated
cannot be used for regulatory or other reasons. Defaults to False. | ||
|
||
.. versionchanged:: 4.0 | ||
Removed the `disable_md5` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to link to the migration guide which describes the change in more detail.
gridfs/grid_file.py
Outdated
- `**kwargs` (optional): file level options (see above) | ||
|
||
.. versionchanged:: 4.0 | ||
Removed the `disable_md5` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to link to the migration guide which describes the change in more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I made a small test update to use delete_many+drop_indexes to clear the collection state rather than use drop_collection. This speeds up the gridfs test quite a bit. On a MongoDB 5.1.0-alpha-1170-g4c2c9d1 3 member replica set the following used to run in 219 seconds:
The same command now runs in 102.092s. So we've shaved off about 2 minutes in runtime! Still 100 seconds seems high for these tests. There's probably something else we could do but I'll save that for a future project. |
Still LGTM |
…ongodb#776) Speed up gridfs tests (shaves off about 2 minutes on macOS).
…ongodb#776) Speed up gridfs tests (shaves off about 2 minutes on macOS).
No description provided.