Mercurial > lbo > hg > async-google-apis
changeset 80:c2efbeae7103
Downgrade tokio and yup-oauth2 again
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sat, 24 Oct 2020 11:12:10 +0200 |
parents | c8b58925aeda |
children | 171be899018e |
files | drive_example/Cargo.lock drive_example/Cargo.toml drive_example/README.md drive_example/src/main.rs |
diffstat | 4 files changed, 51 insertions(+), 215 deletions(-) [+] |
line wrap: on
line diff
--- a/drive_example/Cargo.lock Sat Oct 24 11:08:10 2020 +0200 +++ b/drive_example/Cargo.lock Sat Oct 24 11:12:10 2020 +0200 @@ -29,18 +29,18 @@ [[package]] name = "async-google-apis-common" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "chrono", "hyper", - "hyper-rustls 0.20.0", + "hyper-rustls", "log", "percent-encoding", "radix64", "serde", "serde_json", - "tokio 0.3.0", + "tokio", "yup-oauth2", ] @@ -118,15 +118,6 @@ ] [[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags", -] - -[[package]] name = "core-foundation" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -152,15 +143,6 @@ ] [[package]] -name = "ct-logs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e" -dependencies = [ - "sct", -] - -[[package]] name = "drive_example" version = "0.1.0" dependencies = [ @@ -168,10 +150,9 @@ "async-google-apis-common", "env_logger", "hyper", - "hyper-rustls 0.20.0", + "hyper-rustls", "serde", - "tokio 0.3.0", - "yup-oauth2", + "tokio", ] [[package]] @@ -318,7 +299,7 @@ "http", "indexmap", "slab", - "tokio 0.2.22", + "tokio", "tokio-util", "tracing", ] @@ -395,7 +376,7 @@ "itoa", "pin-project", "socket2", - "tokio 0.2.22", + "tokio", "tower-service", "tracing", "want", @@ -408,32 +389,14 @@ checksum = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08" dependencies = [ "bytes", - "ct-logs 0.6.0", + "ct-logs", "futures-util", "hyper", "log", - "rustls 0.17.0", - "rustls-native-certs 0.3.0", - "tokio 0.2.22", - "tokio-rustls 0.13.1", - "webpki", -] - -[[package]] -name = "hyper-rustls" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" -dependencies = [ - "bytes", - "ct-logs 0.7.0", - "futures-util", - "hyper", - "log", - "rustls 0.18.1", - "rustls-native-certs 0.4.0", - "tokio 0.2.22", - "tokio-rustls 0.14.1", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", "webpki", ] @@ -459,15 +422,6 @@ ] [[package]] -name = "instant" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66" -dependencies = [ - "cfg-if", -] - -[[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -514,15 +468,6 @@ checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743" [[package]] -name = "lock_api" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" -dependencies = [ - "scopeguard", -] - -[[package]] name = "log" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -563,19 +508,29 @@ ] [[package]] -name = "mio" -version = "0.7.3" +name = "mio-named-pipes" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53a6ea5f38c0a48ca42159868c6d8e1bd56c0451238856cc08d58563643bdc3" +checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" dependencies = [ - "libc", "log", + "mio", "miow 0.3.5", - "ntapi", "winapi 0.3.9", ] [[package]] +name = "mio-uds" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +dependencies = [ + "iovec", + "libc", + "mio", +] + +[[package]] name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -609,15 +564,6 @@ ] [[package]] -name = "ntapi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] name = "num-integer" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -659,32 +605,6 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] -name = "parking_lot" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" -dependencies = [ - "cfg-if", - "cloudabi", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi 0.3.9", -] - -[[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -815,40 +735,15 @@ ] [[package]] -name = "rustls" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" -dependencies = [ - "base64 0.12.3", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] name = "rustls-native-certs" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5" dependencies = [ "openssl-probe", - "rustls 0.17.0", + "rustls", "schannel", - "security-framework 0.4.4", -] - -[[package]] -name = "rustls-native-certs" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8" -dependencies = [ - "openssl-probe", - "rustls 0.18.1", - "schannel", - "security-framework 1.0.0", + "security-framework", ] [[package]] @@ -868,12 +763,6 @@ ] [[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] name = "sct" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -899,20 +788,7 @@ "core-foundation", "core-foundation-sys", "libc", - "security-framework-sys 0.4.3", -] - -[[package]] -name = "security-framework" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys 1.0.0", + "security-framework-sys", ] [[package]] @@ -926,16 +802,6 @@ ] [[package]] -name = "security-framework-sys" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] name = "serde" version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -983,12 +849,6 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] -name = "smallvec" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" - -[[package]] name = "socket2" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1063,27 +923,12 @@ "futures-core", "iovec", "lazy_static", - "memchr", - "mio 0.6.22", - "pin-project-lite", - "slab", -] - -[[package]] -name = "tokio" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7137dbb0abee577362ccdc7df21605cfcbb949243aeab47dac9ea6ef7d830e21" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "lazy_static", "libc", "memchr", - "mio 0.7.3", + "mio", + "mio-named-pipes", + "mio-uds", "num_cpus", - "parking_lot", "pin-project-lite", "signal-hook-registry", "slab", @@ -1093,9 +938,9 @@ [[package]] name = "tokio-macros" -version = "0.3.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48caa7b66c7a6ec943edf78d21a594fbeb24e536c781da67d5c32edec54103f" +checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" dependencies = [ "proc-macro2", "quote", @@ -1109,20 +954,8 @@ checksum = "15cb62a0d2770787abc96e99c1cd98fcf17f94959f3af63ca85bdfb203f051b4" dependencies = [ "futures-core", - "rustls 0.17.0", - "tokio 0.2.22", - "webpki", -] - -[[package]] -name = "tokio-rustls" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" -dependencies = [ - "futures-core", - "rustls 0.18.1", - "tokio 0.2.22", + "rustls", + "tokio", "webpki", ] @@ -1137,7 +970,7 @@ "futures-sink", "log", "pin-project-lite", - "tokio 0.2.22", + "tokio", ] [[package]] @@ -1359,22 +1192,22 @@ [[package]] name = "yup-oauth2" -version = "5.0.0" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634867fbb0b01d365fdb5f244b54bdc248d96ac18372f76bc97bfbd2ae250bf2" +checksum = "749192b9464694a95dbaf0586e845c835b315e38d491aa2766a8477aaadb48ec" dependencies = [ "base64 0.12.3", "chrono", "futures", "http", "hyper", - "hyper-rustls 0.21.0", + "hyper-rustls", "log", "percent-encoding", - "rustls 0.17.0", + "rustls", "seahash", "serde", "serde_json", - "tokio 0.3.0", + "tokio", "url", ]
--- a/drive_example/Cargo.toml Sat Oct 24 11:08:10 2020 +0200 +++ b/drive_example/Cargo.toml Sat Oct 24 11:12:10 2020 +0200 @@ -14,5 +14,4 @@ env_logger = "~0.8" hyper-rustls = "~0.20" hyper = "~0.13" -tokio = { version = "~0.3", features = ["full"] } -yup-oauth2 = "~5" +tokio = { version = "~0.2", features = ["full"] }
--- a/drive_example/README.md Sat Oct 24 11:08:10 2020 +0200 +++ b/drive_example/README.md Sat Oct 24 11:12:10 2020 +0200 @@ -12,3 +12,7 @@ ... ``` +Please note that you need a client secret to run this binary. Download it from +[Developer Console](https://console.developers.google.com) and place it into the +file `client_secret.json` in your working directory so that `drive_example` can +find it.
--- a/drive_example/src/main.rs Sat Oct 24 11:08:10 2020 +0200 +++ b/drive_example/src/main.rs Sat Oct 24 11:12:10 2020 +0200 @@ -69,12 +69,12 @@ let https = https_client(); // Put your client secret in the working directory! - let sec = yup_oauth2::read_application_secret("client_secret.json") + let sec = common::yup_oauth2::read_application_secret("client_secret.json") .await .expect("client secret couldn't be read."); - let auth = yup_oauth2::InstalledFlowAuthenticator::builder( + let auth = common::yup_oauth2::InstalledFlowAuthenticator::builder( sec, - yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, + common::yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, ) .persist_tokens_to_disk("tokencache.json") .hyper_client(https.clone())