Granary

Latest version: v6.2

Safety actively analyzes 629811 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

3.1

Not secure
Notable changes

* Add Python 3.8 support, drop 3.3 and 3.4. Python 3.5 is now the minimum required version.
* Add [Pixelfed](https://pixelfed.org/)! Heavily based on Mastodon.
* Standardize Instagram's and Facebook's scraping into new common `scraped_to_activities()`, `scraped_to_activity()`, and `merge_scraped_reactions()` methods.
* Atom:
* Add the `summary` element ([157](https://github.com/snarfed/granary/issues/157)).
* REST API:
* Bug fix: URL-encode Unicode characters in `Link` HTTP headers (eg `rel=self`, `rel=header`).
* Facebook:
* Scraping now uses [mbasic.facebook.com](https://mbasic.facebook.com/) instead of [m.facebook.com](https://m.facebook.com/).
* Flickr:
* Add support for adding tags to existing photos ([bridgy857](https://github.com/snarfed/bridgy/issues/857)).
* `get_comment()`: skip fetching comments from API if `activity` kwarg is provided and contains the requested comment.
* GitHub:
* Handle [HTTP 451 Unavailable for Legal Reasons](https://en.wikipedia.org/wiki/HTTP_451) responses ([eg for DMCA takedowns](https://developer.github.com/changes/2016-03-17-the-451-status-code-is-now-supported/)) gracefully.
* Add create/preview support for reactions on pull review request comments (ie URLs with `discussion_r...` fragments).
* HTML/microformats2:
* Add `aria-hidden="true"` to empty links ([bridgy947](https://github.com/snarfed/bridgy/issues/947)).
* Bug fix: escape `&`, `<`, and `>` characters in bare mf2 `content` properties ([aaronpk/XRay102](https://github.com/aaronpk/XRay/issues/102)).
* `json_to_object()`: convert `nickname` to `username`.
* JSON Feed:
* Gracefully handle when `content_html` and `content_text` are [incorrectly](https://jsonfeed.org/version/1#items) lists instead of strings.
* Instagram:
* Include threaded (ie nested) comments in scraping ([bridgy958](https://github.com/snarfed/bridgy/issues/958)).
* Mastodon:
* Bug fix for alt text with image attachments ([bridgy975](https://github.com/snarfed/bridgy/issues/975)).
* Omit empty `limit` param [for compatibility with Pleroma](https://git.pleroma.social/pleroma/pleroma/-/issues/2198) ([bridgy#977](https://github.com/snarfed/bridgy/issues/977)).
* Meetup:
* `create()`: handle API errors and return the error message in the `CreationResult` ([bridgy921](https://github.com/snarfed/bridgy/issues/921)).
* Twitter:
* Bug fix: URL-encode list names in API calls.
* Bug fix: propagate alt text into AS1 `photo.displayName` so that it gets all the way into microformats2 JSON and HTML ([183](https://github.com/snarfed/granary/issues/183)).
* Reddit:
* Implement `post_id()`.
* Cache user data fetched from the API for 5m to avoid repeating user profile API requests ([bridgy1021](https://github.com/snarfed/bridgy/issues/1021)).
when fetching multiple comments or posts from the same author
* Bug fix: use 'displayName' instead of 'name' in AS1 objects for submissions.
* Bug fix: use tag URIs for activity ids.
* ActivityStreams 2:
* `to_as1()`: for `Create` activities, include the activity actor's data in the object's author ([snarfed/bridgy-fed75](https://github.com/snarfed/bridgy-fed/issues/75)).
* `to_as1()`: convert `preferredUsername` to `username`.
* `from_as1()`: convert `username` to `preferredUsername`.
* `from_as1()`: bug fix, make `context` kwarg actually work.

3.0

Not secure
_Breaking changes:_

* _Python 2 is no longer supported!_ Including the [App Engine Standard Python 2 runtime](https://cloud.google.com/appengine/docs/standard/python/). On the plus side, the [Python 3 runtime](https://cloud.google.com/appengine/docs/standard/python3/) is now supported! See this [list of differences](https://cloud.google.com/appengine/docs/standard/python3/python-differences) for more details.

Non-breaking changes:

* Migrate demo app and API to the App Engine Standard Python 3 runtime.
* Instagram:
* Scraping: fetch 50 likes instead of 24. ([snarfed/bridgy898](https://github.com/snarfed/bridgy/issues/898))
* Scraping bug fix for `get_actor()` with `user_id`.
* Twitter:
* Add [image alt text](https://blog.twitter.com/developer/en_us/a/2016/alt-text-support-for-twitter-cards-and-the-rest-api.html) support to `get_activites()` etc ([#183](https://github.com/snarfed/granary/issues/183)).
* RSS:
* Add `itunes:image`, `itunes:author`, and `itunes:category`.
* Strip HTML from `title` element ([177](https://github.com/snarfed/granary/issues/177)). [Background.](https://validator.w3.org/feed/docs/warning/ContainsHTML.html)
* Always include author in items ([177](https://github.com/snarfed/granary/issues/177)).
* Bug fix: extract feed image from `hfeed` correctly.
* Bug fix: don't crash on `article` or `mention` tags in items with enclosures.
* Atom:
* Bug fix: extract feed image from `hfeed` correctly.
* REST API:
* Add HTTP `HEAD` support.
* Add support for URL fragments with `input=html`. If a fragment is provided, only that specific element is extracted and converted. ([185](https://github.com/snarfed/granary/issues/185))
* GitHub:
* Publish: preserve `<code>` tags instead of converting them to \`s so that GitHub renders HTML entities like `&gt;` inside them instead of leaving them escaped. [Background.](https://chat.indieweb.org/dev/2019-12-24#t1577174464779200)
* JSON Feed:
* Handle malformed attachments better.
* microformats2:
* Don't crash on string `context` fields.
* `html_to_activities()`: limit to `h-entry`, `h-event`, and `h-cite` items ([192](https://github.com/snarfed/granary/issues/192)).
* The `cache` kwarg to `Source.original_post_discovery()` now has no effect. `webutil.util.follow_redirects()` has its own built in caching now.
* Added Meetup.com support for publishing RSVPs.

2.2

Not secure
Notable changes
* Add Mastodon support!
* Add Python 3.7 support, and improve overall Python 3 compatibility.
* Update a number of dependencies.
* Switch from Python's built in `json` module to [`ujson`](https://github.com/esnme/ultrajson/) to speed up JSON parsing and encoding.
* Add `duration` and `size` support to ActivityStreams 1 and 2, RSS, and microformats2 HTML and JSON. [microformats2 support is still emerging for both](https://indieweb.org/podcast#Brainstorming). Both integer seconds and [ISO 8601 string durations](https://en.wikipedia.org/wiki/ISO_8601#Durations) are supported for `duration`. Integer bytes is used for `size` everywhere. microformats2 HTML also includes human-readable strings, eg `5.1 MB`. ([169](https://github.com/snarfed/granary/issues/169))
* Twitter:
* `[preview]_create()`: detect attempts to upload [images over 5MB](https://developer.twitter.com/en/docs/media/upload-media/uploading-media/media-best-practices#image-specs) and return an error.
* Facebook:
* Add `get_activities(scrape=True)` for scraping HTML from [m.facebook.com](https://m.facebook.com/). Requires `c_user` and `xs` cookies from a logged in session ([snarfed/bridgy#886](https://github.com/snarfed/bridgy/issues/886)).
* [Upgrade Graph API version from 2.10 to 4.0.](https://developers.facebook.com/docs/graph-api/changelog)
* Atom:
* Bug fix for de-duping images in attachments.
* RSS:
* Wrap all `<description>` element contents in `CDATA` sections.
* Render images in `<description>` with HTML `<img>` tags ([175](https://github.com/snarfed/granary/issues/175)).
* `from_activities()` bug fix: don't crash when converting multiple attachments to enclosures in a single item. (RSS only supports one enclosure per item, so we now only include the first, and log a warning if the activity has more.)

2.1

Not secure
Notable changes
* Convert AS2 `Mention` tags to AS1 `objectType` `mention` (non-standard) and vice versa ([snarfed/bridgy-fed46](https://github.com/snarfed/bridgy-fed/issues/46)).
* Twitter:
* Bug fix for large block list fetches that get rate limited after a few successful requests.
* Handle HTTP 403 + error code 200 when fetching retweets for a protected or otherwise unavailable tweet ([bridgy688](https://github.com/snarfed/bridgy/issues/688#issuecomment-520600329)).
* Demote -mentions from [person-tags](https://indieweb.org/person-tag) to [mentions](https://indieweb.org/mention). Specifically, this means they'll no longer get rendered with `u-category` mf2.
* Instagram:
* Disabled in the REST API entirely due to Instagram's aggressive rate limiting and blocking ([bridgy655](https://github.com/snarfed/bridgy/issues/665#issuecomment-524977427)).
* Update scraping to handle replies in new `edge_media_to_parent_comment` field ([164](https://github.com/snarfed/granary/issues/164)).
* Use cookie for all scraping HTTP requests, not just for likes.
* microformats2:
* Revise whitespace handling; use `white-space: pre` CSS in HTML output.
* Facebook:
* Bug fix: don't interpret `photo.php` as username in post URLs.
* Atom:
* Switch from `white-space: pre` CSS back to converting newlines to `<br>`s because some feed readers ([eg NewsBlur](https://forum.newsblur.com/t/android-cant-read-line-pre-formatted-lines/6116)) follow it too strictly and don't even line wrap.
* RSS:
* Default title to ellipsized content.

2.0

Not secure
Notable changes

_Breaking change_: drop Google+ since [it shuts down in March](https://developers.google.com/+/api-shutdown). Notably, this removes the `googleplus` module.

1.15

Not secure
_Warning: the next release, 2.0, will drop Google+ support and the `googleplus` module entirely, since Google+ is shutting down._

Notable changes

* Add RSS 2.0 output! ([124](https://github.com/snarfed/granary/issues/124))
* All silos:
* Switch users' primary URLs from web site to silo profile ([158](https://github.com/snarfed/granary/issues/158)).
* GitHub:
* Don't enclose bare URLs in `<`/`>` ([snarfed/bridgy850](https://github.com/snarfed/bridgy/issues/850)).
* Atom:
* Bug fix for actors and attachments with multiple image URLs.
* Bug fix for attachment author objects with no properties.
* Google+:
* Drop from web UI and REST API since [consumer Google+ is shutting down entirely](https://blog.google/technology/safety-security/expediting-changes-google-plus/) ([more](https://github.com/snarfed/bridgy/issues/846)).
* Switch from deprecated global API endpoint to G+ endpoint. Background in [snarfed/bridgy846](https://github.com/snarfed/bridgy/issues/846), [Google blog post](https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html) [and docs](https://developers.google.com/api-client-library/python/guide/batch).
* Instagram:
* Fix individual photo/video link urls for multi-photo/video posts.
* Handle [user-provided alt text](https://instagram-press.com/blog/2018/11/28/creating-a-more-accessible-instagram/) ([#159](https://github.com/snarfed/granary/issues/159)).
* Twitter:
* Update max video upload size from 5MB to 512MB ([162](https://github.com/snarfed/granary/issues/162)).
* `/url`: Return HTTP 400 when fetching the user's URL results in an infinite redirect.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.