After upgrading several of certbot's packages, including requests to 2.32.3, we suddenly started experiencing confusing DNS resolution errors with no clear cause. Only after bisecting the changed packages and isolating requests as the source of the trouble did we see that 2.32.2 deprecated the HTTPAdapter.get_connection() method we used.
Unfortunately, the change which deprecated get_connection() also causes it never to be called by Session, so the DeprecationWarning added in #6710 will never be printed. If Session perhaps checked if get_connection() was defined and called it, the warning would've printed and would've saved us quite a lot of time tracking down the issue.
I also generally wouldn't expect a minor version upgrade in a dependency to cause a breaking change, so this result was extra confusing.
Expected Result
HTTPAdapter.get_connection() to still be called, resulting in no breaking changes and giving users the deprecation warning. Or at the very least, check if get_connection is defined and print the deprecation warning then.
Actual Result
HTTPAdapter.get_connection() is silently left uncalled, causing a breakage.
After upgrading several of certbot's packages, including
requeststo 2.32.3, we suddenly started experiencing confusing DNS resolution errors with no clear cause. Only after bisecting the changed packages and isolatingrequestsas the source of the trouble did we see that 2.32.2 deprecated theHTTPAdapter.get_connection()method we used.Unfortunately, the change which deprecated
get_connection()also causes it never to be called bySession, so theDeprecationWarningadded in #6710 will never be printed. IfSessionperhaps checked ifget_connection()was defined and called it, the warning would've printed and would've saved us quite a lot of time tracking down the issue.I also generally wouldn't expect a minor version upgrade in a dependency to cause a breaking change, so this result was extra confusing.
Expected Result
HTTPAdapter.get_connection()to still be called, resulting in no breaking changes and giving users the deprecation warning. Or at the very least, check ifget_connectionis defined and print the deprecation warning then.Actual Result
HTTPAdapter.get_connection()is silently left uncalled, causing a breakage.