Skip to content

Commit 05981da

Browse files
committed
release v0.6
1 parent e2d9502 commit 05981da

File tree

4 files changed

+101
-29
lines changed

4 files changed

+101
-29
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Optional, only used in [com.atproto.repo](https://arroba.readthedocs.io/en/stabl
9898

9999
## Changelog
100100

101-
### 0.6 - unreleased
101+
### 0.6 - 2024-06-24
102102

103103
_Breaking changes:_
104104

@@ -196,7 +196,7 @@ Here's how to package, test, and ship a new release.
196196

197197
```sh
198198
source local/bin/activate.csh
199-
python3 -m unittest discover
199+
python -m unittest discover
200200
```
201201
1. Bump the version number in `pyproject.toml` and `docs/conf.py`. `git grep` the old version number to make sure it only appears in the changelog. Change the current changelog entry in `README.md` for this new version from _unreleased_ to the current date.
202202
1. Build the docs. If you added any new modules, add them to the appropriate file(s) in `docs/source/`. Then run `./docs/build.sh`. Check that the generated HTML looks fine by opening `docs/_build/html/index.html` and looking around.
@@ -207,26 +207,26 @@ Here's how to package, test, and ship a new release.
207207
1. Upload to [test.pypi.org](https://test.pypi.org/) for testing.
208208

209209
```sh
210-
python3 -m build
210+
python -m build
211211
twine upload -r pypitest dist/arroba-$ver*
212212
```
213213
1. Install from test.pypi.org.
214214

215215
```sh
216216
cd /tmp
217-
python3 -m venv local
217+
python -m venv local
218218
source local/bin/activate.csh
219219
# make sure we force pip to use the uploaded version
220-
pip3 uninstall arroba
221-
pip3 install --upgrade pip
222-
pip3 install -i https://test.pypi.org/simple --extra-index-url https://pypi.org/simple arroba==$ver
220+
pip uninstall arroba
221+
pip install --upgrade pip
222+
pip install -i https://test.pypi.org/simple --extra-index-url https://pypi.org/simple arroba==$ver
223223
deactivate
224224
```
225225
1. Smoke test that the code trivially loads and runs.
226226

227227
```sh
228228
source local/bin/activate.csh
229-
python3
229+
python
230230
# TODO: test code
231231
deactivate
232232
```

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
# built documents.
9090
#
9191
# The short X.Y version.
92-
version = '0.5'
92+
version = '0.6'
9393
# The full version, including alpha/beta/rc tags.
94-
release = '0.5'
94+
release = '0.6'
9595

9696
# The language for content autogenerated by Sphinx. Refer to documentation
9797
# for a list of supported languages.

docs/index.rst

Lines changed: 88 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ Here’s minimal example code for a multi-repo PDS on top of arroba and
4545
4646
from arroba import server
4747
from arroba.datastore_storage import DatastoreStorage
48-
from arroba.xrpc_sync import send_new_commits
48+
from arroba.xrpc_sync import send_events
4949
5050
# for Google Cloud Datastore
5151
ndb_client = ndb.Client()
5252
5353
server.storage = DatastoreStorage(ndb_client=ndb_client)
54-
server.repo.callback = lambda _: send_new_commits() # to subscribeRepos
54+
server.repo.callback = lambda _: send_events() # to subscribeRepos
5555
5656
app = Flask('my-pds')
5757
init_flask(server.server, app)
@@ -127,15 +127,20 @@ Configure arroba with these environment variables:
127127
- ``PDS_HOST``, where you’re running your PDS
128128

129129
Optional, only used in
130-
`com.atproto.repo <https://arroba.readthedocs.io/en/stable/source/arroba.html#module-arroba.xrpc_repo>`__
130+
`com.atproto.repo <https://arroba.readthedocs.io/en/stable/source/arroba.html#module-arroba.xrpc_repo>`__,
131+
`.server <https://arroba.readthedocs.io/en/stable/source/arroba.html#module-arroba.xrpc_server>`__,
131132
and
132-
`com.atproto.server <https://arroba.readthedocs.io/en/stable/source/arroba.html#module-arroba.xrpc_server>`__
133+
`.sync <https://arroba.readthedocs.io/en/stable/source/arroba.html#module-arroba.xrpc_sync>`__
133134
XRPC handlers:
134135

135136
- ``REPO_TOKEN``, static token to use as both ``accessJwt`` and
136137
``refreshJwt``, defaults to contents of ``repo_token`` file. Not
137138
required to be an actual JWT. If not set, XRPC methods that require
138139
auth will return HTTP 501 Not Implemented.
140+
- ``ROLLBACK_WINDOW``, number of events to serve in the
141+
`subscribeRepos`` rollback
142+
window <https://atproto.com/specs/event-stream#sequence-numbers>`__.
143+
Defaults to no limit.
139144

140145
.. raw:: html
141146

@@ -149,7 +154,7 @@ XRPC handlers:
149154
Changelog
150155
---------
151156

152-
0.6 - unreleased
157+
0.6 - 2024-06-24
153158
~~~~~~~~~~~~~~~~
154159

155160
*Breaking changes:*
@@ -161,16 +166,83 @@ Changelog
161166
subscription handlers that run server methods like
162167
``subscribeRepos`` in separate threads
163168
(`snarfed/lexrpc#8 <https://github.com/snarfed/lexrpc/issues/8>`__).
169+
- ``DatastoreStorage.read_blocks_by_seq``: if the ndb context gets
170+
closed while we’re still running, log a warning and return. (This
171+
can happen in eg ``flask_server`` if the websocket client
172+
disconnects early.)
173+
- ``AtpRemoteBlob``: if the blob URL doesn’t return the
174+
``Content-Type`` header, infer type from the URL, or fall back to
175+
``application/octet-stream``
176+
(`bridgy-fed#1073 <https://github.com/snarfed/bridgy-fed/issues/1073>`__).
164177

165178
- ``did``:
166179

167180
- Cache ``resolve_plc``, ``resolve_web``, and ``resolve_handle`` for
168181
6h, up to 5000 total results per call.
169182

183+
- ``storage``: rename ``Storage.read_commits_by_seq`` to
184+
``read_events_by_seq`` for new account tombstone support.
185+
- ``xrpc_sync``: rename ``send_new_commits`` to ``send_events``, ditto.
186+
- ``xrpc_repo``: stop requiring auth for read methods: ``getRecord``,
187+
``listRecords``, ``describeRepo``.
188+
189+
*Non-breaking changes:*
190+
191+
- ``did``:
192+
193+
- Add ``HANDLE_RE`` regexp for handle validation.
194+
195+
- ``storage``:
196+
197+
- Add new ``Storage.tombstone_repo`` method, implemented in
198+
``MemoryStorage`` and ``DatastoreStorage``. `Used to delete
199+
accounts. <https://github.com/bluesky-social/atproto/discussions/2503#discussioncomment-9502339>`__
200+
(`bridgy-fed#783 <https://github.com/snarfed/bridgy-fed/issues/783>`__)
201+
- Add new ``Storage.load_repos`` method, implemented in
202+
``MemoryStorage`` and ``DatastoreStorage``. Used for
203+
``com.atproto.sync.listRepos``.
204+
170205
- ``util``:
171206

172207
- ``service_jwt``: add optional ``aud`` kwarg.
173208

209+
- ``xrpc_sync``:
210+
211+
- ``subscribeRepos``:
212+
213+
- Add support for non-commit events, starting with account
214+
tombstones.
215+
- Add ``ROLLBACK_WINDOW`` environment variable to limit size of
216+
`rollback
217+
window <https://atproto.com/specs/event-stream#sequence-numbers>`__.
218+
Defaults to no limit.
219+
- For commits with create or update operations, always include
220+
the record block, even if it already existed in the repo
221+
beforehand
222+
(`snarfed/bridgy-fed#1016 <https://github.com/snarfed/bridgy-fed/issues/1016>`__).
223+
- Bug fix, populate the time each commit was created in ``time``
224+
instead of the current time
225+
(`snarfed/bridgy-fed#1015 <https://github.com/snarfed/bridgy-fed/issues/1015>`__).
226+
227+
- Start serving ``getRepo`` queries with the ``since`` parameter.
228+
``since`` still isn’t actually implemented, but we now serve the
229+
entire repo instead of returning an error.
230+
- Implement ``getRepoStatus`` method.
231+
- Implement ``listRepos`` method.
232+
- ``getRepo`` bug fix: include the repo head commit block.
233+
234+
- ``xrpc_repo``:
235+
236+
- ``getRecord``: encoded returned records correctly as
237+
`ATProto-flavored
238+
DAG-JSON <https://atproto.com/specs/data-model>`__.
239+
240+
- ``xrpc_*``: return ``RepoNotFound`` and ``RepoDeactivated`` errors
241+
when appropriate
242+
(`snarfed/bridgy-fed#1083 <https://github.com/snarfed/bridgy-fed/issues/1083>`__).
243+
244+
.. _section-1:
245+
174246
0.5 - 2024-03-16
175247
~~~~~~~~~~~~~~~~
176248

@@ -210,7 +282,7 @@ Changelog
210282
- Implement ``getBlob``, right now only based on “remote” blobs
211283
stored in ``AtpRemoteBlob``\ s in datastore storage.
212284

213-
.. _section-1:
285+
.. _section-2:
214286

215287
0.4 - 2023-09-19
216288
~~~~~~~~~~~~~~~~
@@ -251,7 +323,7 @@ Changelog
251323
- Drop bundled ``app.bsky``/``com.atproto`` lexicons, use
252324
`lexrpc <https://lexrpc.readthedocs.io/>`__\ ’s instead.
253325

254-
.. _section-2:
326+
.. _section-3:
255327

256328
0.3 - 2023-08-29
257329
~~~~~~~~~~~~~~~~
@@ -269,7 +341,7 @@ minimal demo code needed to wrap arroba in a fully functional PDS.
269341

270342
- …and much more.
271343

272-
.. _section-3:
344+
.. _section-4:
273345

274346
0.2 - 2023-05-18
275347
~~~~~~~~~~~~~~~~
@@ -279,7 +351,7 @@ storage. This completes the first pass at all PDS data structures. Next
279351
release will include initial implementations of the
280352
``com.atproto.sync.*`` XRPC methods.
281353

282-
.. _section-4:
354+
.. _section-5:
283355

284356
0.1 - 2023-04-30
285357
~~~~~~~~~~~~~~~~
@@ -298,7 +370,7 @@ Here’s how to package, test, and ship a new release.
298370
.. code:: sh
299371
300372
source local/bin/activate.csh
301-
python3 -m unittest discover
373+
python -m unittest discover
302374
303375
2. Bump the version number in ``pyproject.toml`` and ``docs/conf.py``.
304376
``git grep`` the old version number to make sure it only appears in
@@ -319,28 +391,28 @@ Here’s how to package, test, and ship a new release.
319391

320392
.. code:: sh
321393
322-
python3 -m build
394+
python -m build
323395
twine upload -r pypitest dist/arroba-$ver*
324396
325397
6. Install from test.pypi.org.
326398

327399
.. code:: sh
328400
329401
cd /tmp
330-
python3 -m venv local
402+
python -m venv local
331403
source local/bin/activate.csh
332404
# make sure we force pip to use the uploaded version
333-
pip3 uninstall arroba
334-
pip3 install --upgrade pip
335-
pip3 install -i https://test.pypi.org/simple --extra-index-url https://pypi.org/simple arroba==$ver
405+
pip uninstall arroba
406+
pip install --upgrade pip
407+
pip install -i https://test.pypi.org/simple --extra-index-url https://pypi.org/simple arroba==$ver
336408
deactivate
337409
338410
7. Smoke test that the code trivially loads and runs.
339411

340412
.. code:: sh
341413
342414
source local/bin/activate.csh
343-
python3
415+
python
344416
# TODO: test code
345417
deactivate
346418

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ where = ['.']
99

1010
[project]
1111
name = 'arroba'
12-
version = '0.5'
12+
version = '0.6'
1313
authors = [
1414
{ name='Ryan Barrett', email='[email protected]' },
1515
]
@@ -22,9 +22,9 @@ dependencies = [
2222
'carbox>=0.3',
2323
'cryptography',
2424
'dag-cbor',
25-
'dag-json',
25+
'dag-json>=0.2',
2626
'dnspython>=2.0.0',
27-
'lexrpc>=0.6',
27+
'lexrpc>=0.7',
2828
'multiformats>=0.3.1',
2929
'pyjwt>=2.0.0',
3030
'simple-websocket',

0 commit comments

Comments
 (0)