Skip to content

Releases: alorence/django-modern-rpc

v2.0.0 (2025-11-10)

10 Nov 11:37

Choose a tag to compare

Improvements

  • The new API, heavily inspired from tools like FastAPI or django-ninja, encapsulate the procedures registration in a
    dedicated RpcServer instance. This removes the need to lookup modules based on settings.MODERNRPC_METHODS_MODULES
    value, so modernrpc does not need to be added to settings.INSTALLED_APPS anymore.
  • RpcNamespace were added to provide a better organization of procedures. Each one can be registered in a
    previously defined RpcServer.
  • It is now possible to register async procedures. Both sync (legacy) and async procedures are served by the default
    view (synchronous)
  • For improved performances with async procedures, an async view has been added and can be used as a replacement to
    expose procedures. The async_view can serve both sync and async procedures.
  • Error handling has been improved, allowing executing a callback function when an exception is caught and before an
    RPC error response is built.
  • The authentication process has been improved. Multiple callbacks can be configured at server-level, namespace-level
    or directly on a specific remote procedure.
  • It is now possible to configure different backends to deserialize XML-RPC and JSON-RPC requests and to serialize
    XML-RPC and JSON-RPC responses. Alternative backends may provide more features, configuration options, specific types
    support or better performances.

Breaking Changes

  • Complete architecture redesign: The library now uses a server-based approach instead of entry points
  • Removed the RPCEntryPoint class-based view in favor of the new function based views provided by RpcServer class
  • Removed automatic procedure registration via MODERNRPC_METHODS_MODULES setting
  • Removed HTML documentation generation through entry points
  • Changed the way procedures access request context, now using the context_target parameter
  • Some settings were removed:
    • MODERNRPC_METHODS_MODULES
    • MODERNRPC_LOG_EXCEPTIONS
    • MODERNRPC_DEFAULT_ENTRYPOINT_NAME
    • MODERNRPC_JSON_DECODER
    • MODERNRPC_JSON_ENCODER
    • MODERNRPC_XMLRPC_USE_BUILTIN_TYPES
    • MODERNRPC_XMLRPC_ALLOW_NONE
    • MODERNRPC_XMLRPC_DEFAULT_ENCODING

Misc

  • Added support for Django 5.2 and 6.0
  • Added support for Python 3.14
  • Dropped support of Django < 3.2
  • Dropped support of Python 3.7

v1.1.0 (2025-01-01)

01 Jan 13:13
0e608d6

Choose a tag to compare

Improvements

  • JSON-RPC handler now performs request validation in a dedicated method, allowing better customization of that part.
    Inspired by #73, thanks to @hwalinga

Fixes

  • JSON-RPC handler now correctly checks type of request "id" field, according to the
    specification (#72). Thanks to @moonburnt
  • Fixed docstring parser to allow empty or multi-line arg description
  • Fixed registration of methods with same names under different entry points (#74). Thanks to @hwalinga

Misc

  • Added support for Django 5.1
  • Added support for Python 3.13
  • Dropped support of Django 2.1

v1.0.3 (2024-02-29)

29 Feb 20:37

Choose a tag to compare

Improvements

  • When package defusedxml is installed in the same environment, builtin xmlrpc.client module is patched to reduce
    the risk of various XML payload based attacks on the server

Fixes

  • Fix dependency to packaging introduced in previous release.

Misc

  • Added support for Django 5.0 (Thanks to @washeck)
  • Reduced the verbosity of the package. Startup initialization message is now a DEBUG log instead of
    an INFO one (Thanks to @washeck)
  • Dropped use of Black and PyLint. Use Ruff to enforce all linting rules and code formatting

v1.0.2 (2023-11-27)

27 Nov 19:52

Choose a tag to compare

Fixes

  • When request is received with an invalid Content-Type (or missing one), the error response is now returned with a
    "text/plain" Content-Type header.

Misc

  • Dropped support of python 3.5 and 3.6
  • Added support for python 3.12 and Django 4.2

v1.0.1 (2023-01-26)

26 Jan 19:46

Choose a tag to compare

Fixes

  • Fixed invalid argument used to initialized default handlers instances (#52). Thanks to @washeck

v1.0.0 (2023-01-03)

03 Jan 14:12

Choose a tag to compare

After months of work, the 1.0 milestone is a major refactoring of the library. Many parts of the project have been
modernized to improve readability and robustness, and a few issues were fixed.

Improvements

  • Type hinting is now supported in RPC methods. Auto-generated documentation will use it when it is defined.
    Old-style "doctypes" are still supported.
  • Dependency to six have been completely removed

Breaking Changes

  • When an authentication error is raised, the returned status code is now 200 instead of 403 for consistency with
    batch and system.multicall requests (#35)
  • Django < 2.1 and Python < 3.5 support have been dropped.

Other API changes

  • A new modernrpc.core.Protocol enum has been introduced to enforce correct protocol value when needed. (#29, #30).
    This new class replaces modernrpc.core.JSONRPC_PROTOCOL and modernrpc.core.XMLRPC_PROTOCOL but aliases were
    created for backward compatibility.
  • RPCUnknownMethod exception has been renamed to RPCMethodNotFound. An alias has been created
    for backward compatibility

Fixes

  • Initialization process updated: exceptions are now raised on startup for invalid RPC modules. In addition, Django
    check system is used to notify common errors. This was requested multiple times (#2, #13, #34).
  • JSON-RPC notification behavior has been fixed to respect standard. Requests without id are handled as
    notifications but requests with null id are considered invalid and will return an error
  • Batch request behavior has been fixed when one or more results failed to be serialized
  • Builtin system.methodSignature behavior have been updated to respect standard. It now returns a list of
    list and unknown types are returned as "undef" (see http://xmlrpc-c.sourceforge.net/introspection.html)

Misc

  • Added support for Python 3.9, 3.10 and 3.11
  • Added support for Django 3.2, 4.0 and 4.1
  • Documentation tree was completely reworked for clarity and simplicity. A new theme (Book) is now used to improve
    readability. See https://django-modern-rpc.rtfd.io.
  • Poetry is now used to configure project dependencies and build distributions. The new pyproject.toml file
    replaces setup.py, setup.cfg, MANIFEST.in and requirements.txt to centralize all dependencies,
    external tools settings (pytest, flake8, etc.) and packaging configuration
  • Black is now used to automatically format code
  • Mypy is now used to verify type hints consistency
  • Tox configuration now includes pylama, mypy, pylint and black environments
  • All tests have been rewritten to have a strong separation between unit and functional tests. Test classes where
    created to group tests by similarities. Many fixtures have been added, with more parameterization, resulting in
    about 350 tests executed covering more than 95% of the code.

v1.0.0 alpha4 (2022-11-29)

30 Nov 08:28

Choose a tag to compare

Pre-release

Updated test matrix and fixed #48 (thanks to @sean-wallace)

See changelog for details.

v1.0.0 alpha3 (2022-06-13)

13 Jun 12:54

Choose a tag to compare

Pre-release

See changelog for details.

v1.0.0 alpha2 (2022-05-22)

01 Jun 19:11

Choose a tag to compare

Pre-release

See changelog for details.

v1.0.0 alpha1 (2022-03-03)

03 Mar 16:53

Choose a tag to compare

Pre-release

First alpha before 1.0.0.

See changelog for details.