pynacl icon indicating copy to clipboard operation
pynacl copied to clipboard

PR #709 breaks python 3.6.1 compatibility

Open noamkremen opened this issue 3 years ago • 6 comments

https://github.com/pyca/pynacl/pull/709 src/nacl/bindings/crypto_generichash.py:14 from typing import NoReturn, TypeVar

NoReturn was introduced in python 3.6.2, on 3.6.1 fails with: ImportError: cannot import name ‘NoReturn’

noamkremen avatar Jan 08 '22 18:01 noamkremen

Interesting -- what are you running on that has Python 3.6.1 out of curiosity?

reaperhulk avatar Jan 08 '22 19:01 reaperhulk

The two potential fixes are to drop NoReturn or drop support for < 3.6.2. I've been unable to find a Linux distribution under current support that ships 3.6.0/3.6.1, but I'm interested in your particular case.

reaperhulk avatar Jan 08 '22 20:01 reaperhulk

An internal build environment, via pyenv. typing_extensions makes NoReturn available in python 3.6.1, if you are willing to introduce it as a dependency.

noamkremen avatar Jan 08 '22 21:01 noamkremen

To give more context, my specific path to this error was via paramiko, which will pull in the latest (> 1.0.1) pynacl version by default during installation. https://github.com/paramiko/paramiko/blob/7714caf79a09dc455a32c6071dd22ba37c399758/setup.py

noamkremen avatar Jan 08 '22 22:01 noamkremen

This is an issue with PyGithub (https://github.com/PyGithub/PyGithub) on 3.6.1.

yuvalshirav avatar Jan 11 '22 15:01 yuvalshirav

@yuvalshirav are you seeing a lot of 3.6.0/3.6.1 users? I'm inclined to just drop NoReturn but am still considering dropping < 3.6.2 if it's sufficiently rare.

reaperhulk avatar Jan 11 '22 18:01 reaperhulk