Changelog History
-
v9.0 Changes
October 03, 2017๐ This is a major release, with many improvements, protocol support and bug fixes. This version introduce an API break,
please read carefully.๐ Improvements:
- Class
RPCException
and its subclasses now accept an additionaldata
argument (#10). This is used by JSON-RPC
๐ handler to report additional information to user in case of error. This data is ignored in XML-RPC response. - ๐ JSON-RPC: Batch requests are now supported (#11)
- ๐ JSON-RPC: Named parameters are now supported (#12)
- ๐ฐ JSON-RPC: Notification calls are now supported. Missing
id
in payload is no longer considered as invalid, but
is correectly handled. No HTTP response is returned in such case, according to the standard. - ๐ป XML-RPC: exception raised when serializing data to XML are now catched as
InternalError
and a clear error message
API Changes:
- ๐
modernrpc.handlers.JSONRPC
andmodernrpc.handlers.XMLRPC
have been moved and renamed. They become respectively
modernrpc.core.JSONRPC_PROTOCOL
andmodernrpc.core.XMLRPC_PROTOCOL
- โก๏ธ
RPCHandler
class updated, as well as subclasesXMLRPCHandler
andJSONRPCHandler
.
RPCHandler.parse_request()
is nowRPCHandler.process_request()
. The new method does not return a tuple
(method_name, params)
anymore. Instead, it executes the underlying RPC method using new classRPCRequest
.
โก๏ธ If you customized your handlers, please make sure you updated your code (if needed).
โก๏ธ In addition, this version contains minor updates to prepare future compatibility with Django 2.0
- Class
-
v8.1 Changes
October 02, 2017๐ This version is a security fix. Upgrade is highly recommended
- ๐ Security: Authentication backend is correctly checked when executing method using
system.multicall()
- ๐ Security: Authentication backend is correctly checked when executing method using
-
v8.0 Changes
July 12, 2017- ๐ Fixed invalid HTML tag rendered from RPC Method documentation. Single new lines are converted to space since they
๐ are mostly used to limit docstrings line width. See pull request #7, thanks to @adamdonahue - Fixed issue #8: signature of
auth.set_authentication_predicate
has been fixed so it can be used as decorator.
Thanks to @aplicacionamedida
- ๐ Fixed invalid HTML tag rendered from RPC Method documentation. Single new lines are converted to space since they
-
v7.1 Changes
June 24, 2017- ๐ Removed useless settings variable introduced in last 0.7.0 release. Logging capabilities are now enabled by simply configuring a logger for
modernrpc.*
modules, using Django variableLOGGING
. The documentation has been updated accordingly.
- ๐ Removed useless settings variable introduced in last 0.7.0 release. Logging capabilities are now enabled by simply configuring a logger for
-
v7.0 Changes
June 24, 2017- 0๏ธโฃ Default logging behavior has been changed. The library will not output any log anymore, unless
MODERNRPC_ENABLE_LOGGING
is set to True. See documentation for more information
- 0๏ธโฃ Default logging behavior has been changed. The library will not output any log anymore, unless
-
v0.12.1
June 11, 2020 -
v0.12.0
December 05, 2019 -
v0.11.1 Changes
May 13, 2018Improvements
๐ Last release introduced some undocumented breaking API changes regarding RPC registry management. Old API has been restored for backward compatibility. The following global functions are now back in the API:
- modernrpc.core.register_rpc_method()
- modernrpc.core.get_all_method_names()
- modernrpc.core.get_all_methods()
- modernrpc.core.get_method()
- modernrpc.core.reset_registry()
โ In addition, some improvements have been applied to unit tests, to make sure test environment is the same after each test function. In addition, some exclusion patterns have been added in .coveragerc file to increase coverage report
accuracy. -
v0.11.0 Changes
April 25, 2018Improvements
- โก๏ธ Django 2.0 is now officially supported. Tox and Travis default config have been updated to integrate Django 2.0 in existing tests environements.
- ๐ Method's documentation is generated only if needed and uses Django's @cached_property decorator
- ๐ HTML documentation default template has been updated: Bootstrap 4.1.0 stable is now used, and the rendering has been improved.
API Changes
- ๐ Class RPCRequest has been removed and replaced by method
execute_procedure(name, args, kwargs)
inRPCHandler
class. This method contains common logic used to retrieve a RPC method, execute authentication predicates to make sure it can be run, execute the concrete method and return the result. - ๐ HTML documentation content is not anymore marked as "safe" using
django.utils.safestring.mark_safe()
. You have to use Django decoratorsafe
in your template if you display this value.
Settings
The
kwargs
dict passed to RPC methods can have customized keys (#18). Set the following values:settings.MODERNRPC_KWARGS_REQUEST_KEY
settings.MODERNRPC_KWARGS_ENTRY_POINT_KEY
settings.MODERNRPC_KWARGS_PROTOCOL_KEY
settings.MODERNRPC_KWARGS_HANDLER_KEY
to override dict keys and prevent conflicts with your own methods arguments.
โก๏ธ Other updates
- โ Many units tests have been improved. Some tests with many calls to LiveServer have been splitted into shorter ones.
-
v0.10.0 Changes
December 07, 2017Improvements
๐ฒ Logging system / error management
- In case of error, current exception stacktrace is now passed to logger by default. This allows special handler like
django.utils.log.AdminEmailHandler
orraven.handlers.logging.SentryHandler
to use it to report more useful information (#13) - Error messages have been rewritten to be consistent across all modules and classes
- Decrease log verbosity: some
INFO
log messages now haveDEBUG
level (startup methods registration)๐ Documentation has been updated
- Added a page to explain how to configure RPC methods documentation generation, and add a note to explicitly state that
markdown
ordocutils
package must be installed if
settings.MODERNRPC_DOC_FORMAT
is set to non-empty value (#16) - Added a page to list implemented system introspection methods
- Added a bibliography page, to list all references used to write the library
๐ Default template for generated RPC methods documentation now uses Bootstrap 4.0.0-beta.2 (previously 4.0.0-alpha.5)
- In case of error, current exception stacktrace is now passed to logger by default. This allows special handler like