GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Missing terminator option when using readline with socketserver.StreamRequestHandler · Issue #75547 · python/cpython

Missing terminator option when using readline with socketserver.StreamRequestHandler #75547

New issue
Copy link
New issue
Copy link
Open
Open
Missing terminator option when using readline with socketserver.StreamRequestHandler#75547
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modulestype-featureA feature request or enhancementA feature request or enhancement

Description

tfeldmann
mannequin
opened on Sep 6, 2017
Issue body actions
BPO 31366
Nosy @vadmium, @tfeldmann

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2017-09-06.14:37:14.332>
labels = ['type-feature', 'library']
title = 'Missing terminator option when using readline with socketserver.StreamRequestHandler'
updated_at = <Date 2017-09-08.22:52:04.530>
user = 'https://github.com/tfeldmann'

bugs.python.org fields:

activity = <Date 2017-09-08.22:52:04.530>
actor = 'martin.panter'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2017-09-06.14:37:14.332>
creator = 'tfeldmann'
dependencies = []
files = []
hgrepos = []
issue_num = 31366
keywords = []
message_count = 2.0
messages = ['301474', '301753']
nosy_count = 2.0
nosy_names = ['martin.panter', 'tfeldmann']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue31366'
versions = []

Activity

  1. tfeldmann commented on Sep 6, 2017

    @tfeldmann
    tfeldmannmannequin
    on Sep 6, 2017
    MannequinAuthor
    More actions

    When using socketserver.StreamRequestHandler it should be possible to specify the newline terminator that is passed to self.connection.makefile().

    This would be greatly appreciated by many people who have to work with network packets ending with \0.

  2. tfeldmann
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancementA feature request or enhancement
    on Sep 6, 2017
  3. vadmium commented on Sep 8, 2017

    @vadmium
    vadmium
    on Sep 8, 2017
    Member
    More actions

    The socket.makefile(newline=...) parameter only affects text mode, but StreamRequestHandler’s “rfile” attribute works in byte mode. You could call makefile or TextIOWrapper yourself, but neither of these options support reading null-terminated “lines” or packets.

    I think it would be best to implement this more generally, e.g. via bpo-1152248 or bpo-17083. Perhaps like the “asyncio.StreamReader.readuntil” or “telnetlib.Telnet.read_until” methods, rather than a stream configuration option.

  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. serhiy-storchaka
    added
    topic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modules
    on Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modulestype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.