pyca / bcrypt

Modern(-ish) password hashing for your software and your servers
Apache License 2.0
1.25k stars 168 forks source link

Rollback to `pyo3 = { version = "0.16.6", features = ["abi3"] }` #714

Open hswong3i opened 10 months ago

hswong3i commented 10 months ago

In order to avoid ImportError: PyO3 modules compiled for CPython 3.8 or older may only be initialized once per interpreter process introduced since pyo3 >= 0.17.0, which only allow each #[pymodule] to be initialized once, this PR temporarily rollback to pyo3 = 0.16.6.

It also remove the use of PyUserWarning which introduced since pyo3 > 0.18.0.

See https://github.com/PyO3/pyo3/commit/78ba70d2b4cdae1228561700bab62da793801d18 See https://github.com/PyO3/pyo3/commit/1d20f2a5317585c13750e4433fe502dd25230775

Fixes https://github.com/pyca/bcrypt/issues/694

alex commented 10 months ago

This does not actually fix the issue, it merely removes the error -- pyo3 modules still do not support sub-interpreters.

hswong3i commented 10 months ago

Yes this PR doesn't solve the problem but just rolling back as original behavior...

BTW I couldn't see any schedule for https://github.com/PyO3/pyo3/issues/576 getting done...

If we don't really depends on features provided by pyo3 >= 0.17.0, at least this PR will not block the use of bcrypt on Ceph...

hswong3i commented 6 months ago

Still, this is not a good idea for rollback; but well, https://github.com/PyO3/pyo3/issues/576 have no progress as expected...

So at least an update for 4.1.3 + force push for this PR, used with my: