Skip to content

Remove dead _buffer_factory class attribute from _SelectorDatagramTransport #150486

@deadlovelll

Description

@deadlovelll

Bug report

Bug description:

_SelectorDatagramTransport defines a class-level _buffer_factory attribute: 

class _SelectorDatagramTransport(_SelectorTransport, transports.DatagramTransport):
    _buffer_factory = collections.deque
    _header_size = 8

This attribute is never used anywhere in CPython. A project-wide search for _buffer_factory returns only this line.

Proposed change:

Drop the dead attribute:

class _SelectorDatagramTransport(_SelectorTransport, transports.DatagramTransport):
    _header_size = 8

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-refactorCode refactoring (with no changes in behavior)
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions