- Fixed component not being validated correctly on filter update in the @RequiresVarFilter handler. See #119 for more details.
- Added a
RequiresBroadcast
decorator, which injects a proxy that broadcasts calls to all services matched by the requirement. It also transparently ignores calls when no service matches the requirement.
ConfigurationAdmin
default persistence can now be disabled by setting thepelix.configadmin.persistence.default.disable
framework property to any non-empty value. See #113 for more details.- Added a
to_record()
method inLogEntry
objects. This converts the Pelix entry to alogging.LogRecord
object, which can then be formatted using standard formatters. Note that some information is missing, like the place the log record is from (file path and line).
- The Pelix/iPOPO is now split in two branches: iPOPO (
v1
branch) and ipopo2 (v2
branch). Thev2
branch requires Python 3.7+, whereasv1
will keep compatibility with Python 2.7.
- Fixed an error when starting the framework after having loaded native modules,
e.g.
numpy
. These modules don't have a__path__
set, which case was not handled when the framework normalizes the existing module paths. - Fixed an invalid import of
collections
abstract classes for Python 3.3+ inpelix.internal.hooks
.
- Fixed a memory leak in the thread pool implementation. The patch comes from issue #35 of the jsonrpclib-pelix project.
- Fixed a deadlock in the Py4J provider (issue #100), contributed by Scott Lewis (@scottslewis). See pull request #101 for more details.
- Use a local
etcd
server in Travis-CI instead of a public one.
- Version bump to 0.8 as the addition of Remote Service Admin is a big step forward.
- Fixed unit tests for
pelix.threadpool
- Added a word about Python 3.7 dataclasses in the iPOPO reference card
- All the source code has been reformatted with
black (
black -l 80 pelix
)
- Added the implementation of Remote Service Admin OSGi specification, contributed by Scott Lewis (@scottslewis). This is a major feature which intends to be used instead of Pelix Remote Services. The latter will be kept for retro-compatibility reasons.
- Added a CONTRIBUTING description file to describe the code style
- The
zeroconf
dependency is now forced to version 0.19, to stay compatible with Python 2.7 - Changed them in the documentation (back to standard ReadTheDocs theme)
- Added some reference cards in the documentation: initial configuration file, shell, shell report
- Added support for Event Listeners Hooks. See pull request #88 for more details.
- Fixed
Framework.delete()
when framework was already stopped.
- Added
@ValidateComponent
and@InvalidateComponent
decorators. They allow to define callback methods for component in/validation with access to component context and properties (read-only).@Validate
and@Invalidate
decorators are now simple aliases to those decorators. - Checked behaviour with data classes, introduced in Python 3.7: all seems to work perfectly. See issue 89 for more details.
- New shell completion system: completion is now extensible and can work with
both commands and arguments. This system relies on
readline
. - Added a TLS version of the shell. Its usage and the generation of certificates are described in the Pelix Shell reference card in the documentation.
ShellSession.write_line()
can now be called without argument (prints an empty line)
- Fixed the access bug to the Python LogRecord message in the Log Service
- Removed Python 2.6 compatibility code
- New version of the logo, with SVG sources in the repository
- Added some tests for
install_package()
- When a bundle is stopped, the framework now automatically releases the services it consumed. This was required to avoid stale references when using (prototype) service factories. WARNING: this can lead to issues if you were using stale references to pass information from one bundle version to another (which is bad).
- Added support for Prototype Service Factories, which were missing from issue Service Factories (#75).
- Handle deprecation of the
imp
module (see #85) - Added a
delete()
method to theFramework
class. TheFrameworkFactory
class can now be fully avoided by developers.
- Project documentation migrated to
Read The Docs as the previous documentation
server crashed.
All references to the previous server (
coderxpress.net
) have been removed. - The documentation is being completely rewritten while it is converted from Dokuwiki to Sphinx.
- Removed Pypy 3 from Travis-CI/Tox tests, as it is not compatible with pip.
- Added tests to ensure that all services and utilities are used at least once in all tests environments. This will ease regression detection, especially when following updates of third-party libraries.
- Added
mypy
type hints in important places of the framework
- Added support for Service Factories (#75).
PrototypeServiceFactory
are not supported. - The Framework now adds the
service.bundleid
andservice.scope
properties to services. - The import path normalization now ensures that the full path of the initial working directory is stored in the path, and that the current working directory marker (empty string) is kept as the first entry of the Python path.
- Merged pull request #65, to ignore import errors when normalizing the Python path.
- Merged pull request #68, correcting the behaviour of the thread pool.
- Merged pull request #77,
which fixes the growing of
sys.path
innormalize_path()
.
- The
@Validate
method of components is now always called after the bundle activator has returned. (#66) - Added a
get_instance(name)
method to access to the component instance object by its name. (#74) - Merged pull request #79,
which allows the use of
__qualname__
to automatically name the interface provided by a component according to its class name.
- Added some utility methods to
HttpServletRequest
:get_command()
: get the HTTP command of the requestget_prefix_path()
: get the servlet prefix pathget_sub_path()
: get the part of the path corresponding to the servlet (i.e. without the prefix path)
get_servlet()
now returns the servlet prefix along with the servlet and the server parameters.- Added a
pelix.https
service property and anis_https()
service method to indicate that the server uses HTTPS. - Added a utility module,
pelix.http.routing
, which eases the routing of HTTP requests with decorators like@Http
,@HttpGet
... - Merged pull request #70, avoiding remote HTTP servlets to be used by the local HTTP server.
- Fixed the way servlet are found according to their path
- JSON-RPC and XML-RPC transports providers now support HTTPS.
- Added a Redis-based discovery provider, working with all HTTP-based transport providers.
- Added a ZooKeeper-based discovery provider, working with all HTTP-based transport providers.
- Better detection of the loss of a framework with the mDNS discovery
- mDNS discovery is now based on the PyPI-available
zeroconf
package.
- Added the Configuration Handler, which allows to give a JSON file to set the initial configuration of a framework: properties, bundles, instances, ...
- Console, Remote and XMPP shell now share some common arguments. This allows to use the Configuration Handler arguments in all these scripts.
- The Log Service is now a Service Factory.
- Added a
remove_duplicates()
method, which allows to filter out duplicates from lists, keeping the original order. - Added the
is_bytes()
method.
- Added support for the hidden properties. Those properties won't be seen in the shell nor in the components and factories description API. This is useful when giving password in component properties.
- Added the
RequiresVariableFilter
handler: it works likeRequires
but allows to use component properties in the LDAP filter. The filter is updated each time a component property is updated. - iPOPO registers factories declared directly from a bundle, not those imported by the bundle. This avoids factory re-definitions when installing bundles which import each other.
- Added support for HTTPS. Works for Python 2.7.9+, as it is based upon SSLContext
- Added a log service and its shell commands. It allows to look from the shell
at what has been logged with its API or the
logging
module - The MQTT client gives access to the underlying Paho client API and to its
tls_set()
method.
- iPOPO now has a logo ! (thanks to @debbabi)
- README file has been rewritten
- Better PEP-8 compliance
- Updated jsonrpclib requirement version to 0.2.6
- Optimization of the service registry (less dictionaries, use of sets, ...)
- Added the
hide_bundle_services()
to the service registry. It is by the framework to hide the services of a stopping bundle fromget_service_reference
methods, and before those services will be unregistered. - Removed the deprecated
ServiceEvent.get_type()
method
- Optimization of StoredInstance (handlers, use of sets, ...)
- Added a
is_header_set()
method to the HTTPServletResponse bean. - Response headers are now sent on
end_headers()
, not onset_header()
, to avoid duplicate headers. - The request queue size of the basic HTTP server can now be set as a component
property (
pelix.http.request_queue_size
)
- The
pelix.shell.console
module can now be run as a main script - Added the report shell command
- Added the name of varargs in the signature of commands
- Corrected the signature shown in the help description for static methods
- Corrected the thread and threads shell commands for pypy
- Added support for keyword arguments in most of remote services transports (all except XML-RPC)
- Added support for
pelix.remote.export.only
andpelix.remote.export.none
service properties...only
tells the exporter to export the given specifications only, while..none
forbids the export of the service.
- Updated the MQTT client to follow the new API of Eclipse Paho MQTT Client
- Travis-CI: Added Python 3.5 and Pypy3 targets
- Better configuration of coverage
- Added tests for the remote shell
- Added tests for the MQTT client and for MQTT-RPC
- The properties of a component can be updated when calling the
retry_erroneous()
method. This allows to modify the configuration of a component before trying to validate it again (HTTP port, ...). - The
get_instance_details()
dictionary now always contains a filter entry for each of the component requirement description, even if not filter has been set.
- The
ipopo.retry
shell command accepts properties to be reconfigure the instance before trying to validate it again. - The bundle commands (start, stop, update, uninstall) now prints the name of the bundle along with its ID.
- The
threads
andthreads
shell commands now accept a stack depth limit argument.
- Protect the
ServletRequest.read_data()
method against empty or invalid Content-Length headers
- The stack trace of the exception that caused a component to be in the
ERRONEOUS state is now kept, as a string. It can be seen through the
instance
shell command.
- The command parser has been separated from the shell core service. This allows to create custom shells without giving access to Pelix administration commands.
- Added
cd
andpwd
shell commands, which allow changing the working directory of the framework and printing the current one. - Corrected the encoding of the shell output string, to avoid exceptions when printing special characters.
- Corrected a bug where an imported service with the same endpoint name as an exported service could be exported after the unregistration of the latter.
- The support of Python 2.6 has been removed
- The XMPP bot class now supports anonymous connections using SSL or StartTLS. This is a workaround for issue 351 of SleekXMPP.
- iPOPO now works with IronPython (tested inside Unity 3D)
- Components raising an error during validation goes in the ERRONEOUS state, instead of going back to INVALID. This avoids trying to validate them automatically.
- The
retry_erroneous()
method of the iPOPO service and theretry
shell command allows to retry the validation of an ERRONEOUS component. - The
@SingletonFactory
decorator can replace the@ComponentFactory
one. It ensures that only one component of this factory can be instantiated at a time. - The
@Temporal
requirement decorator allows to require a service and to wait a given amount of time for its replacement before invalidating the component or while using the requirement. @RequiresBest
ensures that it is always the service with the best ranking that is injected in the component.- The
@PostRegistration
and@PreUnregistration
callbacks allows the component to be notified right after one of its services has been registered or will be unregistered.
- The generated 404 page shows the list of registered servlets paths.
- The 404 and 500 error pages can be customized by a hook service.
- The default binding address is back to "0.0.0.0" instead of "localhost". (for those who used the development version)
- The
ThreadPool
class is now a cached thread pool. It now has a minimum and maximum number of threads: only the required threads are alive. A thread waits for a task during 60 seconds (by default) before stopping.
FrameworkFactory.delete_framework()
can be called withNone
or without argument. This simplifies the clean up afters tests, etc.- The list returned by
Framework.get_bundles()
is always sorted by bundle ID.
- Added the
immediate_rebind
option to the@Requires
decorator. This indicates iPOPO to not invalidate then revalidate a component if a service can replace an unbound required one. This option inly applies to non-optional, non-aggregate requirements.
- The I/O handler is now part of a ShellSession bean. The latter has the same API as the I/O handler so there is no need to update existing commands. I/O Handler write methods are now synchronized.
- The shell supports variables as arguments, e.g.
echo $var
. See string.Template for more information. The Template used in Pelix Shell allows.
(dot) in names. - A special variable
$?
stores the result of the last command which returned a result, i.e. anything but None or False. - Added set and unset commands to work with variables
- Added the run command to execute a script file.
- Added protection against
AttributeError
in threads and thread
- Code review to be more PEP-8 compliant
- jsonrpclib-pelix is now an install requirement (instead of an optional one)
- Forget about previous global members when calling
Bundle.update()
. This ensures to have a fresh dictionary of members after a bundle update - Removed
from pelix.constants import *
inpelix.framework
: only usepelix.constants
to access constants
- Added support for endpoint name reuse
- Added support for synonyms: specifications that can be used on the remote side, or which describe a specification of another language (e.g. a Java interface)
- Added support for a pelix.remote.export.reject service property: the specifications it contains won't be exported, event if indicated in service.exported.interfaces.
- Jabsorb-RPC:
- Use the common dispatch() method, like JSON-RPC
- MQTT(-RPC):
- Explicitly stop the reading loop when the MQTT client is disconnecting
- Handle unknown correlation ID
- Added a
loglevel
shell command, to update the log level of any logger - Added a
--verbose
argument to the shell console script - Remote shell module can be ran as a script
- Remove double-slashes when looking for a servlet
- Added base classes to write a XMPP client based on SleekXMPP
- Added a XMPP shell interface, to control Pelix/iPOPO from XMPP
- Added an IPv6 utility module, to setup double-stack and to avoids missing constants bugs in Windows versions of Python
- Added a
EventData
class: it acts likeEvent
, but it allows to store a data when setting the event, or to raise an exception in all callers ofwait()
- Added a
CountdownEvent
class, anEvent
which is set until a given - number of calls to
step()
is reached
- Added a
threading.Future
class now supports a callback methods, to avoid to actively wait for a result.
- Added samples to the project repository
- Removed the static website from the repository
- Added the project to Coveralls
- Increased code coverage
- Added a
@BundleActivator
decorator, to define the bundle activator class. Theactivator
module variable should be replaced by this decorator. - Renamed specifications constants: from
XXX_SPEC
toSERVICE_XXX
- Added a waiting list service: instantiates components as soon as the iPOPO service and the component factory are registered
- Added
@RequiresMap
handler - Added an
if_valid
parameter to binding callbacks decorators:@Bind
,@Update
,@Unbind
,@BindField
,@UpdateField
,@UnbindField
. The decorated method will be called if and only if the component valid. - The
get_factory_context()
fromdecorators
becomes public to ease the implementation of new decorators
- Large rewriting of Remote Service core modules
- Now using OSGi Remote Services properties
- Added support for the OSGi EDEF file format (XML)
- Added an abstract class to easily write RPC implementations
- Added mDNS service discovery
- Added an MQTT discovery protocol
- Added an MQTT-RPC protocol, based on Node.js MQTT-RPC module
- Added a Jabsorb-RPC transport. Pelix can now use Java services and vice-versa, using:
- Enhanced completion with
readline
- Enhanced commands help generation
- Added arguments to filter the output of
bl
,sl
,factories
andinstances
- Corrected
prompt
when usingreadline
- Corrected
write_lines()
when not giving format arguments - Added an
echo
command, to test string parsing
- Added support for managed service factories in ConfigurationAdmin
- Added an EventAdmin-MQTT bridge: events from EventAdmin with an event.propagate property are published over MQTT
- Added an early version of an MQTT Client Factory service
- Added a
misc
package, with utility modules and bundles:eventadmin_printer
: an EventAdmin handler that prints or logs the events it receivesjabsorb
: converts dictionary from and to the Jabsorb-RPC formatmqtt_client
: a wrapper for the Paho MQTT client, used in MQTT discovery and MQTT-RPC.
The license of the iPOPO project is now an Apache License 2.0.
get_*_service_reference*()
methods have a default LDAP filter set toNone
. Only the service specification is required, event if set toNone
.Added a context
use_service(context, svc_ref)
, that allows to consume a service in awith
block:from pelix.utilities import use_service with use_service(bundle_context, svc_ref) as svc: svc.foo()
Service will be released automatically.
Added the Handler Factory pattern : all instance handlers are created by their factory, called by iPOPO according to the handler IDs found in the factory context. This will simplify the creation of new handlers.
Added a context
use_ipopo(context)
, that allows to use the iPOPO service in awith
block:from pelix.ipopo.constants import use_ipopo with use_ipopo(bundle_context) as ipopo: ipopo.instantiate('my.factory', 'my.instance', {})
The iPOPO service will be released automatically.
- Added the ConfigurationAdmin service
- Added the FileInstall service
- Global speedup replacing
list.append()
bybisect.insort()
. - Optimizations in handling services, components and LDAP filters.
- Some classes of Pelix framework and iPOPO core modules extracted to new modules.
@Requires
accepts only one specification- Added a context
use_ipopo(bundle_context)
, to simplify the usage of the iPOPO service, using the keywordwith
. get_factory_details(name)
method now also returns the ID of the bundle provided the component factory, and the component instance properties.
- The help command now uses the inspect module to list the required and optional parameters.
IOHandler
now has aprompt()
method to ask the user to enter a line. It replaces theread()
method, which was to buggy.
- Fixed support of Python 2.6.
- Replaced Python 3 imports conditions by
try-except
blocks.
- Protection of the unregistration of factories, as a component can kill another one of the factory during its invalidation.
- Protection of the unregistration loop during the invalidation of JSON-RPC and XML-RPC exporters.
- The Dispatcher Servlet now handles the discovered part of the discovery process. This simplifies the Multicast Discovery component and suppresses a socket bug/feature on BSD (including Mac OS).
- The
make_table()
method now accepts generators as parameters. - Remote commands handling removed:
get_methods_names()
is not used anymore.
- New
get_factory_details(name)
method in the iPOPO service, acting likeget_instance_details(name)
but for factories. It returns a dictionary describing the given factory. - New
factory
shell command, which describes a component factory: properties, requirements, provided services, ...
- Servlet exceptions are now both sent to the client and logged locally
- Data read from the servlets or sockets are now properly converted from bytes to string before being parsed (Python 3 compatibility).
- Exceptions are now printed using
str(ex)
instead ofex.message
(Python 3 compatibility). - The shell output is now flushed, both by the shell I/O handler and the text console. The remote console was already flushing its output. This allows to run the Pelix shell correctly inside Eclipse.
- An error is now logged if a class is manipulated twice. Decorators executed
after the first manipulation, i.e. upon
@ComponentFactory()
, are ignored.
- New servlet binding parameters:
- http.name : Name of HTTP service. The name of component instance in the case of the basic implementation.
- http.extra : Extra properties of the HTTP service. In the basic implementation, this the content of the http.extra property of the HTTP server component
- New method
accept_binding(path, params)
in servlets. This allows to refuse the binding with a server before to test the availability of the registration path, thus to avoid raising a meaningless exception.
- End points are stored according to their framework
- Added a method
lost_framework(uid)
in the registry of imported services, which unregisters all the services provided by the given framework.
- Shell help command now accepts a command name to print a specific documentation
- Better handling of inherited and overridden methods: a decorated method can now be overridden in a child class, with the name, without warnings.
- Better error logs, with indication of the error source file and line
- The remote shell now provides a service,
pelix.shell.remote
, with aget_access()
method that returns the (host, port) tuple where the remote shell is waiting for clients.
- The HTTP service now supports the update of servlet services properties. A servlet service can now update its registration path property after having been bound to a HTTP service.
- A 500 server error page containing an exception trace is now generated when a servlet fails.
- Bundle.update() now logs the SyntaxError exception that be raised in Python 3.
- Fixed the
threads
command that wasn't working on Python 3.
- The
bound_to()
method of a servlet is called only after the HTTP service is ready to accept clients.
BundleContext.install_bundle()
now returns theBundle
object instead of the bundle ID.BundleContext.get_bundle()
has been updated to accept both IDs andBundle
objects in order to keep a bit of compatibilityFramework.get_symbolic_name()
now returns pelix.framework instead of org.psem2m.pelixServiceEvent.get_type()
is renamedget_kind()
. The other name is still available but is declared deprecated (a warning is logged on its first use).
- Shell command methods now take an
IOHandler
object in parameter instead of input and output file-like streams. This hides the compatibility tricks between Python 2 and 3 and simplifies the output formatting.
- Added this "release notes" page to the web site
BundleContext.install_visiting(path, visitor)
:- Visits the given path and installs the found modules if the visitor accepts them
BundleContext.install_package(path)
(experimental):- Installs all the modules found in the package at the given path
- Based on
install_visiting()
- Components with a
pelix.ipopo.auto_restart
property set to True are automatically re-instantiated after their bundle has been updated.
- Remote Services: use services of a distant Pelix instance
- Multicast discovery
- XML-RPC transport (not fully usable)
- JSON-RPC transport (based on a patched version of jsonrpclib)
- EventAdmin: send events (a)synchronously
Version 0.4 fixes many bugs and provides new features:
create_framework()
utility method- The framework has been refactored, allowing more efficient services and events handling
- A component can provide multiple services
- A service controller can be injected for each provided service, to activate or deactivate its registration
- Dependency injection and service providing mechanisms have been refactored, using a basic handler concept.
- Added a HTTP service component, using the concept of servlet
- Added an extensible shell, interactive and remote, simplifying the usage of a framework instance
Packages have been renamed. As the project goes public, it may not have relations to isandlaTech projects anymore.
Previous name | New name |
---|---|
psem2m | pelix |
psem2m.service.pelix | pelix.framework |
psem2m.component | pelix.ipopo |
psem2m.component.ipopo | pelix.ipopo.core |
Version 0.2 is the first public release, under GPLv3 license (see LICENSE).