Open moenoel opened 3 months ago
Hi @moenoel, Thanks for taking the time to report this issue.
I've attempted to reproduce the error locally (using Docker Desktop on macOS 14.4.1) but have been unsuccessful. If you, or anyone else, have a suggestion to simulate/reproduce this bug -- ideally as pytest test outside of docker -- it would be appreciated.
The issue seems to be generally related to disabling IPv6 on Linux. I tested on a Debian 12 VM. From a base install with nothing touched and using requirements.txt
and test.py
from the demo archive, the following works:
sudo apt-get install python3 python3-pip python3-venv
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pytest test.py
But after calling sysctl -w net.ipv6.conf.all.disable_ipv6=1
and then running pytest test.py
again, I get the above error.
smtpdfix version 5.2 breaks when used in the Docker image "python:3-alpine" (just "python:3" works), because the IPv6 localhost address ::1 is not available.
The attached demo.zip is a minimal example to reproduce the error. The same example works when 5.1 is installed instead.
To run the example just execute the following in the demo directory:
pytest error
``` ================================================================ test session starts ================================================================= platform linux -- Python 3.11.4, pytest-8.1.1, pluggy-1.5.0 rootdir: /test plugins: smtpdfix-0.5.2 collected 1 item test.py E [100%] ======================================================================= ERRORS ======================================================================= __________________________________________________________ ERROR at setup of test_sendmail ___________________________________________________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=