diff --git a/README.md b/README.md index 2f1bdd5..55c4745 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Here's how to package, test, and ship a new release. ```py from lexrpc import Server - server = Server([{ + server = Server(lexicons=[{ 'lexicon': 1, 'id': 'io.example.ping', 'defs': { @@ -228,7 +228,7 @@ Here's how to package, test, and ship a new release. ## Changelog -### 0.4 - unreleased +### 0.4 - 2023-10-28 * Bundle [the official lexicons](https://github.com/bluesky-social/atproto/tree/main/lexicons/) for `app.bsky` and `com.atproto`, use them by default. * `Base`: diff --git a/docs/conf.py b/docs/conf.py index ebe745c..7c65324 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -88,9 +88,9 @@ # built documents. # # The short X.Y version. -version = '0.3' +version = '0.4' # The full version, including alpha/beta/rc tags. -release = '0.3' +release = '0.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/index.rst b/docs/index.rst index 57b6219..c5256a9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -254,7 +254,7 @@ Here’s how to package, test, and ship a new release. from lexrpc import Server - server = Server([{ + server = Server(lexicons=[{ 'lexicon': 1, 'id': 'io.example.ping', 'defs': { @@ -315,7 +315,7 @@ Here’s how to package, test, and ship a new release. Changelog --------- -0.4 - unreleased +0.4 - 2023-10-28 ~~~~~~~~~~~~~~~~ - Bundle `the official @@ -327,10 +327,11 @@ Changelog - ``Client``: - - Add minimal auth support with ``access_token`` constructor kwarg - and attribute. To send authenticated requests, call - ``createSession`` or ``refreshSession`` to get an access token, - then set it on a ``Client``. + - Add minimal auth support with ``access_token`` and + ``refresh_token`` constructor kwargs and ``session`` attribute. If + you use a ``Client`` to call ``com.atproto.server.createSession`` + or ``com.atproto.server.refreshSession``, the returned tokens will + be automatically stored and used in future requests. - Bug fix: handle trailing slash on server address, eg ``http://ser.ver/`` vs ``http://ser.ver``. - Default server address to official ``https://bsky.social`` PDS. @@ -338,10 +339,22 @@ Changelog ``User-Agent: lexrpc (https://lexrpc.readthedocs.io/)`` request header. +- ``server``: + + - Add new ``Redirect`` class. Handlers can raise this to indicate + that the web server should serve an HTTP redirect. `Whether this + is official supported by the XRPC spec is still + TBD. `__ + - ``flask_server``: - Return HTTP 405 error on HTTP requests to subscription (websocket) XRPCs. + - Support the new ``Redirect`` exception. + - Add the ``error`` field to the JSON response bodies for most error + responses. + +.. _section-1: 0.3 - 2023-08-29 ~~~~~~~~~~~~~~~~ @@ -353,7 +366,7 @@ Changelog - Add new ``Server.register`` method for manually registering handlers. - Bug fix for server ``@method`` decorator. -.. _section-1: +.. _section-2: 0.2 - 2023-03-13 ~~~~~~~~~~~~~~~~ @@ -370,7 +383,7 @@ put more effort into matching and fully implementing them. Stay tuned! format `__. Original format is no longer supported. -.. _section-2: +.. _section-3: 0.1 - 2022-12-13 ~~~~~~~~~~~~~~~~ diff --git a/pyproject.toml b/pyproject.toml index d73a000..b55f71d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ where = ['.'] [project] name = 'lexrpc' -version = '0.3' +version = '0.4' authors = [ { name='Ryan Barrett', email='lexrpc@ryanb.org' }, ] @@ -29,6 +29,11 @@ dependencies = [ 'jsonschema>=4.0', 'requests>=2.0', 'simple-websocket', + # we don't directly depend on typing-extensions; this is only here because + # 4.6.0 introduced an incompatibility with the typing-validation package + # that's still not fixed yet. + # https://github.com/hashberg-io/typing-validation/issues/1 + 'typing-extensions<4.6.0', ] classifiers = [ 'Programming Language :: Python :: 3',