Opened 4 years ago

Closed 4 years ago

#4695 enhancement closed fixed (fixed)

plugin registration for extensions to endpoints.serverFromString and endpoints.clientFromString

Reported by: glyph Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/endpoints-plugins-4695
(diff, github, buildbot, log)
Author: glyph Launchpad Bug:

Description (last modified by glyph)

Originally #4473 specified a plugin API, but that was biting off more than a single ticket could chew by a wide margin. This ticket is to complete that work.

As originally specified:

(serverFromString and clientFromString) should be implemented in terms of a pluggable API, like the one in twisted.cred.strcred, so that third parties can supply their own Twisted transports and built-in protocols can be invoked using them.

Change History (13)

comment:1 Changed 4 years ago by glyph

  • Description modified (diff)

comment:2 Changed 4 years ago by glyph

  • Author set to glyph
  • Branch set to branches/endpoints-plugins-4695

(In [30304]) Branching to 'endpoints-plugins-4695'

comment:3 Changed 4 years ago by glyph

  • Keywords review added
  • Owner glyph deleted

comment:4 Changed 4 years ago by exarkun

  • Keywords review removed
  • Owner set to glyph
  1. The class docstring for IStreamClientEndpointStringParser ends with "plugin method" but probably means "prefix method"
  2. Why is prefix a method and not just an attribute?
  3. The unrecognized prefix case of clientFromString is untested and probably should more closely resemble the behavior of serverFromString in that case - currently the caller will get TypeError: 'NoneType' object is not callable.
  4. Needs a news fragment

comment:5 Changed 4 years ago by glyph

(In [30338]) plugin -> prefix re #4695 point 1

comment:6 Changed 4 years ago by glyph

(In [30339]) re #4695 review point 4: NEWS file

comment:7 Changed 4 years ago by glyph

(In [30340]) re #4695 review point 2: make prefix an attribute instead of a method

comment:8 Changed 4 years ago by glyph

(In [30342]) re #4695 review point 3: failing test for unrecognized client prefix

comment:9 Changed 4 years ago by glyph

(In [30343]) re #4695 review point 3: make the test for unrecognized prefix pass.

comment:10 Changed 4 years ago by glyph

  • Keywords review added
  • Owner glyph deleted

Build results (see link above) ready with the usual potpourri of Windows failures; I think that addresses all the points of feedback.

comment:11 Changed 4 years ago by exarkun

  • Keywords review removed
  • Owner set to glyph
  1. The first line of endpoints.py belongs somewhere else

Otherwise, great, please merge!

comment:12 Changed 4 years ago by glyph

  • Resolution set to fixed
  • Status changed from new to closed

(In [30348]) Merge endpoints-plugins-4695.

Author: glyph

Reviewer: exarkun

Fixes: #4695

Add plugin interfaces to allow third parties to implement their own client and
server endpoint types, and have them be parsed by clientFromString,
serverFromString, and strports.service().

comment:13 Changed 4 years ago by <automation>

  • Owner glyph deleted
Note: See TracTickets for help on using tickets.