You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should we get rid of trio.ssl and trio.subprocess, and tell people to just import ssl/subprocess instead? #852
In the Beginning [1] there was trio.socket. Using a nested namespace seems like the only reasonable way to handle this, because we want to expose 99% of the functionality of the socket module, the socket module API is huge, and the changes we needed to make are complex and all over the place.
Then we copied this style for trio.ssl, and then trio.subprocess.
But for these two modules, it's not as compelling. trio.ssl is just SSLStream and SSLListener, plus a ton of complicated re-exports. trio.subprocess is just Process, plus a ton of complicated re-exports.
Given this, maybe it would be better to put SSLStream, SSLListener, and Process into the top-level trio namespace, and drop the trio.ssl and trio.subprocess modules entirely. Instead we'd just tell people they can import ssl or import subprocess.
CC: @oremanj since this is partly triggered by #833
That looks like four in favor, none opposed - does this need further thought or is it just blocking on someone to do the PR? I can do the PR if it's the latter.
Activity
pquentin commentedon Jan 11, 2019
composition > inheritance
👍
Zac-HD commentedon Jan 11, 2019
Also in favour of simplicity here - and working with small code bases is much more fun.
oremanj commentedon Jan 11, 2019
I'm in favor of this change.
oremanj commentedon Jan 16, 2019
That looks like four in favor, none opposed - does this need further thought or is it just blocking on someone to do the PR? I can do the PR if it's the latter.
njsmith commentedon Jan 16, 2019
@oremanj go for it
Deprecate trio.ssl and trio.subprocess submodules