mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #13248: turn 3.2's PendingDeprecationWarning into 3.3's DeprecationWarning (cgi, importlib, nntplib, smtpd).
This commit is contained in:
parent
720682efd1
commit
67317750af
8 changed files with 59 additions and 51 deletions
|
@ -239,49 +239,49 @@ class SMTPDChannelTest(TestCase):
|
|||
self.assertEqual(self.channel.socket.last, b'501 Syntax: RSET\r\n')
|
||||
|
||||
def test_attribute_deprecations(self):
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__server
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__server = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__line
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__line = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__state
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__state = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__greeting
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__greeting = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__mailfrom
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__mailfrom = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__rcpttos
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__rcpttos = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__data
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__data = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__fqdn
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__fqdn = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__peer
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__peer = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__conn
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__conn = 'spam'
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
spam = self.channel._SMTPChannel__addr
|
||||
with support.check_warnings(('', PendingDeprecationWarning)):
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
self.channel._SMTPChannel__addr = 'spam'
|
||||
|
||||
def test_main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue