-
Notifications
You must be signed in to change notification settings - Fork 157
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
deprecation prep #1399
base: main
Are you sure you want to change the base?
deprecation prep #1399
Conversation
I haven't quite worked out how to automatically trigger GitHub Actions CI, but here's the output from manually triggering on this branch: https://github.com/jamesmkrieger/ProDy/actions/runs/1087735002 This check passed. |
try: | ||
heatmap.append(fromstring(items[-1], float, sep=';')) | ||
except: | ||
heatmap.append(frombuffer(items[-1], float, sep=';')) |
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.
These fixes might be too ad-hoc. There should be a better way to determine which function to use. In addition, it is better the catch the specific error than a general "except"
self._labels[rows]) | ||
except: | ||
return Sequence(self._msa[rows, cols].tobytes(), | ||
self._labels[rows]) |
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.
Same issue with these lines. Maybe use PY3K
macro to check this?
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.
We have the following block in the Sequence object, on which we could maybe base these:
if PY3K:
try:
return self._array.tostring().decode()
except:
return self._array.tobytes().decode()
else:
return self._array.tostring()
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.
I've now tried this
I have introduced some try/except blocks to account for things becoming deprecated. The relevant warnings came from pytest from Python 3.8 on Ubuntu 20.04 (Windows Subsystem for Linux 2):
I have accounted for a number of these but not all of them.