Eve

Latest version: v2.2.0

Safety actively analyzes 682487 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 9

0.8.1

Not secure
-------------

Released on October 4, 2018.

New
~~~
- Add support for Mongo ``$centerSphere`` query operator (`1181`_)
- ``NORMALIZE_DOTTED_FIELDS``. If ``True``, dotted fields are parsed and
processed as subdocument fields. If ``False``, dotted fields are left
unparsed and unprocessed and the payload is passed to the underlying
data-layer as-is. Please note that with the default Mongo layer, setting this
to ``False`` will result in an error. Defaults to ``True``. (`1173`_)
- ``normalize_dotted_fields``. Endpoint-level override
for ``NORMALIZE_DOTTED_FIELDS``. (`1173`_)

Fixed
~~~~~
- ``mongo_indexes``: "OperationFailure" when changing the keys of an existing
index (`1180`_)
- v0.8: "OperationFailure" performing MongoDB full text searches (`1176`_)
- "AttributeError" on Python 2.7 when obsolete ``JSON`` or ``XML`` settings
are used (`1175`_).
- "TypeError argument of type 'NoneType' is not iterable" error when using
document embedding in conjuction with soft deletes (`1120`_)
- ``allow_unknown`` validation rule fails with nested dict fields (`1163`_)
- Updating a field with a nullable data relation fails when value is null
(`1159`_)
- "cerberus.schema.SchemaError" when ``VALIDATE_FILTERS = True``. (`1154`_)
- Serializers fails when array of types is in schema. (`1112`_)
- Replace the broken ``make audit`` shortcut with ``make check``, add the
command to ``CONTRIBUTING.rst`` it was missing. (`1144`_)

Improved
~~~~~~~~
- Perform lint checks and fixes on staged files, as a pre-commit hook.
(`1157`_)
- On CI, perform linting checks first. If linting checks are successful,
execute the test suite on the whole matrix. (`1156`_)
- Reformat code to match Black code-style. (`1155`_)
- Use ``simplejson`` everywhere in the codebase. (`1148`_)
- Install a bot that flags and closes stale issues/pull requests. (`1145`_)
- Only set the package version in ``__init__.py``. (`1142`_)

Docs
~~~~
- Typos (`1183`_, `1184`_, `1185`_)
- Add ``MONGO_AUTH_SOURCE`` to Quickstart. (`1168`_)
- Fix Sphinx-embedly error when embedding speakerdeck.com slide deck (`1158`_)
- Fix broken link to the Postman app. (`1150`_)
- Update obsolete PyPI link in docs sidebar. (`1152`_)
- Only display the version number on the docs homepage. (`1151`_)
- Fix documentation builds on Read the Docs. (`1147`_)
- Add a ``ISSUE_TEMPLATE.md`` GitHub template file. (`1146`_)
- Improve changelog format to reduce noise and increase readability. (`1143`_)

.. _`1185`: https://github.com/pyeve/eve/pull/1185
.. _`1184`: https://github.com/pyeve/eve/pull/1184
.. _`1183`: https://github.com/pyeve/eve/pull/1183
.. _`1181`: https://github.com/pyeve/eve/issues/1181
.. _`1180`: https://github.com/pyeve/eve/issues/1180
.. _`1176`: https://github.com/pyeve/eve/issues/1176
.. _`1175`: https://github.com/pyeve/eve/issues/1175
.. _`1173`: https://github.com/pyeve/eve/issues/1173
.. _`1168`: https://github.com/pyeve/eve/issues/1168
.. _`1142`: https://github.com/pyeve/eve/issues/1142
.. _`1143`: https://github.com/pyeve/eve/issues/1143
.. _`1144`: https://github.com/pyeve/eve/issues/1144
.. _`1145`: https://github.com/pyeve/eve/issues/1145
.. _`1146`: https://github.com/pyeve/eve/issues/1146
.. _`1147`: https://github.com/pyeve/eve/issues/1147
.. _`1148`: https://github.com/pyeve/eve/issues/1148
.. _`1151`: https://github.com/pyeve/eve/issues/1151
.. _`1152`: https://github.com/pyeve/eve/issues/1152
.. _`1150`: https://github.com/pyeve/eve/issues/1150
.. _`1112`: https://github.com/pyeve/eve/issues/1112
.. _`1154`: https://github.com/pyeve/eve/issues/1154
.. _`1155`: https://github.com/pyeve/eve/issues/1155
.. _`1156`: https://github.com/pyeve/eve/issues/1156
.. _`1157`: https://github.com/pyeve/eve/issues/1157
.. _`1158`: https://github.com/pyeve/eve/issues/1158
.. _`1159`: https://github.com/pyeve/eve/issues/1159
.. _`1163`: https://github.com/pyeve/eve/issues/1163
.. _`1120`: https://github.com/pyeve/eve/issues/1120

