Fix CI tests; drop 3.7; add 3.12, 3.14#13
Conversation
pycares 4.x returns ttl=-1 for MX records, causing cache entries to expire immediately. Treat negative TTL as unavailable and use failure_ttl instead. TTL=0 is respected as a valid "do not cache" signal for pycares 5.x compatibility.
📝 WalkthroughWalkthroughExpanded CI Python matrix and package classifiers; removed asynctest from testing extras; modernized tests to use unittest.IsolatedAsyncioTestCase and unittest.mock; replaced module-level blocking event-loop usage with asyncio.run in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/testing.yaml (1)
22-22:⚠️ Potential issue | 🟠 Major
actions/checkout@v1is no longer functional on GitHub-hosted runners.v1 uses the Node.js 12 runtime, which GitHub removed on August 14, 2023. Workflows using this version will fail. Current stable version is v4.3.1. The same applies to
codecov/codecov-action@v1.0.2on line 43 — current stable is v5.5.1. Both must be updated.Proposed fix
- uses: actions/checkout@v1 + uses: actions/checkout@v4- uses: codecov/codecov-action@v1.0.2 + uses: codecov/codecov-action@v5
🧹 Nitpick comments (2)
setup.cfg (1)
23-27: Python 3.10 and 3.11 are missing from classifiers and CI matrix.The classifiers jump from 3.9 to 3.12, skipping 3.10 and 3.11. If this is intentional (e.g., untested), it's worth noting in the README/changelog. Otherwise, consider adding them for completeness—they are still widely used.
tests/test_normalizer.py (1)
22-30: Test relies on live DNS and is inherently racy.
test_mx_recordsmakes two independent DNS queries togmail.com— one via a standalone resolver (line 24) and one viaself.normalizer(line 29). If the DNS responses differ (e.g., TTL-driven record rotation, different upstream resolvers), the assertion on line 28 will fail intermittently. This is a pre-existing pattern, but worth noting that it makes CI flaky in network-restricted or inconsistent DNS environments.Consider mocking the resolver to make this test deterministic, or at minimum, document that this is an integration test requiring network access.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@setup.cfg`:
- Around line 26-30: The package classifiers in setup.cfg list Python versions
3.10, 3.11, and 3.13 but the CI testing matrix in .github/workflows/testing.yaml
only runs ['3.8','3.9','3.12','3.14'], causing a mismatch; fix by either
removing the unsupported classifier entries ("Programming Language :: Python ::
3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python
:: 3.13") from setup.cfg or add those versions to the CI matrix in testing.yaml
so the declared supported versions are actually tested.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/testing.yaml (1)
22-22:⚠️ Potential issue | 🟡 Minor
actions/checkout@v1is heavily outdated.This version uses a deprecated Node.js runtime and will eventually stop working on GitHub-hosted runners. The current version is
v6. Since this PR modernizes the CI matrix, consider bumping this as well.Suggested fix
- uses: actions/checkout@v1 + uses: actions/checkout@v6
🧹 Nitpick comments (2)
.github/workflows/testing.yaml (2)
5-8:paths-ignoreskipssetup.*changes — dependency updates won't trigger CI.Changes to
setup.cfg(e.g., adding/removing test dependencies like replacingasynctest) won't trigger a test run when pushed alone. This is pre-existing but worth noting since this PR modifies test dependencies.
43-43: Upgradecodecov/codecov-actionfrom v1.0.2 to v5.v1.0.2 is heavily outdated (7+ years old). The current major version is v5 (latest v5.5.2 as of Dec 2025). Older versions use deprecated upload mechanisms and outdated Node.js runtimes.
Suggested fix
- uses: codecov/codecov-action@v1.0.2 + uses: codecov/codecov-action@v5
Summary by CodeRabbit
Bug Fixes
Chores
Tests