gh-79156: Add start_tls() method to streams API by arhadthedev · Pull Request #91453 · python/cpython

A reupload of gh-13143 with the ported whatsnew since the original author is waiting for three years already. For strange reason, the original branch is missing and the PR has no corresponding "{username} deleted the {branch} branch" notification line.

The PR is revived after a thread on python-dev:

Oleg Iarygin

Hi everyone,

Can PR gh-13143 be reopened and reviewed/merged when possible? It was closed in favor of the new asyncio streams API (gh-13251). Later, the API was cleanly removed (gh-16482) so the proposed PR became relevant again.

The added method allows to turn encryption on on demand (and off, as the author expressed his readiness). It's required for a CPython test suit, to port test.test_ftplib.DummyFTPServer from asyncore/asynchat before their removal according to PEP 594 (Removing dead batteries from the standard library).

Thank you in advance.

Jelle Zijlstra

I can't reopen the PR; I assume the branch was deleted. It's going to be easier to just open a new PR.

Linked to gh-79156; the original issue may be closed with the following stop_tls() PR.

Co-authored-by: Ian Good icgood@gmail.com