Skip to content

Commit 724d6b2

Browse files
committed
release v5.0
1 parent 3e31e4b commit 724d6b2

4 files changed

Lines changed: 102 additions & 32 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ Here's how to package, test, and ship a new release. (Note that this is [largely
228228
```
229229
1. Install from test.pypi.org.
230230
```sh
231+
cd /tmp
231232
python3 -m venv local
232233
source local/bin/activate.csh
233234
pip3 uninstall granary # make sure we force Pip to use the uploaded version
@@ -290,7 +291,7 @@ On the open source side, there are many related projects. [php-mf2-shim](https:/
290291

291292
Changelog
292293
---
293-
### 5.0 - unreleased
294+
### 5.0 - 2022-12-03
294295

295296
_Breaking changes:_
296297

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
# built documents.
8888
#
8989
# The short X.Y version.
90-
version = '4.0'
90+
version = '5.0'
9191
# The full version, including alpha/beta/rc tags.
92-
release = '4.0'
92+
release = '5.0'
9393

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

docs/index.rst

Lines changed: 97 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ Facebook and Twitter’s raw HTML.
459459
Changelog
460460
---------
461461

462-
5.0 - unreleased
462+
5.0 - 2022-12-03
463463
~~~~~~~~~~~~~~~~
464464

465465
*Breaking changes:*
@@ -474,6 +474,12 @@ Changelog
474474
you pass an object that implements those as API calls, you’ll
475475
probably want to batch those separately.
476476

477+
- Twitter, Mastodon, Flickr, GitHub:
478+
479+
- ``create``/``preview``: support the AS1 ``favorite`` verb as well
480+
as ``like``.
481+
(`bridgy#1345 <https://github.com/snarfed/bridgy/issues/1345>`__)
482+
477483
- Atom:
478484

479485
- Switch to converting AS1 ``id`` (instead of ``url``) to Atom
@@ -483,11 +489,59 @@ Changelog
483489

484490
- Implement ``get_actor``.
485491

486-
- ``Source.original_post_discovery``: remove deprecated ``cache``
487-
kwarg.
492+
- Mastodon:
493+
494+
- ``create``/``preview``: allow non-Mastodon replies, ie activities
495+
that include ``inReplyTo`` URLs even if none of them point to a
496+
toot.
497+
(`bridgy#1321 <https://github.com/snarfed/bridgy/issues/1321>`__)
498+
- Raise ``requests.HTTPError`` with ``response.status_code`` 502
499+
instead of ``JSONDecodeError`` on non-JSON responses. This is
500+
synthetic, but more helpful for error handling.
501+
502+
- microformats2:
503+
504+
- ``object_to_json`` and related functions: handle all escaped HTML
505+
entities, not just ``&amp;`` ``&lt;`` ``&gt;``.
506+
- Unify ``microformats2.prefix_image_urls`` and
507+
``prefix_video_urls`` into a new ``as1.prefix_urls`` function.
508+
509+
- RSS:
510+
511+
- Remove ``itunes:category``. It has to be `one of Apple’s explicit
512+
categories <https://feedgen.kiesow.be/ext/api.ext.podcast.html#feedgen.ext.podcast.PodcastExtension.itunes_category>`__,
513+
which we aren’t prepared to validate, so don’t try.
514+
515+
- ActivityStreams 2:
516+
517+
- Translate both ``url`` and ``urls`` from AS1 into multi-valued AS2
518+
``url`` field.
519+
520+
- Move a number of utility methods from the ``Source`` class to a new
521+
``as1`` module: ``object_type``, ``merge_by_id``, ``is_public``,
522+
``add_rsvps_to_event``, ``get_rsvps_from_event``,
523+
``activity_changed``, ``append_in_reply_to``, ``actor_name``,
524+
``original_post_discovery``.
525+
- ``as1.original_post_discovery``: remove deprecated ``cache`` kwarg.
488526

489527
*Non-breaking changes:*
490528

529+
- ActivityStreams 2:
530+
531+
- Fix spec compliance bug: `icon`` and ``image`` are singly
532+
valued, not multiply
533+
valued <https://www.w3.org/TR/activitystreams-vocabulary/#dfn-icon>`__.
534+
- Add new ``is_public`` method and ``PUBLIC_AUDIENCE`` constant.
535+
- Prefer ``"objectType": "featured"`` first in the ``image`` field
536+
when converting from AS1, last in the ``icon`` field. This matches
537+
the ActivityPub (Mastodon) convention of using ``icon`` for
538+
profile pictures and ``image`` for header images.
539+
- Propagate ``url`` values into new ``PropertyValue`` attachments on
540+
``Person`` objects; these end up in Mastodon’s “profile metadata”
541+
link fields.
542+
- ``to_as1``: if an attachment’s ``mediaType`` is ``image/...``,
543+
override ``objectType`` and set it to ``image``.
544+
491545
- Twitter
492546

493547
- Trim alt text in line between post preview and creation
@@ -510,6 +564,9 @@ Changelog
510564
``https://github.com/snarfed`` to ``@snarfed``
511565
(`bridgy#1090 <https://github.com/snarfed/bridgy/issues/1090>`__).
512566

567+
- ``get_activities`` with ``activity_id`` now supports
568+
``fetch_replies`` and ``fetch_likes``.
569+
513570
- Reddit
514571

515572
- Add ``cache`` support to ``get_activities``.
@@ -522,9 +579,21 @@ Changelog
522579
and HTML as either raw request body or MIME multipart encoded file
523580
in the ``input`` parameter.
524581

582+
- microformats2
583+
584+
- Add new ``extra`` and ``body_class`` kwargs to
585+
``activities_to_html``.
586+
- When converting ``u-featured`` images to AS1, add new non-standard
587+
``"objectType": "featured"`` field to distinguish them from
588+
``u-photo``.
589+
- Convert ``p-note`` to AS1 ``summary``.
590+
- Bug fixes for converting ``image`` attachments to ``photo``.
591+
525592
- ``Source.original_post_discovery``: add new ``max_redirect_fetches``
526593
keyword arg.
527594

595+
.. _section-1:
596+
528597
4.0 - 2022-03-23
529598
~~~~~~~~~~~~~~~~
530599

@@ -569,7 +638,7 @@ Changelog
569638

570639
- Handle malformed ``items.author`` element.
571640

572-
.. _section-1:
641+
.. _section-2:
573642

574643
3.2 - 2021-09-15
575644
~~~~~~~~~~~~~~~~
@@ -627,7 +696,7 @@ Changelog
627696
- REST API: ported web framework from webapp2 to Flask. No user-visible
628697
behavior change expected.
629698

630-
.. _section-2:
699+
.. _section-3:
631700

632701
3.1 - 2021-04-03
633702
~~~~~~~~~~~~~~~~
@@ -732,7 +801,7 @@ Changelog
732801
- ``from_as1()``: convert ``username`` to ``preferredUsername``.
733802
- ``from_as1()``: bug fix, make ``context`` kwarg actually work.
734803

735-
.. _section-3:
804+
.. _section-4:
736805

737806
3.0 - 2020-04-08
738807
~~~~~~~~~~~~~~~~
@@ -811,7 +880,7 @@ Non-breaking changes:
811880
caching now.
812881
- Added Meetup.com support for publishing RSVPs.
813882

814-
.. _section-4:
883+
.. _section-5:
815884

816885
2.2 - 2019-11-02
817886
~~~~~~~~~~~~~~~~
@@ -860,7 +929,7 @@ Non-breaking changes:
860929
supports one enclosure per item, so we now only include the first,
861930
and log a warning if the activity has more.)
862931

863-
.. _section-5:
932+
.. _section-6:
864933

865934
2.1 - 2019-09-04
866935
~~~~~~~~~~~~~~~~
@@ -910,7 +979,7 @@ Non-breaking changes:
910979

911980
- Default title to ellipsized content.
912981

913-
.. _section-6:
982+
.. _section-7:
914983

915984
2.0 - 2019-03-01
916985
~~~~~~~~~~~~~~~~
@@ -919,7 +988,7 @@ Non-breaking changes:
919988
March <https://developers.google.com/+/api-shutdown>`__. Notably, this
920989
removes the ``googleplus`` module.
921990

922-
.. _section-7:
991+
.. _section-8:
923992

924993
1.15 - 2019-02-28
925994
~~~~~~~~~~~~~~~~~
@@ -970,7 +1039,7 @@ removes the ``googleplus`` module.
9701039
- ``/url``: Return HTTP 400 when fetching the user’s URL results in an
9711040
infinite redirect.
9721041

973-
.. _section-8:
1042+
.. _section-9:
9741043

9751044
1.14 - 2018-11-12
9761045
~~~~~~~~~~~~~~~~~
@@ -997,7 +1066,7 @@ Encode ``&``\ s in author URL and email address too. (Thanks
9971066
`sebsued <https://twitter.com/sebsued>`__!) \* AS2: \* Add ``Follow``
9981067
support.
9991068

1000-
.. _section-9:
1069+
.. _section-10:
10011070

10021071
1.13 - 2018-08-08
10031072
~~~~~~~~~~~~~~~~~
@@ -1058,7 +1127,7 @@ support.
10581127
- Support ``alt`` attribute in ``<img>`` tags
10591128
(`snarfed/bridgy#756 <https://github.com/snarfed/bridgy/issues/756>`__).
10601129

1061-
.. _section-10:
1130+
.. _section-11:
10621131

10631132
1.12 - 2018-03-24
10641133
~~~~~~~~~~~~~~~~~
@@ -1093,7 +1162,7 @@ impact of the Python 3 migration. It *should* be a noop for existing
10931162
Python 2 users, and we’ve tested thoroughly, but I’m sure there are
10941163
still bugs. Please file issues if you notice anything broken!
10951164

1096-
.. _section-11:
1165+
.. _section-12:
10971166

10981167
1.11 - 2018-03-09
10991168
~~~~~~~~~~~~~~~~~
@@ -1166,7 +1235,7 @@ still bugs. Please file issues if you notice anything broken!
11661235
- Omit title from items if it’s the same as the content. (Often
11671236
caused by microformats2’s implied ``p-name`` logic.)
11681237

1169-
.. _section-12:
1238+
.. _section-13:
11701239

11711240
1.10 - 2017-12-10
11721241
~~~~~~~~~~~~~~~~~
@@ -1208,7 +1277,7 @@ still bugs. Please file issues if you notice anything broken!
12081277
- Fix bug that omitted title in some cases
12091278
(`#122 <https://github.com/snarfed/granary/issues/122>`__).
12101279

1211-
.. _section-13:
1280+
.. _section-14:
12121281

12131282
1.9 - 2017-10-24
12141283
~~~~~~~~~~~~~~~~
@@ -1236,7 +1305,7 @@ still bugs. Please file issues if you notice anything broken!
12361305
``json``, ``json-mf2``, and ``xml`` are still accepted, but
12371306
deprecated.
12381307

1239-
.. _section-14:
1308+
.. _section-15:
12401309

12411310
1.8 - 2017-08-29
12421311
~~~~~~~~~~~~~~~~
@@ -1316,7 +1385,7 @@ still bugs. Please file issues if you notice anything broken!
13161385
`bug <https://github.com/kylewm/brevity/issues/5>`__
13171386
`fixes <https://github.com/kylewm/brevity/issues/6>`__.
13181387

1319-
.. _section-15:
1388+
.. _section-16:
13201389

