]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34246: Use no mutable default args in smtplib (GH-8554)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 7 Sep 2018 22:29:27 +0000 (15:29 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Sep 2018 22:29:27 +0000 (15:29 -0700)
commit9835696ec4c57a9a30f1c11cfb4c5d3e121bf97c
tree206919b7d0b7c91f64d4a5f4283d5ff3d6ca3fe0
parent73994077250bd70385cb8e7a92f24874129369d1
bpo-34246: Use no mutable default args in smtplib (GH-8554)

Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls.
(cherry picked from commit d5fbe9b1a3d65ceeb9159c5ba999ee966a945f76)

Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
Doc/library/smtplib.rst
Lib/smtplib.py
Lib/test/test_smtplib.py
Misc/ACKS
Misc/NEWS.d/next/Library/2018-07-29-15-25-15.bpo-34246.xiKq-Q.rst [new file with mode: 0644]