[Twisted-Python] Endpoint composition syntax

Tom Prince tom.prince at ualberta.net
Thu Oct 13 13:47:54 MDT 2016


> This applies more generally; no need for any weird hacks.  Any 'new'
plugin could just opt in to a different syntax; we can just look up until
the first ':'; we just need to define a new interface for a new syntax.

I don't think that this provides a good user experience.

1) There are existing endpoints that want nestable endpoints, so either
    a) They don't change, somewhat defeating the purpose of having a new
syntax (or cluttering the endpoint namespace with less than useful
endpoints).
    b) They change incompatibility, defeating the purpose of trying to
maintain backwards compatability.

2) As user, I need to learn which endpoints support the new syntax, thus
potentially needing to know both methods of quoting and switch between them
as appropriate.


There are a couple of possible ways around this, without requiring a weird
hack.
- I wonder how many endpoints strings have ever been written whose value
starts with any of `[` `(` or `{`? I suspect that the number might in fact
be 0. In which case, although the change is technically incompatible, in
practice it wouldn't be.
- Alternatively, we could deprecate an unquoted [, (, { at the beginning of
a value, and then after a suitable deprecation period (perhaps additionally
a release where it is just an error), we could repurpose one of them to act
as quoting (leaving the other two for future extensiblity).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20161013/9ab73b3c/attachment-0002.html>


More information about the Twisted-Python mailing list