0.8

Not secure
-----------

Released on May 10, 2018.

.. note::

Make sure you read the :ref:`Breaking Changes <breaking_changes>` section below.

- New: support for `partial media requests`_. Clients can request partial file
downloads by adding a ``Range`` header to their media request (`1050`_).
- New: `Renderer classes`_. ``RENDERER`` allows to change enabled renderers.
Defaults to ``['eve.render.JSONRenderer', 'eve.render.XMLRenderer']``. You
can create your own renderer by subclassing ``eve.render.Renderer``. Each
renderer should set valid mime attr and have ``.render()`` method
implemented. Please note that at least one renderer must always be enabled
(`1092`_).
- New: ``on_delete_resource_originals`` fired when soft deletion occurs
(`1030`_).
- New: ``before_aggregation`` and ``after_aggregation`` event hooks allow to
attach `custom callbacks to aggregation endpoints`_ (`1057`_).
- New: ``JSON_REQUEST_CONTENT_TYPES`` or supported JSON content types. Useful
when you need support for vendor-specific json types. Please note: responses
will still carry the standard ``application/json`` type. Defaults to
``['application/json']`` (`1024`_).
- New: when the media endpoint is enabled, the default authentication class
will be used to secure it. (`1083`_; `1049`_).
- New: ``MERGE_NESTED_DOCUMENTS``. If ``True``, updates to nested fields are
merged with the current data on ``PATCH``. If ``False``, the updates
overwrite the current data. Defaults to ``True`` (`1140`_).
- New: support for MongoDB decimal type ``bson.decimal128.Decimal128``
(`1045`_).
- New: Support for ``Feature`` and ``FeatureCollection`` GeoJSON objects
(`769`_).
- New: Add support for MongoDB ``$box`` geo query operator (`1122`_).
- New: ``ALLOW_CUSTOM_FIELDS_IN_GEOJSON`` allows custom fields in GeoJSON
(`1004`_).
- New: Add support for MongoDB ``$caseSensitive`` and ``$diactricSensitive``
query operators (`1126`_).
- New: Add support for MongoDB bitwise query operators ``$bitsAllClear``,
``$bitsAllSet``, ``$bitsAnyClear``, ``$bitsAnySet`` (`1053`_).
- New: support for ``MONGO_AUTH_MECHANISM`` and
``MONGO_AUTH_MECHANISM_PROPERTIES``.
- New: ``MONGO_DBNAME`` can now be used in conjuction with ``MONGO_URI``.
Previously, if ``MONGO_URI`` was missing the database name, an exception
would be rised (`1037`_).
- Fix: OPLOG skipped even if ``OPLOG = True`` (`1074`_).
- Fix: Cannot define default projection and request specific field. (`1036`_).
- Fix: ``VALIDATE_FILTERS`` and ``ALLOWED_FILTERS`` do not work with
sub-document fields. (`1123`_).
- Fix: Aggregation query parameter does not replace keys in the lists
(`1025`_).
- Fix: serialization bug that randomly skips fields if "x_of" is encountered
(`1042`_)
- Fix: PUT behavior with User Restricted Resource Access. Ensure that, under
every circumstance, users are unable to overwrite items owned by other users
(`1130`_).
- Fix: Crash with Cerberus 1.2 (`1137`_).
- Fix documentation typos (`1114`_, `1102`_)
- Fix: broken documentation links to Cerberus validation rules.
- Fix: add sphinxcontrib-embedly to dev-requirements.txt.
- Fix: Removed OrderedDict dependency; use ``OrderedDict`` from
``backport_collections`` instead (`1070`_).
- Performance improved on retrieving a list of embedded documents (`1029`_).
- Dev: Refactor index creation. We now have a new
``eve.io.mongo.ensure_mongo_indexes()`` function which ensures that eventual
``mongo_indexes`` defined for a resource are created on the active database.
The function can be imported and invoked, for example in multi-db workflows
where a db is activated based on the authenticated user performing the
request (via custom auth classes).
- Dev: Add a `Makefile with shortcuts`_ for testing, docs building, and
development install.
- Dev: Switch to pytest as the standard testing tool.
- Dev: Drop ``requiments.txt`` and ``dev-requirements.txt``. Use ``pip install
-e .[dev|tests|docs]`` instead.
- Tests: finally acknowledge the existence of modern APIs for both Mongo and
Python (get rid of most deprecation warnings).
- Change: Support for Cerberus 1.0+ (`776`_).
- Change: ``JSON`` and ``XML`` settings are deprecated and will be removed in
a future update. Use ``RENDERERS`` instead (`1092`_).
- Flask dependency set to >=1.0 (`1111`_).
- PyMongo dependency set to >=3.5.
- Events dependency set to >=v0.3.
- Drop Flask-PyMongo dependency, use custom code instead (`855`_).
- Docs: Comprehensive rewrite of the `How to contribute`_ page.
- Docs: Drop the testing page; merge its contents with `How to contribute`_.
- Docs: Add link to the `Eve course`_. It was authored by the project author,
and it is hosted by TalkPython Training.
- Docs: code snippets are now Python 3 compatibile (Pahaz Blinov).
- Dev: Delete and cleanup of some unnecessary code.
- Dev: after the latest update (May 4th) travis-ci would not run tests on
Python 2.6.
- Dev: all branches are now tested on travis-ci. Previously, only 'master' was
being tested.
- Dev: fix insidious bug in ``tests.methods.post.TestPost`` class.

.. _breaking_changes:

Breaking Changes
~~~~~~~~~~~~~~~~
- Python 2.6 and Python 3.3 are no longer supported (`1129`_).
- Eve now relies on `Cerberus`_ 1.1+ (`776`_). It allows for many new
powerful validation and trasformation features (like `schema registries`_),
improved performance and, in general, a more streamlined API. It also brings
some notable breaking changes.

- ``keyschema`` was renamed to ``valueschema``, and ``propertyschema`` to
``keyschema``.
- A PATCH on a document which misses a field having a default value will
now result in setting this value, even if the field was not provided in
the PATCH's payload.
- Error messages for ``keyschema`` are now returned as dictionary. Example:
``{'a_dict': {'a_field': "value does not match regex '[a-z]+'"}}``.
- Error messages for type validations are `different now`_.
- It is no longer valid to have a field with ``default = None`` and
``nullable = False`` (see
*patch.py:test_patch_nested_document_nullable_missing*).
- And more. A complete list of breaking changes is available here_. For
detailed upgrade instructions, see Cerberus `upgrade notes`_. An in-depth
analysis of changes made to the codebase (useful if you wrote a custom
validator which needs to be upgraded) is available with `this commit
message`_.
- Special thanks to Dominik Kellner and Brad P. Crochet for the amazing job
done on this upgrade.

- Config setting ``MONGO_AUTHDBNAME`` renamed into ``MONGO_AUTH_SOURCE`` for
naming consistency with PyMongo.
- Config options ``MONGO_MAX_POOL_SIZE``, ``MONGO_SOCKET_TIMEOUT_MS``,
``MONGO_CONNECT_TIMEOUT_MS``, ``MONGO_REPLICA_SET``,
``MONGO_READ_PREFERENCE`` removed. Use ``MONGO_OPTIONS`` or ``MONGO_URI``
instead.
- Be aware that ``DELETE`` on sub-resource endpoint will now only delete the
documents matching endpoint semantics. A delete operation on
``people/51f63e0838345b6dcd7eabff/invoices`` will delete all documents
matching the followig query: ``{'contact_id': '51f63e0838345b6dcd7eabff'}``
(`1010`_).

.. _1140: https://github.com/pyeve/eve/pull/1140
.. _1111: https://github.com/pyeve/eve/issues/1111
.. _1129: https://github.com/pyeve/eve/issues/1129
.. _1057: https://github.com/pyeve/eve/issues/1057
.. _1137: https://github.com/pyeve/eve/issues/1137
.. _1122: https://github.com/pyeve/eve/issues/1122
.. _1050: https://github.com/pyeve/eve/pull/1050
.. _1130: https://github.com/pyeve/eve/pull/1130
.. _1074: https://github.com/pyeve/eve/issues/1074
.. _1036: https://github.com/pyeve/eve/issues/1036
.. _1128: https://github.com/pyeve/eve/pull/1128
.. _1126: https://github.com/pyeve/eve/pull/1126
.. _1123: https://github.com/pyeve/eve/issues/1123
.. _1102: https://github.com/pyeve/eve/pull/1102
.. _1114: https://github.com/pyeve/eve/pull/1114
.. _1092: https://github.com/pyeve/eve/pull/1092
.. _1083: https://github.com/pyeve/eve/issues/1083
.. _1049: https://github.com/pyeve/eve/issues/1049
.. _1053: https://github.com/pyeve/eve/issues/1053
.. _1070: https://github.com/pyeve/eve/pull/1070
.. _1045: https://github.com/pyeve/eve/issues/1045
.. _1042: https://github.com/pyeve/eve/pull/1042
.. _1030: https://github.com/pyeve/eve/pull/1030
.. _1037: https://github.com/pyeve/eve/issues/1037
.. _1029: https://github.com/pyeve/eve/issues/1029
.. _1024: https://github.com/pyeve/eve/issues/1024
.. _769: https://github.com/pyeve/eve/issues/769
.. _1004: https://github.com/pyeve/eve/issues/1004
.. _776: https://github.com/pyeve/eve/issues/776
.. _855: https://github.com/pyeve/eve/issues/855
.. _1010: https://github.com/pyeve/eve/issues/1010
.. _1025: https://github.com/pyeve/eve/issues/1025
.. _Cerberus: http://python-cerberus.org
.. _`schema registries`: http://docs.python-cerberus.org/en/stable/schemas.html#registries
.. _`different now`: http://docs.python-cerberus.org/en/stable/upgrading.html#data-types
.. _here: http://docs.python-cerberus.org/en/stable/changelog.html#breaking-changes
.. _`upgrade notes`: http://python-cerberus.org/en/stable/upgrading.html
.. _`this commit message`: https://github.com/pyeve/eve/pull/1001/commits/1110f807b478efa9f13ad1d217d22ceaa2a9e42d
.. _`partial media requests`: http://python-eve.org/features.html#partial-media-downloads
.. _`custom callbacks to aggregation endpoints`: http://python-eve.org/features.html#aggregation-event-hooks
.. _`Renderer classes`: http://python-eve.org/features.html#rendering
.. _`makefile with shortcuts`: http://python-eve.org/contributing.html#make-targets
.. _`How to contribute`: http://python-eve.org/contributing.html
.. _`Eve course`: https://training.talkpython.fm/courses/explore_eve/eve-building-restful-mongodb-backed-apis-course

0.7.10

Not secure
~~~~~~~~~~~~~~

Released on July 15, 2018.

- Fix: Pin Flask-PyMongo dependency to avoid crash with Flask-PyMongo 2.
Closes 1172.

0.7.9

Not secure
~~~~~~~~~~~~~

Released on May 10, 2018

- Python 2.6 and Python 3.3 are deprecated. Closes 1129.

0.7.8

Not secure
~~~~~~~~~~~~~

Released on 7 February, 2018

- Fix: breaking syntax error in v0.7.7

0.7.7

Not secure
~~~~~~~~~~~~~

Released on 7 February, 2018

- Fix: geo queries now properly support ``$geometry`` and ``$maxDistance``
operators. Closes 1103.

Page 4 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.