diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-27 11:07:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 11:07:16 -0700 |
commit | 4fee28aa42dbac7f08a6d2829546b7d8e848034d (patch) | |
tree | 119433f608f787c9e34aa68abd4277ec3e108e13 /Lib | |
parent | bpo-30345: travis: use -Og with --with-pydebug (GH-14423) (diff) | |
download | cpython-4fee28aa42dbac7f08a6d2829546b7d8e848034d.tar.gz cpython-4fee28aa42dbac7f08a6d2829546b7d8e848034d.tar.bz2 cpython-4fee28aa42dbac7f08a6d2829546b7d8e848034d.zip |
bpo-37390: Add audit event table to documentations (GH-14406)
Also updates some (unreleased) event names to be consistent with the others.
(cherry picked from commit 44f91c388a6f4da9ed3300df32ca290b8aa104ea)
Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ftplib.py | 4 | ||||
-rw-r--r-- | Lib/imaplib.py | 4 | ||||
-rw-r--r-- | Lib/nntplib.py | 6 | ||||
-rw-r--r-- | Lib/poplib.py | 4 | ||||
-rwxr-xr-x | Lib/smtplib.py | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 27bf6daea61..58a46bca4a3 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -148,7 +148,7 @@ class FTP: self.timeout = timeout if source_address is not None: self.source_address = source_address - sys.audit("ftplib.FTP.connect", self, self.host, self.port) + sys.audit("ftplib.connect", self, self.host, self.port) self.sock = socket.create_connection((self.host, self.port), self.timeout, source_address=self.source_address) self.af = self.sock.family @@ -189,7 +189,7 @@ class FTP: def putline(self, line): if '\r' in line or '\n' in line: raise ValueError('an illegal newline character should not be contained') - sys.audit("ftplib.FTP.sendcmd", self, line) + sys.audit("ftplib.sendcmd", self, line) line = line + CRLF if self.debugging > 1: print('*put*', self.sanitize(line)) diff --git a/Lib/imaplib.py b/Lib/imaplib.py index face45ba5fa..822d9d6fdd8 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -289,7 +289,7 @@ class IMAP4: # (which is used by socket.create_connection()) expects None # as a default value for host. host = None if not self.host else self.host - sys.audit("imaplib.IMAP4.open", self, self.host, self.port) + sys.audit("imaplib.open", self, self.host, self.port) return socket.create_connection((host, self.port)) def open(self, host = '', port = IMAP4_PORT): @@ -319,7 +319,7 @@ class IMAP4: def send(self, data): """Send data to remote.""" - sys.audit("imaplib.IMAP4.send", self, data) + sys.audit("imaplib.send", self, data) self.sock.sendall(data) diff --git a/Lib/nntplib.py b/Lib/nntplib.py index e7bbc853c07..1b7e83af01a 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -414,7 +414,7 @@ class _NNTPBase: def _putline(self, line): """Internal: send one line to the server, appending CRLF. The `line` must be a bytes-like object.""" - sys.audit("nntplib.NNTP.putline", self, line) + sys.audit("nntplib.putline", self, line) line = line + _CRLF if self.debugging > 1: print('*put*', repr(line)) self.file.write(line) @@ -1042,7 +1042,7 @@ class NNTP(_NNTPBase): """ self.host = host self.port = port - sys.audit("nntplib.NNTP", self, host, port) + sys.audit("nntplib.connect", self, host, port) self.sock = socket.create_connection((host, port), timeout) file = None try: @@ -1074,7 +1074,7 @@ if _have_ssl: """This works identically to NNTP.__init__, except for the change in default port and the `ssl_context` argument for SSL connections. """ - sys.audit("nntplib.NNTP", self, host, port) + sys.audit("nntplib.connect", self, host, port) self.sock = socket.create_connection((host, port), timeout) file = None try: diff --git a/Lib/poplib.py b/Lib/poplib.py index ced0a2d53c5..e3bd2ab1ebc 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -100,7 +100,7 @@ class POP3: self.host = host self.port = port self._tls_established = False - sys.audit("poplib.POP3", self, host, port) + sys.audit("poplib.connect", self, host, port) self.sock = self._create_socket(timeout) self.file = self.sock.makefile('rb') self._debugging = 0 @@ -111,7 +111,7 @@ class POP3: def _putline(self, line): if self._debugging > 1: print('*put*', repr(line)) - sys.audit("poplib.POP3.putline", self, line) + sys.audit("poplib.putline", self, line) self.sock.sendall(line + CRLF) diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 01f3d4386f5..a634f7ae733 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -335,7 +335,7 @@ class SMTP: port = self.default_port if self.debuglevel > 0: self._print_debug('connect:', (host, port)) - sys.audit("smtplib.SMTP.connect", self, host, port) + sys.audit("smtplib.connect", self, host, port) self.sock = self._get_socket(host, port, self.timeout) self.file = None (code, msg) = self.getreply() @@ -353,7 +353,7 @@ class SMTP: # should not be used, but 'data' needs to convert the string to # binary itself anyway, so that's not a problem. s = s.encode(self.command_encoding) - sys.audit("smtplib.SMTP.send", self, s) + sys.audit("smtplib.send", self, s) try: self.sock.sendall(s) except OSError: |