bcrypt icon indicating copy to clipboard operation
bcrypt copied to clipboard

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

Open hswong3i opened this issue 2 years ago • 3 comments

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

hswong3i avatar Jan 03 '24 06:01 hswong3i

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

alex avatar Jan 03 '24 11:01 alex

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 avatar Jan 03 '24 12:01 hswong3i

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:

  • https://github.com/alvistack/pyca-bcrypt/commit/c249487af9e5fde37311eb709bc0c0733a44efd0
  • https://build.opensuse.org/package/show/home:alvistack/pyca-bcrypt-4.1.3

hswong3i avatar May 04 '24 13:05 hswong3i