New submission from pavel-lexyr <pa...@lexyr.com>:
Python's native HTTP server (http.server module) has special code to allow it to detect and bind to IPv6 addresses when called as a CLI tool. As of right now, the code is in private functions. Those are not intended to be called by library users - only the CLI command. People want to create HTTP/WSGI servers programmatically - then they run into similar problems. Since the relevant code is not open for library use, they copy it to their own projects instead. That's code duplication. Exhibit A: https://github.com/prometheus/client_python/pull/657 This doesn't look like a good way to do things. To avoid such problems, it can be useful to have the CLI tool's protocol version resolver added to the library. This relates to bpo-20215, which has related aspirations - but a broader scope. ---------- components: Library (Lib) messages: 396655 nosy: jaraco, pavel-lexyr priority: normal severity: normal status: open title: Move IP version resolving to http.server's API type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44528> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com