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

Replace pysha3 with pycryptodomex #47

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

drizzt
Copy link
Contributor

@drizzt drizzt commented Oct 17, 2022

pysha3 is not maintained anymore and it doesn't build correctly with Python 3.11 so replace it with pycryptodomex that is still maintained and working correctly with new python versions

pysha3 is not maintained anymore and it doesn't build correctly with
Python 3.11 so replace it with pycryptodomex that is still maintained and
working correctly with new python versions
@stefanor
Copy link

hashlib has had SHA3 built-in since 3.6, why not just stick to that?

@petertodd
Copy link
Member

petertodd commented Oct 29, 2022 via email

@dhimmel
Copy link
Contributor

dhimmel commented Nov 6, 2022

A bit more on the pysha3 dependency breaking in Python 3.11. From a CI run:

  × Running setup.py install for pysha3 did not run successfully.
      In file included from Modules/_sha3/sha3module.c:20:
      Modules/_sha3/backport.inc:78:10: fatal error: pystrhex.h: No such file or directory
         78 | #include "pystrhex.h"
            |          ^~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

From the Python 3.11 release notes:

Remove the pystrhex.h header file. It only contains private functions. C extensions should only include the main <Python.h> header file. (Contributed by Victor Stinner in bpo-45434.)

Am seeing pysha3 requirement in a few places:

https://github.com/opentimestamps/opentimestamps-server/blob/ac67218c3d45a93519bea0ec151b1e3629f87bd5/requirements.txt#L4

install_requires=['python-bitcoinlib>=0.9.0,<0.12.0',
'pysha3>=1.0.2'],

There's so few ETH timestamps out there that I don't know if we really need to keep this support.

Could always make it an extra dependency that is not installed by default. And ETH timestamps would fail if not installed. OOC would this prevent validating existing ETH timestamps or just creating new ones?

@dhimmel
Copy link
Contributor

dhimmel commented Nov 6, 2022

Also noting from https://github.com/tiran/pysha3:

The pysha3 package has reached its end of life and is no longer supported.

dhimmel added a commit to dhimmel/manubot that referenced this pull request Nov 6, 2022
dhimmel added a commit to manubot/manubot that referenced this pull request Nov 6, 2022
@dhimmel
Copy link
Contributor

dhimmel commented Nov 11, 2022

More sideline encouragement for Python 3.11 compatibility whether through pycryptodomex or through removed ETH timestamp support.

@petertodd petertodd merged commit 5cc1670 into opentimestamps:master Nov 20, 2022
@petertodd
Copy link
Member

Thanks, I went ahead and merged this. Will do a new release shortly.

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

Successfully merging this pull request may close these issues.

4 participants