Ticket #4963: 4963.patch
| File 4963.patch, 2.3 KB (added by moijes12, 13 months ago) |
|---|
-
twisted/mail/test/test_mail.py
2008 2008 2009 2009 2010 2010 2011 2012 2013 2014 2011 class TestDomain: 2015 2012 def __init__(self, aliases, users): 2016 2013 self.aliases = aliases … … 2031 2028 raise smtp.SMTPBadRcpt(user) 2032 2029 2033 2030 2031 2032 class SSLContextFactoryTests(unittest.TestCase): 2033 """ 2034 Tests for twisted.mail.protocols.SSLContextFactory. 2035 """ 2036 2037 2038 def testDeprecation(self): 2039 """ 2040 Test deprecation of twisted.mail.protocols.SSLContextFactory. 2041 """ 2042 mail.protocols.SSLContextFactory('') 2043 warningsShown = self.flushWarnings([self.testDeprecation]) 2044 self.assertEqual(len(warningsShown), 1) 2045 self.assertIdentical(warningsShown[0]['category'], DeprecationWarning) 2046 self.assertEqual(warningsShown[0]['message'], 'twisted.mail.protocols.SSLContextFactory was deprecated in Twisted 12.1.0: Use twisted.internet.ssl.DefaultOpenSSLContextFactory instead.') 2047 2034 2048 from twisted.python.runtime import platformType 2035 2049 import types 2036 2050 if platformType != "posix": -
twisted/mail/topfiles/4963.removal
1 twisted.mail.protocols.SSLContextFactory is now deprecated. -
twisted/mail/protocols.py
12 12 from twisted.internet import defer 13 13 from twisted.copyright import longversion 14 14 from twisted.python import log 15 from twisted.python.deprecate import deprecatedModuleAttribute 16 from twisted.python.versions import Version 15 17 16 18 from twisted import cred 17 19 import twisted.cred.error … … 213 215 214 216 This loads a certificate and private key from a specified file. 215 217 """ 218 219 deprecatedModuleAttribute(Version("Twisted", 12, 1, 0), "Use twisted.internet.ssl.DefaultOpenSSLContextFactory instead.", "twisted.mail.protocols", "SSLContextFactory") 220 221 216 222 def __init__(self, filename): 217 223 self.filename = filename 218 224
