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

Convert src/x509/crl.rs to new pyo3 APIs #10744

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Conversation

facutuesca
Copy link
Contributor

@facutuesca facutuesca commented Apr 5, 2024

This PR should be merged after this other PR: #10734

Part of #10676

This fixes all of the migration warnings for src/x509/crl.rs, after taking into account the ones fixed by #10734.

cc @alex @reaperhulk

@facutuesca facutuesca force-pushed the crl-pyo3 branch 3 times, most recently from 678d38b to 7e7cf27 Compare April 5, 2024 16:07
@facutuesca
Copy link
Contributor Author

facutuesca commented Apr 5, 2024

Huh there's an import in crl.rs:

use pyo3::PyNativeType,

that I need in order to build locally. But on the GitHub CI, it fails on some workflows saying the import is unused. And when I push a commit removing the import, all of the CI workflows pass except for the ReadTheDocs build, which fails with the same error I get locally:

      error[E0599]: no method named `as_borrowed` found for reference `&PyAny` in the current scope
         --> src/x509/crl.rs:272:18
          |
      271 |               Some(t) => Ok(x509::datetime_to_py(py, t.as_datetime())?
          |  ___________________________-
      272 | |                 .as_borrowed()
          | |                 -^^^^^^^^^^^ method not found in `&PyAny`
          | |_________________|
          |
          |
          = help: items from traits can only be used if the trait is in scope
      help: the following trait is implemented but not in scope; perhaps add a `use` for it:
          |
      5   + use pyo3::PyNativeType;

@alex
Copy link
Member

alex commented Apr 5, 2024

Is this rebased on main?

@facutuesca
Copy link
Contributor Author

Is this rebased on main?

no, it's on top of your sign-bound branch

@facutuesca
Copy link
Contributor Author

Ah does the checkout action on CI merge the commits from the PR with the latest main?

@alex
Copy link
Member

alex commented Apr 5, 2024 via email

@alex
Copy link
Member

alex commented Apr 5, 2024

You should be good to rebase

@facutuesca facutuesca marked this pull request as ready for review April 5, 2024 18:39
@alex alex enabled auto-merge (squash) April 5, 2024 18:41
@alex alex merged commit 6e58a58 into pyca:main Apr 5, 2024
58 checks passed
@facutuesca facutuesca deleted the crl-pyo3 branch April 5, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants