Skip to content
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 warnings #22

Open
scr4bble opened this issue Jan 9, 2021 · 7 comments
Open

deprecation warnings #22

scr4bble opened this issue Jan 9, 2021 · 7 comments

Comments

@scr4bble
Copy link

scr4bble commented Jan 9, 2021

After updating fedora to version 32 I had to install py_sg again.
Now it works again but there is this warning in console:

$ wdpassport-utils.py -u
/usr/local/bin/wdpassport-utils.py:131: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
data = py_sg.read_as_bin_str(dev, _scsi_pack_cdb(cdb), BLOCK_SIZE)
[wdpassport] password for /dev/sdb:
/usr/local/bin/wdpassport-utils.py:89: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
data = py_sg.read_as_bin_str(dev, _scsi_pack_cdb(cdb), BLOCK_SIZE)
/usr/local/bin/wdpassport-utils.py:230: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
py_sg.write(dev, _scsi_pack_cdb(cdb), _scsi_pack_cdb(pw_block) + pwd_hashed)

Python 3.8.6

@alex9434
Copy link

alex9434 commented Sep 8, 2021

I have the same warnings on Debian 11 stable (bullseye):

/usr/local/bin/wdpassport-utils.py:131: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
  data = py_sg.read_as_bin_str(dev, _scsi_pack_cdb(cdb), BLOCK_SIZE)
[wdpassport] password for /dev/sdc: 
/usr/local/bin/wdpassport-utils.py:89: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
  data = py_sg.read_as_bin_str(dev, _scsi_pack_cdb(cdb), BLOCK_SIZE)
/usr/local/bin/wdpassport-utils.py:230: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
  py_sg.write(dev, _scsi_pack_cdb(cdb), _scsi_pack_cdb(pw_block) + pwd_hashed)
[*] Device unlocked.

@sicr0
Copy link

sicr0 commented Sep 15, 2021

Same here, anyone knows what needs to be changed in the code?

@tvladyslav
Copy link

This should help
tvladyslav/py3_sg#1

All thanks to @Lasoloz

@scr4bble
Copy link
Author

scr4bble commented Dec 2, 2022

Nice! Thank you @tvladyslav @Lasoloz
So seems like we can close this issue, right?

There is another problem now that the script refers to the library as py_sg and it should be py3_sg so the import fails.

@scr4bble
Copy link
Author

scr4bble commented Dec 2, 2022

@tvladyslav could you please make a PR from your repo back here with usage of the py3_sg instead of py_sg? I see you already fixed it in your fork.
It would be highly appreciated.

@tvladyslav
Copy link

@scr4bble this repo is stale for 3 years. 3 PRs pending. I doubt it is worth make one more PR.

@scr4bble
Copy link
Author

scr4bble commented Dec 3, 2022

Then let's maybe at least create an issue here and reference your repository so people can find it. I managed to fix it myself and only then found your repo.

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

No branches or pull requests

4 participants