Release 0.11.1 (2018-05135)¶
Improvements 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:
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.
Release 0.11.0 (2018-04-25)¶
- 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.
- Class RPCRequest has been removed and replaced by method
execute_procedure(name, args, kwargs)in
RPCHandlerclass. 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 decorator
safein your template if you display this value.
kwargsdict passed to RPC methods can have customized keys (#18). Set the following values:
to override dict keys and prevent conflicts with your own methods arguments.
- Many units tests have been improved. Some tests with many calls to LiveServer have been splitted into shorter ones.
Release 0.10.0 (2017-12-06)¶
Logging system / error management
- In case of error, current exception stacktrace is now passed to logger by default. This allows special handler like
raven.handlers.logging.SentryHandlerto 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
INFOlog messages now have
DEBUGlevel (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
docutilspackage must be installed if
settings.MODERNRPC_DOC_FORMATis 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
- Added a page to explain how to configure RPC methods documentation generation, and add a note to explicitly state that
Default template for generated RPC methods documentation now uses Bootstrap 4.0.0-beta.2 (previously 4.0.0-alpha.5)
Release 0.9.0 (2017-10-03)¶
This is a major release with many improvements, protocol support and bug fixes. This version introduce an API break, please read carefully.
RPCExceptionand its subclasses now accept an additional
dataargument (#10). This is used by JSON-RPC handler to report additional information to user in case of error. This data is ignored by XML-RPC handler.
- 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
InternalErrorand a clear error message
modernrpc.handlers.XMLRPCconstants have been moved and renamed. They become respectively
RPCHandlerclass updated, as well as subclases
RPCHandler.process_request(). The new method does not return a tuple
(method_name, params)anymore. Instead, it executes the underlying RPC method using new class
RPCRequest. If you customized your handlers, please make sure you updated your code (if needed).
- Code has been improved to prepare future compatibility with Django 2.0
Release 0.8.1 (2017-10-02)¶
This version is a security fix. Upgrade is highly recommended
- Authentication backend is correctly checked when executing method using
Release 0.8.0 (2017-07-12)¶
- 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
- Signature of
auth.set_authentication_predicatehas been fixed so it can be used as decorator (#8). Thanks to @aplicacionamedida
Release 0.7.1 (2017-06-24)¶
- 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 variable
LOGGING. The documentation has been updated accordingly.
Release 0.7.0 (2017-06-24)¶
- Default logging behavior has changed. The library will not output any log anymore, unless
MODERNRPC_ENABLE_LOGGINGis set to True. See documentation for more information
Release 0.6.0 (2017-05-13)¶
- Django cache system was previously used to store the list of available methods in the current project. This was useless, and caused issues with some cache systems (#5). Use of cache system has been removed. The list of RPC methods is computed when the application is started and kept in memory until it is stopped.
Release 0.5.2 (2017-04-18)¶
- HTTP Basic Authentication backend: User instance is now correctly stored in current request after successful authentication (#4)
- Unit testing with Django 1.11 is now performed against release version (Beta and RC are not tested anymore)
- Various Documentation improvements
Release 0.5.1 (2017-03-25)¶
- When RPC methods are registered, if a module file contains errors, a python warning is produced. This ensure the message will be displayed even if the logging system is not configured in a project (#2)
- Python 2 strings standardization. Allow to configure an automatic conversion of incoming strings, to ensure they have
the same type in RPC method, no matter what protocol was used to call it. Previously, due to different behavior
between JSON and XML deserializers, strings were received as
strwhen method was called via XML-RPC and as
unicodewith JSON-RPC. This standardization process is disabled by default, and can be configured for the whole project or for specific RPC methods.
- Tests are performed against Django 1.11rc1
modernrpc.core.register_method()function was deprecated since version 0.4.0 and has been removed.
Release 0.5.0 (2017-02-18)¶
- Typo fixes
- JSON-RPC 2.0 standard explicitly allows requests without ‘params’ member. This doesn’t produce error anymore.
- Setting variable
MODERNRPC_XML_USE_BUILTIN_TYPESis now deprecated in favor of
- Unit tests are now performed with python 3.6 and Django 1.11 alpha, in addition to supported environment already tested. This is a first step to full support for these environments.
- HTTP “Basic Auth” support: it is now possible to define RPC methods available only to specific users. The control can be done on various user attributes: group, permission, superuser status, etc. Authentication backend can be extended to support any method based on incoming request.
Release 0.4.2 (2016-11-20)¶
- Various performance improvements
- Better use of logging system (python builtin) to report errors & exceptions from library and RPC methods
- Rewritten docstring parser. Markdown and reStructured formatters are still supported to generate HTML documentation for RPC methods. They now have unit tests to validate their behavior.
- @rpc_method decorator can be used with or without parenthesis (and this feature is tested)
- System methods have been documented
Release 0.4.1 (2016-11-17)¶
- Method arguments documentation keep the same order as defined in docstring
- API change:
MODERNRPC_ENTRY_POINTS_MODULESsetting have been renamed to
- A simple warning is displayed when
MODERNRPC_METHODS_MODULESis not set, instead of a radical
- Some traces have been added to allow debugging in the module easily. It uses the builtin logging framework.
Release 0.4.0 (2016-11-17)¶
- New unified way to register methods. Documentation in progress
- XMl-RPC handler will now correctly serialize and unserialize None values by default. This behavior can be
- When django use a persistent cache (Redis, memcached, etc.), ensure the registry is up-to-date with current sources at startup
Release 0.3.2 (2016-10-26)¶
- Include missing templates in pypi distribution packages
Release 0.3.1 (2016-10-26)¶
- HTML documentation automatically generated for an entry point
system.multicallis now supported, only in XML-RPC
- Many tests added
Release 0.3.0 (2016-10-18)¶
Settings variables have been renamed to limit conflicts with other libraries. In the future, all settings will have the same prefix.
Many other settings added, to make the library more configurable. See http://django-modern-rpc.readthedocs.io/en/latest/basic_usage/settings.html
- RPC methods can now declare the special
**kwargsparameter. The dict will contain information about current context (request, entry point, protocol, etc.)
- About 12 tests added to increase coverage
- Many documentation improvements
system.methodHelpis now supported
Release 0.2.3 (2016-10-13)¶
- Useless tests & testsite packages have been removed from Pypi distributions (binary & source)
Release 0.2.2 (2016-10-13)¶
- Useless tests packages have been removed from Pypi distributions (binary & source)
Release 0.2.1 (2016-10-12)¶
- Project is now configured to report tests coverage. See https://coveralls.io/github/alorence/django-modern-rpc
- Some documentation have been added, to cover more features of the library. See http://django-modern-rpc.readthedocs.io/en/latest/
- Many unit tests added to increase coverage
RPCEntryPointclass can now be configured to handle only requests from a specific protocol
Release 0.2.0 (2016-10-05)¶
- Added very basic documentation: http://django-modern-rpc.rtfd.io/
system.listMethodsis now supported
system.methodSignatureis now supported
- Error reporting has been improved. Correct error codes and messages are returned on usual fail cause.
modernrpc.exceptionsfor more information.
- Many unit tests have been added to increase test coverage of the library
Release 0.1.0 (2016-10-02)¶
This is the very first version of the library. Only a few subset of planned features were implemented
- Work with Python 2.7, 3.3, 3.4 (Django 1.8 only) and 3.5
- Work with Django 1.8, 1.9 and 1.10
- JSON-RPC and XML-RPC simple requests support
- Multiple entry-points with defined list of methods and supported protocols
- No authentication support
- Unit tests doesn’t cover all the code
- RPC system methods utility (
methodSignature, etc.) are not yet implemented
- There is no way to provide documentation in HTML form
- The library itself doesn’t have any documentation (appart from README.md)