Skip to content

Commit

Permalink
Chore/2410 update (#1618)
Browse files Browse the repository at this point in the history
* chore: Update pyo3

Closes: #1617
---------

Co-authored-by: Philip Jenvey <[email protected]>
  • Loading branch information
jrconlin and pjenvey authored Dec 4, 2024
1 parent 8363f82 commit 70f101f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 23 deletions.
26 changes: 13 additions & 13 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 syncstorage-db-common/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{convert::TryInto, u64};
use std::convert::TryInto;

use chrono::{
offset::{FixedOffset, TimeZone, Utc},
Expand Down
6 changes: 1 addition & 5 deletions syncstorage-spanner/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1292,11 +1292,7 @@ impl SpannerDb {
// most databases) so we specify a max value with offset subtracted
// to avoid overflow errors (that only occur w/ a FORCE_INDEX=
// directive) OutOfRange: 400 int64 overflow: <INT64_MAX> + offset
query = format!(
"{} LIMIT {}",
query,
i64::max_value() - offset.offset as i64
);
query = format!("{} LIMIT {}", query, i64::MAX - offset.offset as i64);
};

if let Some(offset) = params.offset {
Expand Down
2 changes: 1 addition & 1 deletion tokenserver-auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ syncserver-common = { path = "../syncserver-common" }
tokenserver-common = { path = "../tokenserver-common" }
tokenserver-settings = { path = "../tokenserver-settings" }
tokio = { workspace = true }
pyo3 = { version = "0.21", features = ["auto-initialize"], optional = true }
pyo3 = { version = "0.22", features = ["auto-initialize"], optional = true }


[dev-dependencies]
Expand Down
5 changes: 2 additions & 3 deletions tokenserver-auth/src/oauth/py.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ use std::{sync::Arc, time::Duration};
/// The verifier used to verify OAuth tokens.
#[derive(Clone)]
pub struct Verifier {
// Note that we do not need to use an Arc here, since Py is already a reference-counted
// pointer
inner: Py<PyAny>,
inner: Arc<Py<PyAny>>,
timeout: u64,
blocking_threadpool: Arc<BlockingThreadpool>,
}
Expand Down Expand Up @@ -103,7 +102,7 @@ impl Verifier {
})?;

Ok(Self {
inner,
inner: Arc::new(inner),
timeout: settings.fxa_oauth_request_timeout,
blocking_threadpool,
})
Expand Down

0 comments on commit 70f101f

Please sign in to comment.