potiuk opened a new pull request, #73659:
URL: https://github.com/apache/airflow/pull/73659
stable_dns_import was meant to stop the SRV tests hitting real DNS when
another test's patch.dict(sys.modules, ...) leaves the dns package
attribute and sys.modules["dns.resolver"] pointing at different module
objects. It only re-imported the submodules, which is a no-op when they
are already in sys.modules, so the mismatch survived. On Python 3.11+
mock.patch("dns.resolver.resolve") patches the sys.modules copy while
the hook's `import dns.resolver` reads the package attribute, so
test_resolve_srv_targets_orders_by_priority made a real SRV query and
failed. The fixture now points dns.exception, dns.resolver and
dns.asyncresolver on the package at the modules in sys.modules.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]