Skip to content

Commit

Permalink
⬆️ pyo3 updated from 0.20.3 to 0.22.5 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret authored Oct 27, 2024
1 parent 810b80c commit 6753ae6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 78 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to wassima will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 1.1.5 (2024-10-27)

### Changed
- pyo3 updated from 0.20.3 to 0.22.5

## 1.1.4 (2024-10-20)

### Changed
Expand Down
90 changes: 18 additions & 72 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wassima"
version = "1.1.4"
version = "1.1.5"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -9,7 +9,7 @@ name = "wassima"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.20.3", features = ["abi3-py37", "extension-module"] }
pyo3 = { version = "0.22.5", features = ["abi3-py37", "extension-module"] }
rustls-native-certs = "0.7.3"

[package.metadata.maturin]
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rustls_native_certs;

/// Retrieve a list of system DER root CAs
#[pyfunction]
fn root_der_certificates(py: Python) -> PyResult<Vec<&PyBytes>> {
fn root_der_certificates(py: Python) -> PyResult<Vec<Bound<'_, PyBytes, >>> {
let mut roots = Vec::new();
let certs = rustls_native_certs::load_native_certs();

Expand All @@ -13,14 +13,14 @@ fn root_der_certificates(py: Python) -> PyResult<Vec<&PyBytes>> {
}

for cert in certs.unwrap() {
roots.push(PyBytes::new(py, &cert.as_ref().to_vec()));
roots.push(PyBytes::new_bound(py, &cert.as_ref().to_vec()));
}

return Ok(roots);
}

#[pymodule]
fn _rustls(_py: Python, m: &PyModule) -> PyResult<()> {
fn _rustls(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(root_der_certificates, m)?)?;
Ok(())
}
2 changes: 1 addition & 1 deletion wassima/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import annotations

__version__ = "1.1.4"
__version__ = "1.1.5"
VERSION = __version__.split(".")

0 comments on commit 6753ae6

Please sign in to comment.