Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,10 @@ jobs:
python-version: 3.x
architecture: ${{ matrix.platform.python-architecture || 'x64' }}
- name: Install NASM
run: |
choco install nasm -y
shell: cmd
uses: ilammy/setup-nasm@v1
with:
version: "2.16.01"
from-source: "false"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ derive-deftly = { version = "1.14.0", default-features = false, features = ["min
pingora-runtime = "0.9.0"
tokio = { version = "1.53.2", features = ["rt-multi-thread", "sync", "time", "net", "macros"] }
tokio-util = { version = "0.7.18", features = ["rt"] }
pyo3 = { version = "0.29.3", features = [
pyo3 = { version = "0.30.1", features = [
"indexmap",
"multiple-pymethods",
"extension-module",
Expand Down
2 changes: 1 addition & 1 deletion src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use wreq::header::{HeaderCaseName, HeaderName, HeaderValue};
pub struct PyBuffer(BufferView);

/// The exporter behind each memoryview; views keep it, and so its bytes, alive.
#[pyclass(frozen, skip_from_py_object)]
#[pyclass(frozen)]
struct BufferView(Bytes);

// ===== impl PyBuffer =====
Expand Down
6 changes: 3 additions & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use crate::{

/// An IP socket address.
#[derive(Clone, Copy, PartialEq, Eq)]
#[pyclass(eq, str, frozen, skip_from_py_object)]
#[pyclass(eq, str, frozen)]
pub struct SocketAddr(pub std::net::SocketAddr);

#[pymethods]
Expand Down Expand Up @@ -210,7 +210,7 @@ struct Builder {
/// A client for making HTTP requests.
/// Unknown keyword arguments raise `TypeError` at call time.
#[derive(Clone)]
#[pyclass(subclass, frozen, skip_from_py_object)]
#[pyclass(subclass, frozen)]
pub struct Client {
inner: wreq::Client,
/// Runs this client's requests and response reads, keeping the runtime alive.
Expand All @@ -228,7 +228,7 @@ pub struct Client {
/// A blocking client for making HTTP requests.
/// Unknown keyword arguments raise `TypeError` when the function is called.
#[derive(Default)]
#[pyclass(name = "Client", subclass, frozen, skip_from_py_object)]
#[pyclass(name = "Client", subclass, frozen)]
pub struct BlockingClient(Client);

// ===== impl Client =====
Expand Down
4 changes: 2 additions & 2 deletions src/client/resp/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::{
/// Reads take the body with [`Response::take_bytes`]: a buffered body of known length up to
/// the read's limit finishes on the caller, the event loop or a blocking thread, and any other
/// body is collected on the runtime by [`Response::collect_later`].
#[pyclass(subclass, frozen, str, skip_from_py_object)]
#[pyclass(subclass, frozen, str)]
pub struct Response {
uri: Uri,
/// Response head; rebuilt responses share its extensions, including the connection's
Expand Down Expand Up @@ -70,7 +70,7 @@ enum BodyRead {
}

/// A blocking response from a request.
#[pyclass(name = "Response", subclass, frozen, str, skip_from_py_object)]
#[pyclass(name = "Response", subclass, frozen, str)]
pub struct BlockingResponse(Response);

/// Forbids connection reuse on drop unless disarmed by taking the parts. Held by
Expand Down
2 changes: 1 addition & 1 deletion src/client/resp/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub enum Frame {
///
/// Sync and async iteration share [`Streamer::next`]; [`Iteration`] picks the ready frames
/// the caller reads and the error that ends iteration.
#[pyclass(subclass, frozen, skip_from_py_object)]
#[pyclass(subclass, frozen)]
pub struct Streamer {
reader: Arc<Reader>,
runtime: Runtime,
Expand Down
4 changes: 2 additions & 2 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ use crate::{

/// An HTTP header map whose names and values are exposed as read-only memoryviews.
#[derive(Clone)]
#[pyclass(subclass, str, skip_from_py_object)]
#[pyclass(subclass, str)]
pub struct HeaderMap(pub header::HeaderMap);

/// An HTTP original header map whose iterator exposes read-only memoryviews.
#[derive(Clone)]
#[pyclass(subclass, str, skip_from_py_object)]
#[pyclass(subclass, str)]
pub struct OrigHeaderMap(pub header::OrigHeaderMap);

// ===== impl HeaderMap =====
Expand Down
2 changes: 1 addition & 1 deletion src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define_enum!(

/// HTTP status code.
#[derive(Clone, Copy)]
#[pyclass(subclass, frozen, str, skip_from_py_object)]
#[pyclass(subclass, frozen, str)]
pub struct StatusCode(pub wreq::StatusCode);

impl<'a, 'py> FromPyObject<'a, 'py> for StatusCode {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub enum Scheduler {

/// Shared Tokio runtime, released after its clients and active work are dropped.
#[derive(Clone)]
#[pyclass(frozen, skip_from_py_object)]
#[pyclass(frozen)]
pub struct Runtime {
/// Shared owner; `None` only once `Drop` has taken it to shut the runtime down.
inner: Option<Arc<Inner>>,
Expand Down
Loading