kopia lustrzana https://gitlab.com/jaywink/federation
6.3 KiB
6.3 KiB
[unreleased]
Breaking changes
federation.outbound.handle_create_payloadparameterto_useris now optional. Public posts don't need a recipient. This also affects Diaspora protocolbuild_sendmethod where the change is reflected similarly. #43- In practise this means the signature has changed for
handle_create_payloadandbuild_sendfromfrom_user, to_user, entitytoentity, from_user, to_user=None.
- In practise this means the signature has changed for
Added
Post.provider_display_nameis now supported in the entity outbound/inbound mappers. #44- Add utility method
federation.utils.network.send_documentwhich is just a wrapper aroundrequests.post. User agent will be added to the headers and exceptions will be silently captured and returned instead. #45
[0.4.1] - 2016-09-04
Fixes
- Don't quote/encode
Protocol.build_sendpayload. It was doing it wrongly in the first place and also it's not necessary since Diaspora 0.6 protocol changes. #41 - Fix identification of Diaspora protocol messages. This was not working in the case that the attributes in the tag were in different order. #41
[0.4.0] - 2016-07-24
Breaking changes
- While in early stages, doing some renaming of modules to suit the longer term.
federation.controllershas been split into two,federation.outboundandfederation.inbound. The following methods have new import locations:federation.controllers.handle_receive->federation.inbound.handle_receivefederation.controllers.handle_create_payload->federation.outbound.handle_create_payload
- Class
federation.hostmeta.generators.DiasporaHCardnow requiresguid,public_keyandusernamefor initialization. Leaving these out was a mistake in the initial implementation. Diaspora has these in at least 0.6 development branch.
Added
Relationshipbase entity which represents relationships between two handles. Types can be following, sharing, ignoring and blocking. The Diaspora counterpart,DiasporaRequest, which represents a sharing/following request is outwards a single entity, but incoming a double entity, handled by creating both a sharing and following version of the relationship.Profilebase entity and Diaspora counterpartDiasporaProfile. Represents a user profile.federation.utils.network.fetch_documentutility function to fetch a remote document. Returns document, status code and possible exception. Takes eitherurlor ahost+pathcombination. Withhost, https is first tried and optionally fall back to http.- Utility methods to retrieve Diaspora user discovery related documents. These include the host-meta, webfinger and hCard documents. The utility methods are in
federation.utils.diaspora. - Utility to fetch remote profile,
federation.fetchers.retrieve_remote_profile. Currently always uses Diaspora protocol. Returns aProfileentity.
Changed
- Unlock most of the direct dependencies to a certain version range. Unlock all of test requirements to any version.
- Entities passed to
federation.controllers.handle_create_payloadare now converted from the base entity types (Post, Comment, Reaction, etc) to Diaspora entity types (DiasporaPost, DiasporaComment, DiasporaLike, etc). This ensures actual payload generation has the correct methods available (for exampleto_xml) whatever entity is passed in.
Fixes
- Fix fetching sender handle from Diaspora protocol private messages. As it is not contained in the header, it needs to be read from the message content itself.
- Fix various issues with
DiasporaHCardtemplate after comparing to some real world hCard templates from real pods. Old version was based on documentation in Diaspora project wiki.
[0.3.2] - 2016-05-09
Changed
- Test factories and other test files are now included in the package installation. Factories can be useful when creating project tests.
- Bump allowed
lxmlto 3.6.0 - Bump allowed
python-dateutilto 2.5.3
Fixes
- Don't raise on Post.tags if Post.raw_content is None
[0.3.1] - 2016-04-13
Added
- Support for generating
.well-known/nodeinfodocument, which was forgotten from the 0.3.0 release. Methodfederation.hostmeta.generators.get_nodeinfo_well_known_documentdoes this task. It requires anurlwhich should be the full base url of the host. Optionallydocument_pathcan be specified, but it is optional and defaults to the one in the NodeInfo spec.
[0.3.0] - 2016-04-13
Added
- Support for generating NodeInfo documents using the generator
federation.hostmeta.generators.NodeInfo. Strict validation is skipped by default, but can be enabled by passing inraise_on_validateto theNodeInfoclass. By default a warning will be generated on documents that don't conform with the strict NodeInfo values. This can be disabled by passing inskip_validateto the class.
[0.2.0] - 2016-04-09
Backwards incompatible changes
- Any implementations using the Diaspora protocol and
Postentities must now useDiasporaPostinstead. See "Changed" below.
Added
- Support for using
validate_field()methods for entity fields and checking missing fields against_required. To use this validation,validate()must specifically be called for the entity instance. - Base entities
CommentandReactionwhich subclass the newParticipationMixin. - Diaspora entity
DiasporaComment, a variant ofComment. - Diaspora entity
DiasporaLike, a variant ofReactionwith thereaction = "like"default.
Changed
- Refactored Diaspora XML generators into the Diaspora entities themselves. This introduces Diaspora versions of the base entities called
DiasporaPost,DiasporaCommentandDiasporaLike. Any implementations using the Diaspora protocol andPostentities must now useDiasporaPostinstead.
Fixes
- Entities which don't specifically get passed a
created_atnow get correct current time increated_atinstead of always having the time part as00:00.
[0.1.1] - 2016-04-03
Initial package release
Supports well Post type object receiving over Diaspora protocol.
Untested support for crafting outgoing protocol messages.