Kyle Gentle
a60caa2690
generator lib: Initial tests
...
Move existing tests into a new __tests__ module under generator/lib.
Also define a new test for `util.new_context`, to prevent regressions as
changes are made.
2022-08-18 21:23:55 -04:00
Kyle Gentle
8ba6acb88b
util.py: Make new_context dict-compatible
...
This is an incremental change towards a strongly-typed util module,
aimed at reducing dependency on the DictObject class. The rough idea is
to annotate everything as Dict, add some tests to codify the existing
behavior, and then start defining dataclasses for the dischovery schema.
We also remove some unused logic & params.
2022-08-18 21:23:55 -04:00
Kyle Gentle
08552c4364
Restructure src dir
...
Make a few changes in the toplevel src dir to help separate
templates from code. Specifically, we rename `src/mako` to
`src/generator`, and nest the mako templates inside a
`src/generator/templates` dir.
This isolates most Python code into the `src/generator/lib` dir.
2022-08-18 21:23:55 -04:00
Kyle Gentle
5e1c0c857e
pyright type checking: Initial setup
...
* Update imports to use fully qualified module name
* Add `typecheck` target to Makefile
* Add type annotations to appease pyright
* Switch from importlib_resources backport library to stdlib
import.resources
2022-08-18 21:23:55 -04:00
JohnDimas
6d0a9740da
Resolves 'Panic on http2 timeout '
2022-07-21 14:57:37 +02:00
David Schmitt
7293ff5b10
Fix the client source to pass cargo test
...
* change `http::Uri` -> `hyper::http::Uri`
* add dependency on `tower-service`
2022-06-03 21:03:54 +01:00
David Schmitt
c8bd7f77d8
Fix doc-test preamble to use new builder API
2022-06-03 17:37:54 +01:00
Sebastian Thiel
5c22221f77
Update to latest released yup-oauth2 v7
2022-06-01 21:12:45 -04:00
Kyle Gentle
c5ff239961
feat(Hub): Support custom connectors
...
Switch the constraints on Hub types to use public traits based on
tower::service, as recommended by Hyper. This enables support for
custom connectors beyond hyper_rustls::HttpsConnector
Closes #337 .
2022-06-01 21:12:32 -04:00
Sebastian Thiel
815d772c27
fix build of CLI
2022-04-22 07:16:47 +08:00
Ferdia McKeogh
42090e283d
Bump hyper-rustls version
2022-04-21 19:08:34 +01:00
Sebastian Thiel
bfdb767a06
Make tuple-structs with public members ( #328 )
2022-03-27 08:22:38 +08:00
Sebastian Thiel
743a56f4b7
Update all json files; make some fixes to make it work at all
2022-03-08 07:59:31 +08:00
Federico Cergol
544be6d2a2
refactor: remove various errors structs
...
BREAKING CHANGE: removed errors structs exposed in the Delegate and as return value from the `doit` methods
2022-03-07 22:32:33 +01:00
Federico Cergol
cc57c6a93d
feat: bump yup-oauth2 to next major version
2022-03-07 07:53:11 +08:00
Sebastian Thiel
022e65bc5b
Keep the set version, and force buidling the API, during publish
2022-01-03 08:44:59 +08:00
Debo Mac
49f6651d7e
fix #307 by reexporting publicly hyper and hyper_rustls
2021-12-01 11:21:29 +01:00
Sebastian Thiel
fac4e09676
Fix typo
2021-11-29 07:34:43 +08:00
Sebastian Thiel
08abd44cce
Allow access to the client and the hub
2021-10-22 08:19:01 +08:00
Sebastian Thiel
efcd11e7c1
release without changelog by default
2021-10-07 21:05:23 +08:00
Debo Mac
3837d0559a
Move extern crate import with other extern crate imports
2021-10-05 20:29:15 +08:00
Debo Mac
5a1a7b1fb2
Fix duplication of oauth2 definition
2021-10-05 20:29:15 +08:00
Debo Mac
861a9d8281
Expose yup_oauth2 crate from inside the crates
2021-10-05 20:29:15 +08:00
Sebastian Thiel
74621c9c37
Explicitly specify Send requirement where dyn traits are used ( #296 )
2021-08-26 09:05:39 +08:00
Sebastian Thiel
834ad1b6ec
Use cargo smart-release for publishing
...
Because, why not, should work, and create nice tags for us too.
2021-08-25 08:02:23 +08:00
Sebastian Thiel
32a6d876a6
Make API top level structure implement Clone, related to #295
2021-08-25 07:56:28 +08:00
Sebastian Thiel
a22c18725c
Make ReadSeek require 'Send', related to #294
2021-08-25 07:52:02 +08:00
Remco Bloemen
33e83bb610
Correct multipart line endings
2021-08-04 09:37:06 +08:00
Petter Rasmussen
19088aa178
Fix resumable uploads
...
Only increment the start offset when the response is successful and seek
to the start offset on each iteration.
2021-06-06 15:08:33 +02:00
Dennis Vestergaard Værum
97f3a9499d
removing unused code, seems to be some left-over from upgrading the hyper dependency
2021-04-21 15:31:35 +02:00
Dennis Vestergaard Værum
6d56955037
Bug-fix for the upload error: Failed at uploading 'client requires absolute-form URIs'
2021-04-19 14:55:32 +02:00
Sebastian Thiel
823b1a270a
Remove reference to 'intentionally using an old version of hyper' ( #173 )
2021-04-16 15:53:22 +08:00
Sebastian Thiel
3b087bf3e2
Assuure Delegate is Send ( #271 )
2021-04-14 16:30:53 +08:00
Sebastian Thiel
65f9c22094
Fix CLI generator
2021-04-14 10:04:49 +08:00
Sebastian Thiel
9c339da955
Simplify type system to leverage 'Sync' types
...
These are generally available now that we use hyper's async
APIs along with the most recent yup-hypermock.
2021-04-14 09:52:27 +08:00
Sebastian Thiel
fe6ccfed3f
Remove RefCell around autenticator - they are sync now
2021-04-14 09:38:07 +08:00
Sebastian Thiel
9e0133c1b4
Don't re-borrow a refcell while it is still in use ( #269 )
...
Despite multiple attempts on reusing the RefMut we get from the first
borrow as stored in `authenticator`, using it in the needed spot
seemed impossible despite the compiler trying to make suggestions.
Dropping `authenticator` and reborrowing is done for that reason,
fair enough.
2021-04-12 10:06:50 +08:00
Sergiu Puscas
819e1ccce5
std::iter not needed
2021-04-05 18:44:00 +02:00
Sergiu Puscas
83fed44db0
Run code through cargo fmt.
2021-04-05 18:41:44 +02:00
Sergiu Puscas
6ec46827e7
Fix clippy warnings.
2021-04-05 18:41:17 +02:00
Sergiu Puscas
30ea80bf31
Use hyper::body::to_bytes() instead of aggregate().
...
This should not truncate the content.
2021-04-05 18:27:43 +02:00
Sebastian Thiel
18b80cf37f
refactor
2021-04-03 22:37:27 +08:00
Sebastian Thiel
9df245a80d
cleanup; fix security issue
2021-04-03 10:03:42 +08:00
Sebastian Thiel
7d36eaa409
Adjust links in generated files to point to 'main' branch
2021-04-03 09:55:20 +08:00
Sebastian Thiel
5bac5d1af5
regen with patch #265 , but without version bump
...
Let's try to avoid spamming crates.io and instead keep publishing
everything as is. The patch will be present in some of the more
recent crates, and for specific crates like youtube3 and drive3
I will create specific patch releases.
2021-04-02 20:39:58 +08:00
Dennis Vestergaard Værum
1f776ddc54
Bug fix: It was not possible to use FileGetCall to download binary files
2021-04-02 07:53:48 +02:00
Sebastian Thiel
2bfeeb99f9
fix GHP-import in makefile
2021-04-02 00:23:31 +08:00
Sebastian Thiel
9fe80b24eb
port API updates to python3
2021-04-01 23:02:30 +08:00
Sebastian Thiel
67c5495c64
Use ghp-import of virtual environment
2021-04-01 22:26:08 +08:00
Sebastian Thiel
11fae8353b
Fix docs, OMG, finding this was *hard*
...
Lesson learned: Don't be to much in a rush or you will miss
what's rigth in front of your nose
2021-04-01 22:07:59 +08:00