summaryrefslogtreecommitdiff
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
* rpc: refomat python in tests.Nick Mathewson2026-01-271-4/+2
|
* Add inet-auto support to rpc tests.Nick Mathewson2026-01-272-0/+50
|
* Bump blackJim Newsome2026-01-212-10/+6
|
* python rpc wrapper: Use socket types that work on windows.Nick Mathewson2026-01-121-2/+3
| | | | | | | | | Previously we were using c_int unconditionally, which works everywhere else. Closes #2305. Co-Authored-By: Carti
* rpc.py: fix formattingJim Newsome2025-09-151-1/+1
|
* Typo fixes (automatic and hand-verified)Nick Mathewson2025-07-091-1/+1
| | | | Made with https://crates.io/crates/typos-cli
* Merge branch 'dev/cve/arti_rpc_demo' into 'main'Nick Mathewson2025-04-021-9/+0
|\ | | | | | | | | doc: Remove dead reference to rpc_demo.py See merge request tpo/core/arti!2913
| * doc: Remove dead reference to rpc_demo.pyClara Engler2025-04-011-9/+0
| | | | | | | | It was removed in 08847ab290a8d554ccf18e49b3de3abe7d6be9f2.
* | python: Add .gitignoreClara Engler2025-04-011-0/+175
|/ | | | | | | | | This commit adds a Python .gitignore to the `python/` directory, taking from the public domain gitignore file provided by GitHub[1]. Previously, I saw a `__pycache__` in my `git status` which was not nice. [1]: https://github.com/github/gitignore/blob/main/Python.gitignore
* Merge branch 'rpc_document_internal_optimism' into 'main'Nick Mathewson2025-01-301-6/+0
|\ | | | | | | | | | | | | rpc: Document what is actually going on with stream optimism. Closes #1583 See merge request tpo/core/arti!2753
| * rpc: Correct API documentation about optimismNick Mathewson2025-01-301-6/+0
| | | | | | | | | | | | | | | | | | | | | | Our documentation had dated to an older version of our RPC stream code, where all streams were automatically optimistic. But as explained, our use of "optimistic"ness in RPC stream code is now purely internal, to make it possible to get an DataStreamCtrl. This isn't user-visible in our rpc_conn_open_stream code. Closes #1583
* | fix: fix typosDimitris Apostolou2025-01-301-1/+1
|/
* rpc.py: Copy stream caveats.Nick Mathewson2025-01-291-2/+20
|
* rpc.py: New preamble documentNick Mathewson2025-01-291-3/+6
|
* rpc: Correct RPC error code for "RequestNotFound".Nick Mathewson2025-01-221-1/+1
|
* rpc: Make cancel requests uncancellable.Nick Mathewson2025-01-221-0/+20
| | | | | | | | | The current cancel code is prone to deadlock, so the easiest way to solve it appears to be making cancel requests themselves uncancellable. I've included a test to verify the behavior; previously, this test caused a deadlock.
* rpc: Python Integration tests for cancelling requests.Nick Mathewson2025-01-222-0/+34
|
* python rpc: Add support for cancelling requests.Nick Mathewson2025-01-222-2/+30
|
* python rpc: Document with_meta arguments.Nick Mathewson2025-01-221-0/+3
|
* python rpc: Expose an ArtiRpcObject for the "connection" object.Nick Mathewson2025-01-222-0/+12
|
* RPC tests: test that unix sockets still work.Nick Mathewson2025-01-151-0/+14
|
* RPC tests: use cookie authentication as the default.Nick Mathewson2025-01-152-4/+39
| | | | | (Since Windows doesn't have unix sockets, this is the option that will work everywhere.)
* rpc_tests: rename connpt_path, since we are about to have a second.Nick Mathewson2025-01-151-5/+6
|
* fix: fix typosDimitris Apostolou2025-01-061-2/+2
|
* ffi.py: Resolve newer mypy warning.Nick Mathewson2025-01-051-5/+5
|
* arti_rpc_tests: Use connpt-based server configuration.Nick Mathewson2024-12-191-7/+24
|
* rpc_tests: Add testcase for no-arguments ArtiRpcConn.Nick Mathewson2024-12-091-0/+26
|
* arti_rpc_tests: Check that the various forms of connect-point cfg work.Nick Mathewson2024-12-092-0/+231
|
* arti_rpc_tests: Clear environment variables with special meaning.Nick Mathewson2024-12-091-0/+13
|
* artilib: Revise C and Python APIs for builders.Nick Mathewson2024-12-094-17/+145
| | | | | | | | | | | | | | | 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.
* rpc-client: Initial implementation for RPC connect points.Nick Mathewson2024-12-091-1/+6
| | | | | | | | | 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.
* arti_rpc_tests: use Iterator, not GeneratorNick Mathewson2024-10-281-2/+2
| | | | Generator is more abstract, and expects a possible return or send type.
* arti_rpc_tests: Fix a type errorNick Mathewson2024-10-242-2/+11
| | | | mypy rightly complained that our context.arti_process could be None.
* python: Remove a spurious blank line.Nick Mathewson2024-10-241-1/+0
|
* python: Fix warnings about unused variables and modules.Nick Mathewson2024-10-245-10/+10
|
* Add a pyproject.toml for arti_rpc_testsNick Mathewson2024-10-241-0/+23
|
* Remove obsolete "rpc_demo.py"Nick Mathewson2024-10-241-24/+0
| | | | | | It no longer reflects our current API, refers to no-longer-extant bugs, and was never a terribly good example of what you were supposed to do with RPC.
* Run "black" to reformat all our pythonNick Mathewson2024-10-247-70/+93
| | | | | | | | | | | | | | | | | "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 ```
* rpc: Tweak release_owned to give an error on second removal of "connection".Nick Mathewson2024-10-231-0/+10
|
* python: Use logging to report nonfatal errors.Nick Mathewson2024-10-232-2/+8
|
* rpc: Add test for releasing the session object.Nick Mathewson2024-10-231-0/+14
|
* rpc: Add support for dropping the special "connection" object ID.Nick Mathewson2024-10-231-0/+21
|
* python: Automatically release RPC objects on __del__Nick Mathewson2024-10-232-3/+32
|
* python rpc: Avoid sneaky use-after-free errors.Nick Mathewson2024-10-231-4/+10
| | | | | | After calling a `foo_free()` method on a ctypes pointer object, we now set that pointer to None, so that we cannot inadvertently pass the freed pointer to anything else.
* python: Add tests for rpc:release.Nick Mathewson2024-10-232-0/+49
|
* python: Enforce that a response has just one type.Nick Mathewson2024-10-211-3/+13
|
* Typo fixes from @jnewsomeNick Mathewson2024-10-221-2/+2
|
* python: add tests for opening streams via RPC.Nick Mathewson2024-10-212-0/+35
|
* python: Expose RPC status code from errors.Nick Mathewson2024-10-214-3/+52
|
* python: Rename connect to open_stream, for consistency.Nick Mathewson2024-10-211-1/+1
|