Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

socketserver: Add missing ForkingUnixStreamServer and ForkingUnixDatagramServer servers #103673

Closed
Assignees
gpshead
Labels
type-featureA feature request or enhancement
@jb2170

Description

@jb2170

Enhancement

This issue / PR addresses two missing servers from thesocketserver module

Current behaviour

socketserver has the following

ProtocolFamilySimpleForkingThreading
TCPAF_INETTCPServerForkingTCPServerThreadingTCPServer
TCPAF_UNIXUnixStreamServer???ThreadingUnixStreamServer
UDPAF_INETUDPServerForkingUDPServerThreadingUDPServer
UDPAF_UNIXUnixDatagramServer???ThreadingUnixDatagramServer

Observe the two gaps marked by "???"

Proposal

In the casehasattr(socket, "AF_UNIX") and hasattr(os, "fork") we enable the two missing servers as

classForkingUnixStreamServer(ForkingMixIn,UnixStreamServer):passclassForkingUnixDatagramServer(ForkingMixIn,UnixDatagramServer):pass

These follow the established naming convention

This enhancement is completely forwards/backwards compatible

Mentions in the documentation are included in the PR corresponding to this issue

Pitch

GooglingForkingUnixStreamServer shows a few people / codebases which define such a class in the same manner as above. I myself have done so in aproject.

These classes seem to have been overlooked because they require twoif checks forhasattr(socket, "AF_UNIX") andhasattr(os, "fork").

It seems clear to me therefore that these two classes should be added to thesocketserver standard library module

Some people prefer forks to threads

Linked PRs

Metadata

Metadata

Assignees

Labels

type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp