opendata.cern.ch
opendata.cern.ch copied to clipboard
app: solve warnings during fixture loading
Curent behaviour
We are Record recid 40 inserted.getting a number of DeprecationWarning, UserWarning, FutureWarning when loading the fixtures:
$ scripts/populate-instance.sh
...
Record recid 3600 inserted.
/opt/invenio/var/instance/python/lib/python3.6/site-packages/flask_caching/__init__.py:241: DeprecationWarning: Using the initialization functions in flask_caching.backend is deprecated. Use the a full path to backend classes directly.
category=DeprecationWarning,
/opt/invenio/var/instance/python/lib/python3.6/site-packages/markdown/util.py:87: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
INSTALLED_EXTENSIONS = metadata.entry_points().get('markdown.extensions', ())
/opt/invenio/var/instance/python/lib/python3.6/site-packages/invenio_config/default.py:74: UserWarning: Set configuration variable SECRET_KEY with random string
UserWarning)
/opt/invenio/var/instance/python/lib/python3.6/site-packages/invenio_rest/ext.py:30: FutureWarning: CSRF validation will be enabled by default in the version 1.3.x
self.init_app(app)
/opt/invenio/var/instance/python/lib/python3.6/site-packages/flask_caching/__init__.py:241: DeprecationWarning: Using the initialization functions in flask_caching.backend is deprecated. Use the a full path to backend classes directly.
category=DeprecationWarning,
Loading records from cernopendata/modules/fixtures/data/records/alice-learning-resources.json ...
/opt/invenio/var/instance/python/lib/python3.6/site-packages/jsonschema/validators.py:931: DeprecationWarning: The types argument is deprecated. Provide a type_checker to jsonschema.validators.extend instead.
validator = cls(schema, *args, **kwargs)
Record recid 40 inserted.
...
Expected behaviour
Ideally the output should be clean:
...
Record recid 3600 inserted.
Record recid 41 inserted.
...
Notes
- The warnings are printed for other CLI app commands obviously, not only for fixture loading... E.g. see
cernopendata db --helpand others.