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
Python 3.10 compatiblity fixes #2856
Conversation
e437f0a
to
afe12e6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2856 +/- ##
==========================================
+ Coverage 55.95% 55.96% +0.01%
==========================================
Files 533 533
Lines 62300 62293 -7
Branches 8549 8548 -1
==========================================
+ Hits 34859 34865 +6
+ Misses 25684 25675 -9
+ Partials 1757 1753 -4 ☔ View full report in Codecov by Sentry. |
8f0ff31
to
9e5ed6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely tracked down 🫡 This means these bits of code actually weren't python3.10 compatible this whole time..?
There are three drawEllipse
calls in the codebase that use old_div and could hence pass floats to the Qt function (which I assume now only works with int); featureTableWidget.py:174 and two in preView.py
.
I suppose to be absolutely sure, one would have to explicitly int()
the division results as well, since 6//2.0
is 2.0
, but I think we'll be fine assuming that we're only passing int
s into those divisions into the first place.
ok - I will make those The type annotations for pyqt help a lot with the |
9e5ed6d
to
d4b72ab
Compare
otherwise these might segfault, python stopped implicitly converting in Python 3.10 Co-authored-by: Benedikt Best <63287233+btbest@users.noreply.github.com>
`notifyAll` would cause a deprecation warning that added a test failure with Python 3.10. There is no need to keep using the camel case alias.
this function would not work in any case, referencing attributes that have long been removed from that class. Also `adjustRectForImage` is never used.
d4b72ab
to
a51c4c1
Compare
One of our test configurations picked up Python 3.10 (which is fine for the "lirbary" usage). This resulted in some minor errors:
condition.notifyAll
has been marked for deprecation in favor ofcondition.notify_all
. InTestCompatibilityChecks.test_access_opaque_slot_value_should_not_warn_or_raise
we check that no warning is raised. This was of course broken by the deprecation. Rather than adapting the test I preferred keeping up with PythonfeatureTableWidget
).fixes #2852