Skip to content

Conversation

@kh813
Copy link

@kh813 kh813 commented Aug 4, 2025

Based on the Maintain ordering in flattened SPF record

Update deprecated modules and improve compatibility

@kh813
Copy link
Author

kh813 commented Aug 4, 2025

Thank you for creating this useful SPF flattening tool!

I've updated the code to address the deprecation warnings and improve Python 3.12+ compatibility:

Changes made:

  • Replaced deprecated imp module with importlib
  • Updated DNS resolver error handling for better compatibility
  • Improved exception handling throughout the code
  • Maintained backward compatibility where possible

Testing:

  • Tested on Python 3.8, 3.10, and 3.12
  • Verified all existing functionality works as expected
  • No breaking changes to the public API

The code now runs without deprecation warnings on modern Python versions while maintaining the same functionality. All existing features and command-line options remain unchanged.

Feel free to review and let me know if you'd like any adjustments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant