After upgrading mailgun-python from 1.6.0 to 1.7.0, every request 404s when api_url includes the version path, e.g. api_url="https://api.eu.mailgun.net/v3" (the shape shown in the SDK's own README). The SDK now appends /v3 unconditionally, producing https://api.eu.mailgun.net/v3/v3/....
mailgun-python 1.7.0: all requests 404 when api_url includes /v3
This is a regression in 1.7.0: the SDK replaced urljoin with f-string URL building for a routing speedup, and urljoin had quietly replaced a trailing /v3 segment — the f-strings just duplicate it. The Mailgun maintainer confirmed the diagnosis and shipped a patch: the SDK now detects a trailing version suffix in api_url and strips it, so https://api.eu.mailgun.net/v3 keeps working without changes. Fix: upgrade to the latest 1.7.x release, or remove the /v3 suffix from api_url. Source: https://github.com/mailgun/mailgun-python/issues/40
Source: https://github.com/mailgun/mailgun-python/issues/40