bpo-40834: Fix truncate when sending str object with channel (GH-20555)

(cherry picked from commit 29c117202e386bad1d66ae336e2fefa1a1809ee0)

Co-authored-by: An Long <aisk@users.noreply.github.com>
3 files changed