Ticket #4695 enhancement closed fixed

Opened 3 years ago

Last modified 2 years ago

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
Author: glyph Launchpad Bug:

Description (last modified by glyph) (diff)

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

1

Changed 3 years ago by glyph

  • description modified (diff)

2

Changed 2 years ago by glyph

  • branch set to branches/endpoints-plugins-4695
  • branch_author set to glyph

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

3

Changed 2 years ago by glyph

  • keywords review added
  • owner glyph deleted

4

Changed 2 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

5

Changed 2 years ago by glyph

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

6

Changed 2 years ago by glyph

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

7

Changed 2 years ago by glyph

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

8

Changed 2 years ago by glyph

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

9

Changed 2 years ago by glyph

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

10

Changed 2 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.

11

Changed 2 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!

12

Changed 2 years ago by glyph

  • status changed from new to closed
  • resolution set to fixed

(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().

13

Changed 2 years ago by <automation>

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