[Soap-Python] recent pushes to plq/soaplib

Jamie Kirkpatrick jkp at kirkconsulting.co.uk
Mon Jun 21 19:50:50 CEST 2010


Hi Burak

Thanks very much for the updates.  I have some thoughts reading back what
you've said but they aren't very fully formed :)

 1) the class/instance inconsistency is gone.


<snip>

Great, definitely makes sense.


>
>   c=NotSoComplexType.customize(whatever="punk") # <- class
>
> why would you need that? for example:
>
>   email = String.customize(regex=r'[0-9a-z.]+@[0-9a-z.]+') # (regex
> kwarg not supported yet.)
>
> as I said above, with primitives, there's a shortcut:
>
>   email = String(regex='[0-9a-z.]+@[0-9a-z.]+') # (regex kwarg not
> supported yet.)
>
> This statement implicitly calls customize, and produces a new String
> type on the fly.
>

Is this not possible to achieve for custom types?  I'd rather that things
were consistent and certainly the primitive shortcut is more natural.


>
> (maybe the word customize is too long?)
>
> 2) @soapmethod is renamed to @rpc
>

Fine :) But this release will certainly have to be 0.9 or 1.0 as its going
to break compatibility for current users (nothing major to change for them
though).


>
> 3) xml and etimport modules are gone, nsmap is now just a python dict.
> get_datatype and friends are gone. you can use get_type_name and
> get_type_name_ns methods. soaplib.get_namespace_prefix(namespace)
> manages the namespaces and prefixes automatically.
>
> from lxml import etree
>
> parent = etree.Element("{%s}parent % namespace)
> child = etree.SubElement(parent, "{%s}child" % namespace)
>
> is what we do now.
>

OK, great, this was essentially someone just reviewing the changes I made to
introduce namespace support anyway so its good that this has finally
happened!


>
> 5) CamelCase is only used for class names. anything else has
> underscores_separating_words.
>

We should be using PEP8 style and preferably enforcing this in setup.py by
bundling and running the pep8.py script.


>
> 7) thanks to better modularization of serializers.primitive module, a
> nice chunk of duplicate code was removed.
>

Always a win.


>
> 8) hooks api was updated. as said above, camelCase is gone.
> additionally, on_results takes an additional argument to let you modify
> http headers.
>

Fine.


>
> 9) python's logging module is now used. debug statements should be
> ignored when not debugging.
>

Great -  I despise using code that is littered with print() statements :)


>
> fwiw, these are mostly to scratch my own itches.
>
> awaiting your feedback. please help with documentation!
>

Good work anyway Burak. I noticed also that in your fork you had removed the
client code.  I suggested this a while back as I felt that SUDS had it
covered and I didn't want to duplicate efforts with them but I seem to
recall some people shouting that they used this code.  What is your feeling
on the matter?


>
> best,
> burak
>
>
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20100621/3ed6af59/attachment.html>


More information about the Soap mailing list