@@ -41,7 +41,7 @@ self_cell::self_cell!(
4141#[ pyo3:: pyclass( frozen, module = "cryptography.hazmat.bindings._rust.x509" ) ]
4242pub ( crate ) struct Certificate {
4343 pub ( crate ) raw : OwnedCertificate ,
44- pub ( crate ) cached_extensions : pyo3:: sync:: GILOnceCell < pyo3:: PyObject > ,
44+ pub ( crate ) cached_extensions : pyo3:: sync:: PyOnceLock < pyo3:: Py < pyo3 :: PyAny > > ,
4545}
4646
4747#[ pyo3:: pymethods]
@@ -62,7 +62,10 @@ impl Certificate {
6262 Ok ( format ! ( "<Certificate(subject={subject_repr}, ...)>" ) )
6363 }
6464
65- fn __deepcopy__ ( slf : pyo3:: PyRef < ' _ , Self > , _memo : pyo3:: PyObject ) -> pyo3:: PyRef < ' _ , Self > {
65+ fn __deepcopy__ (
66+ slf : pyo3:: PyRef < ' _ , Self > ,
67+ _memo : pyo3:: Py < pyo3:: PyAny > ,
68+ ) -> pyo3:: PyRef < ' _ , Self > {
6669 slf
6770 }
6871
@@ -292,7 +295,7 @@ impl Certificate {
292295 }
293296
294297 #[ getter]
295- fn extensions ( & self , py : pyo3:: Python < ' _ > ) -> pyo3:: PyResult < pyo3:: PyObject > {
298+ fn extensions ( & self , py : pyo3:: Python < ' _ > ) -> pyo3:: PyResult < pyo3:: Py < pyo3 :: PyAny > > {
296299 x509:: parse_and_cache_extensions (
297300 py,
298301 & self . cached_extensions ,
@@ -432,7 +435,7 @@ pub(crate) fn load_der_x509_certificate(
432435
433436 Ok ( Certificate {
434437 raw,
435- cached_extensions : pyo3:: sync:: GILOnceCell :: new ( ) ,
438+ cached_extensions : pyo3:: sync:: PyOnceLock :: new ( ) ,
436439 } )
437440}
438441
0 commit comments