Skip to content
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

GridFS support of md5 is deprecated #1410

Closed
ttutko opened this issue Sep 17, 2020 · 2 comments
Closed

GridFS support of md5 is deprecated #1410

ttutko opened this issue Sep 17, 2020 · 2 comments
Milestone

Comments

@ttutko
Copy link

ttutko commented Sep 17, 2020

Per the mongodb GridFS documentation at https://docs.mongodb.com/manual/core/gridfs/#files.md5

The md5 field is deprecated and should no longer be used. The pymongo gridfs driver has an argument "disable_md5" which defaults to "False". Eve should default that argument to "True". As the documentation suggests, clients can calculate their own md5 or any other hash and place it in the metadata field within gridfs.

If you don't wish to default this to "True", then please provide a mechanism to set this when defining the domain.

Expected Behavior

GridFS class is instantiated with disable_md5=True

DOMAIN = {
  'myrecords': {
    'schema': {
      'file': {
        'type': 'media'
      }
    }
  }
}

Actual Behavior

GridFS is instantiated with disable_md5=False (default value when argument not provided) which causes warnings in other mongodb tooling about the deprecation of md5 support.

Paste the full traceback if there was an exception.

Environment

  • Python version: 3.8.2
  • Eve version: 1.1.2
@nicolaiarocci
Copy link
Member

Good catch. More than willing to review a pull request that addresses this.

@nicolaiarocci
Copy link
Member

Fix provided by #1419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants