| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* python/service.py: Major changes to allow multiple inheritance
        from classes that define D-Bus interfaces:
         1. Create a new Interface class which is the parent class of
            Object, and make the ObjectType metaclass into InterfaceType.
         2. Patch written with Rob Taylor to replace use of method_vtable
            with code that walks the class's __MRO__ (method resolution order)
            to behave like Python does when invoking methods and allow
            overriding as you'd expect. Code is quite tricky because
            we have to find two methods, the one to invoke which has the
            right name and isn't decorated with the /wrong/ interface,
            and the one to pick up the signatures from which is decorated
            with the right interface.
            The same caveats apply as to normal multiple inheritance -
            this has undefined behaviour if you try and inherit from two
            classes that define a method with the same name but are
            decorated with different interfaces. You should decorate
            your overriding method with the interface you want.
         3. Replace grungy introspection XML generation code in the metaclass
            with dictionaries that cope correctly with multiple inheritance
            and the overriding of methods. This also uses the signature
            decorations to provide correct introspection data, including
            the debut appearance of the types of your return values. :D
        * test/python/test-client.py, test/python/test-service.py: Add a test
        case to try invoking an method that overrides one inherited from a
        D-Bus interface class.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* python/decorators.py: Add optional arguments to the method and
        signal decorators to allow you to specify the signature of arguments
        and return values. Preserve the doc strings of signal functions in the
        decorated version, for pydoc and friends.
        * python/dbus_bindings.pyx, python/proxies.py: Replace the
        parse_signature_block function with an iterable dbus.Signature()
        type. Fix a bug in MessageIter.append_strict where you could append
        anything by claiming it was a string.
        * python/service.py: Use the out_signature decoration on methods to
        marshal return values, meaning you no longer require dbus.Array()
        or dbus.Dictionary() to indicate the type when returning empty
        arrays or dictionaries. Fix a bug where exceptions which are defined
        in __main__ are not turned into error replies.
        * test/python/test-client.py, test/python/test-service.py: Add test
        for correct marshalling of return values according to out_signature.
        Fix a bug in the async call test where the error_handler is missing a
        self argument.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
* python/service.py (Object::_message_cb): handle exceptions correctly
  by sending them over the wire to the calling app.  This makes sure
  the client returns immediately instead of waiting the 15 seconds to
  timeout.
* test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect):
  Add a test to benchmark how long it takes to introspect a service and
  call a method which returns a large element (pretty fast)
* test/python/test-service.py (TestObject::GetComplexArray): new test
  method which pushes a lot of data
 | 
| | 
| 
| 
| 
|  | 
reclaim memory outside of the loop and use del istead of just setting
the key to None
 | 
| | 
| 
| 
|  | 
signal tag even when there are no arguments
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
instead of marshal basic so we can handle recursive types in a variant
* test/glib/test-dbus-glib.c: Add test for marshaling recurive types
  in variants
* test/glib/test-service-glib.c, test-service-glib.xml
  (my_object_echo_variant [EchoVariant],
  my_object_process_variant_of_array_of_ints123
  [ProcessVariantOfArrayOfInts123]):
  Add two test methods
* python/introspect_parser.py: New module for parsing introspect
  data.
* python/dbus_bindings.pyx:
  (various places): when throwing errors fix to use errormsg instead
  of message local variable because Pyrex can get confused with other
  message variables (initial patch by Robert McQueen
  <robert.mcqueen at collabora.co.uk>)
  (MessageIter::parse_signature_block): new method for getting the next
  block in a signiture.
  (MessageIter::append_strict): new method for appending values strictly
  using the passed in signature instead of guessing at the type
  (MessageItter:: append_dict, append_struct, append_array): use
  signatures to marshal children if the signature is available
* python/exceptions.py (IntrospectionParserException): new exception
* python/proxies.py (ProxyMethod::__call__): Marshal args with
  introspected signatures if available, else we fall back to the
  old way of doing things.
  (ProxyObject::_introspect_reply_handler ): parse introspection data
* python/service.py (ObjectType::_reflect_on_method): Properly
  terminate <method> if there are no args in the reflection data
* test/python/test-client.py: add tests for talking with the GLib
  test server.  This gives us better coverage for introspection since
  python to python will always generate arguments as variants.  It also
  allows us to test the robustness of the GLib bindings and interlanguage
  communications.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* python/dbus_bindings.pyx:
	- Fixed type objects to have self passed into __init__
	- Added the Variant type
	- Add the ability to specify types or signatures for Array, Variant and Dictionary
	- (Connection::send_with_reply_handlers): return a PendingCall object
	- (_pending_call_notification): handle the case when an error is returned
	without an error message in the body
	- (MessageIter::get_boolean): return True or False instead of an integer
	- (MessageIter::python_value_to_dbus_sig): add direct checking of types and
	add checks for objects with embeded signatures or types (Array, Variant and
	Dictionary)
	- (MessageIter::append_byte): handle case when the value is a dbus.Byte
	- (MessageIter::append_dict): handle embeded types or signatures
	- (MessageIter::append_array): handle embeded types or signatures
	- (MessageIter::append_variant): new method
	* python/proxies.py:
	- (DeferedMethod): New. Dummy executable object used when queuing calls blocking on
	introspection data
	- (ProxyMethod::__call__): add the timeout keyword for specifying longer or
	shorter timeouts for method calls
	- (ProxyObject): Add first pass at an introspection state machine
	- (ProxyObject::__init__): Add introspect keyword for turing off an on
	introspection.
	- (ProxyObject::_Introspect): Internal Introspect call that bypasses the usual
	mechanisms for sending messages.  This is to avoid a deadlock where the Intospect
	call would be queued waiting for the Introspect call to finish ;-)
	- (ProxyObject::_introspect_reply_handler): New.  This method is called when
	introspection returns with no error
	- (ProxyObject::_introspect_error_handler): New.  This method is called when
	introspection encounters an error
	- (ProxyObject::__getattr__): Code to handle different introspection states.
	Queue async calls or block blocking calls if we are introspecting.  Pass through
	as normal if we are not or are done with introspecting.
	* python/service.py: Import signal and method from decorators.py
	* python/types.py: Add Variant type
 | 
| | 
| 
| 
| 
| 
|  | 
proxies.py, service.py: Cleanup of code after running it through the
  pyflakes code checker mostly dealing with undefined names.
  (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
        * NEWS: Update to 0.35.2
2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
        * python/_dbus.py: Remove import of the dbus.services
        module as it no longer exists (patch from Dimitur Kirov)
        * python/service.py (Object::__init__): Fixed typo
        s/name/bus_name (patch from Dimitur Kirov)
        * python/examples/example-signal-emitter.py: import dbus.glib
        to get the main loop and use glib mainloop instead of gtk so
        X doesn't have to be running.
        * python/examples/example-signal-recipient.py: import dbus.glib
        to get the main loop and use glib mainloop instead of gtk so
        X doesn't have to be running. Import the decorators module
        directly.
        * test/glib/Makefile.am:  Added DIST_EXTRA files that distcheck
        didn't pick up on but are needed to build
        * configure.in: upped version to 0.35.2
        * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
        added Colin Walters' SELinux API rename patch from head
        s/unix sercurity context/selinux security context/
2005-07-16  John (J5) Palmieri  <johnp@redhat.com>
        * python/Makefile.am: dbus_binding.pxd.in should be included
        in EXTRA_DIST not dbus_binding.pxd
        fix up $(srcdir) hopefully for the last time
        * NEWS: Update to 0.35.1
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
for sending messages to oneself (TODO item).
* python/service.py (class Object): Swap ordering of bus_name
  and object_path parameters to better support inheritance.
* doc/dbus-tutorial.xml: change Python docs to reflect change
  in parameter ordering and fix the inheritance section.
* doc/TODO: remove sending message to oneself TODO item
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
* python/service.py (class Name): renamed BusName to make it clearer
  what the object is for (a name on the bus)
* python/examples/example-service.py,
  python/examples/example-signal-emitter.py: change the Name object to
  BusName
 | 
|   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   | 
* python/dbus_bindings.pyx: Added.
	- Fixed some memleaks (patch from
	  Sean Meiners <sean.meiners@linspireinc.com>)
	- Broke out the #include "dbus_h_wrapper.h" and put it in its
	  own pxd file (Pyrex definition)
	- Broke out glib dependancies into its own pyx module
* python/dbus_bindings.pdx: Added.
	- Defines C class Connection for exporting to other modules
* python/dbus_glib_bindings.pyx: Added.
	- New module to handle lowlevel dbus-glib mainloop integration
* python/glib.py: Added.
	- Registers the glib mainloop when you import this module
* python/services.py: Removed (renamed to service.py)
* python/service.py: Added.
	- (class Server): renamed Name
* python/__init__.py: Bump ro version (0,41,0)
	- don't import the decorators or service module
   	  by default.  These now reside in the dbus.service namespace
* python/_dbus.py (Bus::__init__): Add code run the main loop
  setup function on creation
* python/examples/example-service.py,
  python/examples/example-signal-emitter.py: update examples
* python/examples/gconf-proxy-service.py,
  python/examples/gconf-proxy-service2.py: TODO fix these up
* doc/TODO: Addition
	- Added a Python Bindings 1.0 section
	- added "Add match on args or match on details to match rules"
 |