classification
Title: socket module missing audit events
Type: behavior Stage: resolved
Components: Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: miss-islington, steve.dower, vstinner
Priority: normal Keywords: patch

Created on 2020-03-30 21:31 by steve.dower, last changed 2020-04-01 13:03 by miss-islington. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19238 merged steve.dower, 2020-03-30 22:17
PR 19241 merged miss-islington, 2020-03-31 11:39
PR 19267 merged steve.dower, 2020-03-31 23:31
PR 19275 closed miss-islington, 2020-04-01 08:38
PR 19276 merged miss-islington, 2020-04-01 12:45
Messages (8)
msg365356 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-03-30 21:31
Some of the events it was supposed to raise are not being raised.

This is likely my fault for not adding the thorough testing in the test suite at the time (I'm uncovering them now with a different test suite...) 

I'll do a thorough review of this module and post a PR with the fixes. This shouldn't require any new events, as far as I can tell.
msg365360 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-03-30 23:30
In my defense(?), it was working fine everywhere except Windows. And I'm pretty sure I was working in WSL for this change *shrug*

With the PR, it will match the documentation.
msg365379 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-03-31 11:39
New changeset 63ba5cccf484b9ec23dfbf4cf7ffdc833eda98c3 by Steve Dower in branch 'master':
bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)
https://github.com/python/cpython/commit/63ba5cccf484b9ec23dfbf4cf7ffdc833eda98c3
msg365380 - (view) Author: miss-islington (miss-islington) Date: 2020-03-31 11:57
New changeset 6a0ee60db4cee4a01bae1a2922d21a859e9ea2ed by Miss Islington (bot) in branch '3.8':
bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)
https://github.com/python/cpython/commit/6a0ee60db4cee4a01bae1a2922d21a859e9ea2ed
msg365384 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-03-31 12:30
s390x Fedora 3.x buildbot is unhappy:
https://buildbot.python.org/all/#/builders/336/builds/328

======================================================================
FAIL: test_socket (test.test_audit.AuditTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/test_audit.py", line 125, in test_socket
    self.fail(stderr)
AssertionError

Stderr:
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/audit-tests.py", line 345, in test_socket
    sock.bind(('127.0.0.1', 8080))
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/audit-tests.py", line 358, in <module>
    globals()[test]()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/audit-tests.py", line 346, in test_socket
    except error:
NameError: name 'error' is not defined

----------------------------------------------------------------------
msg365437 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-03-31 23:33
Thanks, Victor!
msg365453 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-04-01 08:38
New changeset 3ef4a7e5a7c29e17d5152d1fa6ceeb1fee269699 by Steve Dower in branch 'master':
bpo-40121: Fix exception type in test (GH-19267)
https://github.com/python/cpython/commit/3ef4a7e5a7c29e17d5152d1fa6ceeb1fee269699
msg365461 - (view) Author: miss-islington (miss-islington) Date: 2020-04-01 13:03
New changeset f971c8c0a0fbe1959843179e2811b047001125a0 by Miss Islington (bot) in branch '3.8':
bpo-40121: Fix exception type in test (GH-19267)
https://github.com/python/cpython/commit/f971c8c0a0fbe1959843179e2811b047001125a0
History
Date User Action Args
2020-04-01 13:03:03miss-islingtonsetmessages: + msg365461
2020-04-01 12:45:07miss-islingtonsetpull_requests: + pull_request18632
2020-04-01 08:39:16steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-04-01 08:38:49steve.dowersetmessages: + msg365453
2020-04-01 08:38:46miss-islingtonsetpull_requests: + pull_request18631
2020-03-31 23:33:07steve.dowersetmessages: + msg365437
2020-03-31 23:31:49steve.dowersetstage: resolved -> patch review
pull_requests: + pull_request18624
2020-03-31 12:30:27vstinnersetstatus: closed -> open

nosy: + vstinner
messages: + msg365384

resolution: fixed -> (no value)
2020-03-31 11:57:14miss-islingtonsetmessages: + msg365380
2020-03-31 11:47:32steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-03-31 11:39:23miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request18600
2020-03-31 11:39:01steve.dowersetmessages: + msg365379
2020-03-30 23:30:38steve.dowersetmessages: + msg365360
2020-03-30 22:17:24steve.dowersetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request18595
2020-03-30 21:31:39steve.dowercreate