Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* anker/anki_proto: Add protobuf files for a new Anki API Recently, ankiweb change it's API and this changed was drastic. They moved from html forms and bare http-requests to Protobuf communication and sending binary Protobuf structures over http. These are the Protobuf files used by ankiweb I handcrafted from the frontend. * requirements.txt: add protobuf The version is fixed to work with current python version. I picked it up from the error: ``` TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower). More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates ``` * setup.cfg: exclude *_pb2.py files from flake8 * Dockerfile: add protobuf-files generation * anker: use new ankiweb's Protobuf API * anker/bot/sticker_storage.py: add http requests timeout * requirements.txt: remove unused beautifulsoup4 and lxml * requirements/requirements-dev.txt: add types-protobuf * tests/anki_api: skip tests and remove unused * .gitignore: add *_pb2.py * setup.cfg: fix mypy checks * requirements/requirements-dev.txt: update some requirements * Fix mypy issues * .github/workflows/python-app.yml: generate protobuf files first
- Loading branch information