-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Twisted to a version compatible with both Python 3.7 and 3.11 #2796
Conversation
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
ac43cd3
to
30740ac
Compare
This change actually appears to break NAV, so I wouldn't approve of it :) Several Twisted-relevant tests are hanging indefinitely (i.e. all the test suites have failed after timing out). I've found that Twisted needs to have an upper bound version of |
Actually, Twisted 23.8.0 is the last version to support Python 3.7, and officially the first to support 3.11, so we may need to lock this version explicitly, for now. |
Because Twisted 20 doesn't support Python 3.11, while 23.8 is the first that will - and also the last that will support Python 3.7, which we need to remain compatible until later this year.
30740ac
to
d0e5a0f
Compare
Since we just upgraded Twisted, we should also upgrade our pytest-twisted dependency to ensure tests are still working.
d0e5a0f
to
0704960
Compare
ATM, it seems some specific ipdevinfo integration tests are hanging forever. Specifically, it's the test defined in |
1.14 apparently caused issues with hanging tests. Don't know why, because pytest-twisted does not seem to publish a proper changelog, so I have no idea what changed between 1.13 and 1.14.
The abovementioned test will actually succeed if I downgrade |
This type annotation caused some tests to freeze indefinitely when upgrading from Twisted 20 to 23.8. The correct location for `Failure` is in the module `twisted.python.failure`, but it may have been incidentally available also in `twisted.internet.defer.failure` in earlier versions.
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2796 +/- ##
==========================================
+ Coverage 57.10% 57.14% +0.04%
==========================================
Files 567 567
Lines 41278 41272 -6
==========================================
+ Hits 23571 23586 +15
+ Misses 17707 17686 -21 ☔ View full report in Codecov by Sentry. |
In the end, it turned out that this was some code that crashed and apparently caused the event loop to get stuck without handling the crash: Namely, a type annotation in a function was now referencing a class that was no longer available in the Twisted module it was originally imported from. I had to run pytest with the |
Because Twisted 20 won't build for Python 3.11.
Closes #2792