Commit Graph

86 Commits

Author SHA1 Message Date
Gergely Polonkai 11d09b76df
test: Bring the MockSHSSocket testing class in line with the secret-handshake library 2023-11-19 07:42:25 +01:00
Gergely Polonkai 377368509e
build(typing): Add stricter type hinting to LocalMessage’s feed and previous attribute 2023-11-19 07:30:31 +01:00
Gergely Polonkai 59c99097a2
refactor: Use SHSDuplexStream.close instead of disconnect
`disconnect()` is now deprecated to make the API more consistent.
2023-11-19 07:28:06 +01:00
Gergely Polonkai c2fffafa4e
feat: Create the PSHandler type 2023-11-19 07:26:23 +01:00
Gergely Polonkai 55abb6e341
ci: Enable (almost) all PyLint messages 2023-11-18 07:15:17 +01:00
Gergely Polonkai 526117ae18
chore: Remove useless PyLint suppressions 2023-11-18 07:15:17 +01:00
Gergely Polonkai d6881cd8d5
feat: Process boolean True responses over Packet Stream 2023-11-18 07:07:12 +01:00
Gergely Polonkai 9b54ea6cec
chore: Remove unnecessary return type markup 2023-11-18 07:03:39 +01:00
Gergely Polonkai df8c79514a
chore: Remove a useless super().__init__() call from PSStreamHandler 2023-11-18 07:01:14 +01:00
Gergely Polonkai 0c17410e18
style: Styling i forgot to commit earlier 2023-11-18 06:59:39 +01:00
Gergely Polonkai a85fce7e3f
test: Fix test_packet_stream.py so there are no coverage issues in it 2023-11-18 06:40:35 +01:00
Gergely Polonkai 9e4a254127
test: Fully cover feed/models.py with tests 2023-11-18 06:40:35 +01:00
Gergely Polonkai 1c1e57d868
ci: Add and configure mypy, and make it happy 2023-11-16 09:44:36 +01:00
Gergely Polonkai f2a54b5ce6
chore: Get rid of all __await__ methods 2023-11-16 06:12:12 +01:00
Gergely Polonkai b30603a190
feat: Make it possible to load SSB secrets from a non-default file 2023-11-16 05:29:52 +01:00
Gergely Polonkai c588967c11 build: Remove async_generator as a dependency
Python 3.6+ can do this natively.
2023-11-15 14:32:00 +01:00
Gergely Polonkai 01e8de96b2
fix: Check for empty messages before checking its properties in MuxRPCAPI 2023-11-15 06:13:09 +01:00
Gergely Polonkai 6ddb8bc8d3
test: Add tests for feed utils 2023-11-15 05:46:54 +01:00
Gergely Polonkai 69433cab86
refactor: Change MuxRPC.__await__ MuxRPC.process_messages
`__await__` can be a bit dangerous in the world of `asyncio`.
2023-11-15 05:36:29 +01:00
Gergely Polonkai 3b2c5cc792 test: Let mocker.path.object figure out the mock type to use in packet stream tests 2023-11-14 13:05:09 +01:00
Gergely Polonkai d51f27d883
ci: Add and configure PyLint, and make it happy 2023-11-14 06:03:46 +01:00
Gergely Polonkai e0cd456e77
chore: Remove the unused decorated function in MuxRPCAPI.define 2023-11-14 05:21:35 +01:00
Gergely Polonkai 8f5d355ea0
ci: Update and configure isort, and make it happy 2023-11-14 05:16:10 +01:00
Gergely Polonkai d1a0510734
ci: Use black instead of flake8
It results in mostly the same style, plus it’s configurable via pyproject.toml.
2023-11-13 13:57:42 +01:00
Gergely Polonkai 50442c56fe
chore: Make the project REUSE compatible 2023-11-13 13:41:30 +01:00
Gergely Polonkai 90526a04f2
ci: Add and configure pre-commit and commitizen 2023-11-02 12:41:50 +01:00
Gergely Polonkai d626b30923
test: Move test files to a separate tests directory 2023-11-02 12:40:55 +01:00
Gergely Polonkai ad7e00ef98
build: Upgrade PyYAML to 6.0.1 2023-11-02 12:26:31 +01:00
Gergely Polonkai c66e3c3ee9
ci: Upgrade pytest to the latest version 2023-11-02 12:25:05 +01:00
Gergely Polonkai f4335cc4aa
build: Move to Poetry 2023-11-01 12:07:11 +01:00
Gergely Polonkai 88a3311919
chore: Remove Travis CI config
Travis is now a paying service, so there’s no way this will ever work again.
2023-10-31 15:36:31 +01:00
Ryan Flynn 975467030a Event.wait() is async, and must be awaited 2019-06-14 22:06:42 +02:00
Pedro Ferreira 77d1477106 Use a blob I can retrieve.
If you add me on SSB, you should be able to get it too :p
2019-06-14 22:05:51 +02:00
Cheng Guo 166914144d Verify the hash of the fetched blob 2019-06-14 22:05:45 +02:00
Cheng Guo b26b56632f Fixed a bug which causes problem when RPC body size is bigger than 4096
- Fetching blobs (size>4k) works now
  - Updated the image fetching code in examples/test_client.py
2019-06-14 21:46:43 +02:00
Pedro Ferreira 734fe59663 Improve OSX config 2019-06-14 21:44:48 +02:00
Cheng Guo 3ce46291b3 Bugfix for handling a RPC goodbye header 2019-06-14 21:38:54 +02:00
Ryan Flynn 5af5df69d0 Run TravisCI on OSX 2019-06-14 21:32:33 +02:00
Ryan Flynn d9ef4735f7 python 3.7 and after does not work on trusty; try on osx instead, see if it works 2019-06-14 20:55:56 +02:00
Christian Bundy 5d137da5c3 Specify pynacl==1.1.2 2019-06-14 20:45:34 +02:00
Pedro Ferreira 28096f0f8a Use latest Python versions 2019-06-12 21:16:31 +02:00
Pedro Ferreira 8e4228ede1 Specify default Loader
Not specifyin one is now deprecated behaviour.
2019-06-12 21:09:48 +02:00
Pedro Ferreira b4a3d0cda6 Update dependencies 2019-06-12 21:06:56 +02:00
Cléber Zavadniak aab2ac18b3 fix test_server and reorganize requirements files 2018-04-28 17:02:18 +02:00
Pedro Ferreira dc1389d634 Adapt code to match secret_handshake changes 2018-02-04 22:27:54 +01:00
Pedro Ferreira d6a1ac792c Use proper timestamp instead of OS-dependent 2018-02-04 22:17:38 +01:00
Pedro Ferreira 797315e967 Add some additional coverage 2017-08-06 12:16:22 +02:00
Pedro Ferreira 73dccb8b15 Extract out stream() method 2017-08-05 20:02:02 +02:00
Pedro Ferreira a5ce920440 Revert "Remove pytest-cov flag"
This reverts commit 297b1268b0.
2017-08-05 19:49:50 +02:00
Pedro Ferreira 778f74200a Tests for remote feeds 2017-08-05 19:32:01 +02:00