Tests fail on Python 3.12: `ssl.wrap_socket` removed
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start with tests/core/lib/test_ssl.py::TestSslMethod::test_create_tcp_socket and tests/core/lib/test_socket.py::TestSocketMethod::test_create_tcp_socket, then inspect how each test patches ssl.wrap_socket. Update the tests to use an API supported by Python 3.12 while preserving their existing assertions, and run both tests across the supported Python versions.
Written by the indexing model from the issue text.
Description
Two tests fail on Python 3.12 because they patch ssl.wrap_socket, which was removed in Python 3.12:
- tests/core/lib/test_ssl.py::TestSslMethod::test_create_tcp_socket
- tests/core/lib/test_socket.py::TestSocketMethod::test_create_tcp_socket
Error message:
AttributeError: <module 'ssl' from '.../python3.12/ssl.py'> does not have the attribute 'wrap_socket'
I believe this is mainly because Python 3.12 removed the deprecated ssl.wrap_socket() API (deprecated since 3.7).
Environment:
Python 3.12.8
Project supports Python 3.10–3.12 per pyproject.toml (python = "^3.10, <3.13") and docs
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 1.2k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OWASP/Nettacker
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100