13211390
1.7 - 2017-02-27
13221391
~~~~~~~~~~~~~~~~
@@ -1364,7 +1433,7 @@ still bugs. Please file issues if you notice anything broken!
13641433
on “narrow” builds of Python 2 with ``--enable-unicode=ucs2``, which
13651434
is the default on Mac OS X, Windows, and older \*nix.
13661435

1367-
.. _section-16:
1436+
.. _section-17:
13681437

13691438
1.6 - 2016-11-26
13701439
~~~~~~~~~~~~~~~~
@@ -1398,7 +1467,7 @@ still bugs. Please file issues if you notice anything broken!
13981467
- Error handling: return HTTP 502 for non-JSON API responses, 504 for
13991468
connection failures.
14001469

1401-
.. _section-17:
1470+
.. _section-18:
14021471

14031472
1.5 - 2016-08-25
14041473
~~~~~~~~~~~~~~~~
@@ -1436,14 +1505,14 @@ still bugs. Please file issues if you notice anything broken!
14361505
- Switch creating comments and reactions from GraphQL to REST API
14371506
(`bridgy#824 <https://github.com/snarfed/bridgy/issues/824>`__.
14381507

1439-
.. _section-18:
1508+
.. _section-19:
14401509

14411510
1.4.1 - 2016-06-27
14421511
~~~~~~~~~~~~~~~~~~
14431512

14441513
- Bump oauth-dropins requirement to 1.4.
14451514

1446-
.. _section-19:
1515+
.. _section-20:
14471516

14481517
1.4.0 - 2016-06-27
14491518
~~~~~~~~~~~~~~~~~~
@@ -1477,15 +1546,15 @@ still bugs. Please file issues if you notice anything broken!
14771546
- Upgrade to requests 2.10.0 and requests-toolbelt 0.60, which support
14781547
App Engine.
14791548

1480-
.. _section-20:
1549+
.. _section-21:
14811550

14821551
1.3.1 - 2016-04-07
14831552
~~~~~~~~~~~~~~~~~~
14841553

14851554
- Update `oauth-dropins <https://github.com/snarfed/oauth-dropins>`__
14861555
dependency to >=1.3.
14871556

1488-
.. _section-21:
1557+
.. _section-22:
14891558

14901559
1.3.0 - 2016-04-06
14911560
~~~~~~~~~~~~~~~~~~
@@ -1528,7 +1597,7 @@ still bugs. Please file issues if you notice anything broken!
15281597
- Misc bug fixes.
15291598
- Set up Coveralls.
15301599

1531-
.. _section-22:
1600+
.. _section-23:
15321601

15331602
1.2.0 - 2016-01-11
15341603
~~~~~~~~~~~~~~~~~~
@@ -1584,7 +1653,7 @@ still bugs. Please file issues if you notice anything broken!
15841653
- Misc bug fixes.
15851654
- Set up CircleCI.
15861655

1587-
.. _section-23:
1656+
.. _section-24:
15881657

15891658
1.1.0 - 2015-09-06
15901659
~~~~~~~~~~~~~~~~~~
@@ -1607,15 +1676,15 @@ still bugs. Please file issues if you notice anything broken!
16071676
- Improve original post discovery algorithm.
16081677
- New logo.
16091678

1610-
.. _section-24:
1679+
.. _section-25:
16111680

16121681
1.0.1 - 2015-07-11
16131682
~~~~~~~~~~~~~~~~~~
16141683

16151684
- Bug fix for atom template rendering.
16161685
- Facebook, Instagram: support access_token parameter.
16171686

1618-
.. _section-25:
1687+
.. _section-26:
16191688

16201689
1.0 - 2015-07-10
16211690
~~~~~~~~~~~~~~~~

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
'humanfriendly>=4.18',
4545
'jinja2>=2.10',
4646
'mf2util>=0.5.0',
47-
'oauth-dropins>=5.0',
47+
'oauth-dropins>=6.0',
4848
'praw>=7.3.0',
4949
'python-dateutil>=2.8',
5050
'requests>=2.22',

0 commit comments

Comments
 (0)