| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose ArtiRpcConnBuilder and appropriate C wrapper functions in
our FFI code, and wrap those functions in our python wrapper.
This breaks the old C API, but that's allowed since the API
is still experimental.
Some design decisions:
* I've wrapped the builder in a Mutex, so that we can continue
our FFI rule that we do not require non-Rust code to wrap `&mut`.
* I've removed the non-builder connect() function from the C API
as extraneous.
* I've made a single function to prepend elements to the search
path.
|
| |
|
|
|
|
|
|
|
| |
This commit covers the major points of the design:
Parsing the environment, parsing and resolving connect points,
connecting to Arti, and handling errors.
There are a few areas that need to be fixed,
all marked with XXXXs.
|
| |
|
|
| |
Generator is more abstract, and expects a possible return or send type.
|
| |
|
|
| |
mypy rightly complained that our context.arti_process could be None.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Black" is an "opinionated" python formatter, whose opinionatedness
is somewhat in the spirit of rustfmt.
This MR runs black with default settings on all of our python code
in Arti. It was produced by the following commands
```
# Everything in python/
black python/
# Everything with a .py extension
fd '.py$' -X black
# Everything with a python shebang.
git grep -l '#! */usr/bin/env *python' | xargs black
```
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This tweaks the APIs to return a dict in cases where we know
that we are getting a result, and to return an ArtiRpcResponse
in cases where we don't know what kind of response we're getting.
It also expands our Error objects to support decoding.
Rationale: everybody who is using this libaray will want to
decode the json objects that they receive. By doing it in the
library, we can save them some annoyance.
|
| |
|
|
|
| |
Previously, they only took strings, which sometimes required the caller
to use json.
|
| |
|
|
|
|
|
|
|
|
| |
Our spec says that when the RPC client has said "I require you to have
feature X" and we don't have it, we need to include the feature(s)
we don't have in an `rpc:unsupported_features` field of our error.
Also, add an integration test for this behavior.
Closes #1662
|
| | |
|
| | |
|
| |
|
|
|
| |
(This is all on the theory that any formatting standard is better
than none.)
|
| |
|
|
|
|
| |
Right now, we only support two things in the CLI:
overriding ARTI_RPC_TEST_DIR, and passing additional arguments to
arti_rpc_tests.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We use the `tomli_w` package to generate reasonable toml output,
instead of trying to use `str.format`.
Without this, there's not an easy way to tell string.Formatter
to convert Path('/abc/"def"') to `"abc/\"def\""`.
Something like this would be necessary even if we weren't using
Path, since the toml rules for sring encoding aren't the same as
produced by Python's repr(), which we were using before.
|
| | |
|
|
|
These tests are loosely modeled after stem's test suite for Tor and
the Tor control port. They're meant to exercise Arti, Arti RPC, and
the Arti RPC client library.
(For now, they exercise very little.)
|