34 KiB
Changelog
[0.18.0-dev] - unreleased
Added
-
Work has started on ActivityPub support 🎉
-
Base entities
Post,CommentandImagenow accept anurlparameter. This will be used when serializing the entities to AS2 for ActivityPub. -
RFC7033 webfinger generator now has compatibility to platforms using it with ActivityPub. It now lists
aliasespointing to the ActivityPub entity ID and profile URL. Also there is arel=selfto point to theapplication/activity+jsonAS2 document location. -
Added a Django view decorator that makes any Profile or Post view ActivityPub compatible. Right now basic AS2 serialization is supported when the view is called using the supported content types in the Accept header. If the content types are not in the header, the view will render normally.
When used, a few extra settings must be given in the Django
FEDERATIONconfiguration dictionary.get_object_functionshould contain the Python path to a function that takes a request object and returns an object matching the ActivityPub ID for the request orNone.process_payload_functionshould contain the Python path to a function that takes in a request object. It should returnTrueif successful (or placed in queue for processing later) orFalsein case of any errors.
-
Added network utility
network.fetch_host_ipto fetch IP by hostname. -
Inbound helper utility
handle_receivenow also supports ActivityPub payloads. Protocol will be identified by looking at the payload contents. -
Fetcher helper utility
retrieve_remote_profilenow also supports fetching ActivityPub profiles. Response will be a serialized protocol specific profile entity.
Changed
-
Backwards incompatible. Lowest compatible Python version is now 3.6.
-
Backwards incompatible. Internal refactoring to allow adding ActivityPub support as the second supported protocol. Highlights of changes below.
- Reversal of all the work previously done to use Diaspora URL format identifiers. Working with the Diaspora protocol now always requires using handles and GUID's as before the changes introduced in v0.15.0. It ended up impossible to construct a Diaspora URL in all cases in a way that apps only need to store one identifier.
- The
idand possibletarget_idare now either URL format identifiers (ActivityPub) or a handle or GUID (Diaspora, depending on entity). Additionally a newactor_idhas been added which for ActivityPub is an URL and for Diaspora a handle. Note, Diaspora entities always have also theguid,handle,target_guidandtarget_handleas before v0.15.0, depending on the entity. When creating Diaspora entities, you must pass these in for sending to work. - The high level
fetchers.retrieve_remote_contentsignature has changed. It now expects anidfor fetching from AP protocol andhandle,guidandentity_typeto fetch from Diaspora. Additionally asender_key_fetchercan be passed in as before to optimize public key fetching using a callable. - The high level
fetchers.retrieve_remote_profilesignature has changed. It now expects anidfor fetching from AP protocol andhandlefor fetching from Diaspora. Additionally asender_key_fetchercan be passed in as before to optimize public key fetching using a callable. - The generator class
RFC7033Webfingernow expects instead of anidthehandleandguidof the profile. - NodeInfo2 parser now returns the admin user in
handleformat instead of a Diaspora format URL. - The high level inbound and outbound functions
inbound.handle_receive,outbound.handle_sendparameterusermust now receive aUserTypecompatible object. This must have the attributesidandprivate_key. If Diaspora support is required then alsohandleandguidshould exist. The type can be found as a class intypes.UserType. - The outbound function
outbound.handle_sendparameterrecipientsstructure has changed. It must now for Diaspora contain either ahandle(public delivery) or tuple ofhandle, RSAPublicKey, guidfor private delivery. For AP delivery eitherurl IDfor public delivery or tuple ofurl ID, RSAPublicKeyfor private delivery.
-
Backwards incompatible. Generator
RFC3033Webfingerand the relatedrfc3033_webfinger_viewhave been renamed toRFC7033Webfingerandrfc7033_webfinger_viewto reflect the right RFC number. -
Network helper utility
fetch_documentcan now also take a dictionary ofheaders. They will be passed to the underlyingrequestsmethod call as is. -
Backwards incompatible. * Fetcher helper utility
retrieve_remote_profileparameterhandlehas been removed. Pass in the Diaspora protocol handle as the first parameter to fetch a Diaspora remote profile.
Removed
- Backwards incompatible. Support for Legacy Diaspora payloads have been removed to reduce the amount of code needed to maintain while refactoring for ActivityPub.
[0.17.0] - 2018-08-11
Fixed
-
Switch crypto library
pycryptotopycryptodome, which is a more up to date fork of the former. This fixes CVE-2018-6594 found in the former.Deployment note. When updating an application, you must uninstall
pycryptofirst, otherwise there will be a conflict if both the versions are installed at the same time. To uninstall, dopip uninstall pycrypto.
[0.16.0] - 2018-07-23
Added
-
Enable generating encrypted JSON payloads with the Diaspora protocol which adds private message support. (related issue)
JSON encrypted payload encryption and decryption is handled by the Diaspora
EncryptedPayloadclass. -
Add RFC7033 webfinger generator (related issue)
Also provided is a Django view and url configuration for easy addition into Django projects. Django is not a hard dependency of this library, usage of the Django view obviously requires installing Django itself. For configuration details see documentation.
-
Add fetchers and parsers for NodeInfo, NodeInfo2, StatisticsJSON and Mastodon server metainfo documents.
-
Add NodeInfo2 generator and Django view. See documentation for details. (related issue)
-
Added new network utilities to fetch IP and country information from a host.
The country information is fetched using the free
ipdata.coservice. NOTE! This service is rate limited to 1500 requests per day. -
Extract mentions from Diaspora payloads that have text content. The mentions will be available in the entity as
_mentionswhich is a set of Diaspora ID's in URI format.
Changed
-
Send outbound Diaspora payloads in new format. Remove possibility to generate legacy MagicEnvelope payloads. (related issue)
-
Backwards incompatible. Refactor
handle_sendfunctionNow handle_send high level outbound helper function also allows delivering private payloads using the Diaspora protocol. (related issue)
The signature has changed. Parameter
recipientsshould now be a list of recipients to delivery to. Each recipient should either be anidor a tuple of(id, public key). If public key is provided, Diaspora protocol delivery will be made as an encrypted private delivery. -
Backwards incompatible. Change
handle_create_payloadfunction signature.Parameter
to_useris nowto_user_keyand thus instead of an object containing thekeyattribute it should now be an RSA public key object instance. This simplifies things since we only need the key from the user, nothing else. -
Switch Diaspora protocol to send new style entities (related issue)
We've already accepted these on incoming payloads for a long time and so do all the other platforms now, so now we always send out entities with the new property names. This can break federation with really old servers that don't understand these keys yet.
Fixed
-
Change unquote method used when preparing Diaspora XML payloads for verification (related issue)
Some platforms deliver payloads not using the urlsafe base64 standard which caused problems when validating the unquoted signature. Ensure maximum compatibility by allowing non-standard urlsafe quoted payloads.
-
Fix for empty values in Diaspora protocol entities sometimes ending up as
Noneinstead of empty string when processing incoming payloads. -
Fix validation of
Retractionwith entity typeShare -
Allow port in Diaspora handles as per the protocol specification
Previously handles were validated like emails.
-
Fix Diaspora
Profilemapping regardinglast_namepropertyPreviously only
first_namewas used when creating theProfile.namevalue. Now bothfirst_nameandlast_nameare used.When creating outgoing payloads, the
Profile.namewill still be placed infirst_nameto avoid trying to artificially split it.
[0.15.0] - 2018-02-12
Added
-
Added base entity
Sharewhich maps to aDiasporaResharefor the Diaspora protocol. (related issue)The
Shareentity supports all the properties that a Diaspora reshare does. Additionally two other properties are supported:raw_contentandentity_type. The former can be used for a "quoted share" case where the sharer adds their own note to the share. The latter can be used to reference the type of object that was shared, to help the receiver, if it is not sharing aPostentity. The value must be a base entity class name. -
Entities have two new properties:
idandtarget_id.Diaspora entity ID's are in the form of the Diaspora URI scheme, where it is possible to construct an ID from the entity. In the future, ActivityPub object ID's will be found in these properties.
-
New high level fetcher function
federation.fetchers.retrieve_remote_content. (related issue)This function takes the following parameters:
id- Object ID. For Diaspora, the only supported protocol at the moment, this is in the Diaspora URI format.sender_key_fetcher- Optional function that takes a profilehandleand returns a public key instrformat. If this is not given, the public key will be fetched from the remote profile over the network.
The given ID will be fetched from the remote endpoint, validated to be from the correct author against their public key and then an instance of the entity class will be constructed and returned.
-
New Diaspora protocol helpers in
federation.utils.diaspora:retrieve_and_parse_content. See notes regarding the high level fetcher above.fetch_public_key. Given ahandleas a parameter, will fetch the remote profile and return thepublic_keyfrom it.parse_diaspora_uri. Parses a Diaspora URI scheme string, returns eitherNoneif parsing fails or atupleofhandle,entity_typeandguid.
-
Support fetching new style Diaspora protocol Webfinger (RFC 3033) (related issue)
The legaxy Webfinger is still used as fallback if the new Webfinger is not found.
Changed
-
Refactoring for Diaspora
MagicEnvelopeclass.The class init now also allows passing in parameters to construct and verify MagicEnvelope instances. The order of init parameters has not been changed, but they are now all optional. When creating a class instance, one should always pass in the necessary parameters depnding on whether the class instance will be used for building a payload or verifying an incoming payload. See class docstring for details.
-
Diaspora procotol receive flow now uses the
MagicEnvelopeclass to verify payloads. No functional changes regarding verification otherwise. -
Diaspora protocol receive flow now fetches the sender public key over the network if a
sender_key_fetcherfunction is not passed in. Previously an error would be raised.Note that fetching over the network for each payload is wasteful. Implementers should instead cache public keys when possible and pass in a function to retrieve them, as before.
Fixed
-
Converting base entity
ProfiletoDiasporaProfilefor outbound sending missed two attributes,image_urlsandtag_list. Those are now included so that the values transfer into the built payload. -
Fix fallback to HTTP in the
fetch_documentnetwork helper in the case ofConnectionErrorwhen trying HTTPS. Thanks @autogestion. -
Ensure
handleis always lower cased when fetching remote profile usingretrieve_remote_profile. Warning will be logged if an upper case handle is passed in.
[0.14.1] - 2017-08-06
Fixed
- Fix regression in handling Diaspora relayables due to security fix in 0.14.0. Payload and entity handle need to be allowed to be different when handling relayables.
[0.14.0] - 2017-08-06
Security
-
Add proper checks to make sure Diaspora protocol payload handle and entity handle are the same. Even though we already verified the signature of the sender, we didn't ensure that the sender isn't trying to fake an entity authored by someone else.
The Diaspora protocol functions
message_to_objectsandelement_to_objectsnow require a new parameter, the payload sender handle. These functions should normally not be needed to be used directly.
Changed
-
Breaking change. The high level
federation.outboundfunctionshandle_sendandhandle_create_payloadsignatures have been changed. This has been done to better represent the objects that are actually sent in and to add an optionalparent_userobject.For both functions the
from_userparameter has been renamed toauthor_user. Optionally aparent_userobject can also be passed in. Both the user objects must haveprivate_keyandhandleattributes. In the case thatparent_useris given, that user will be used to sign the payload and for Diaspora relayables an extraparent_author_signaturein the payload itself.
[0.13.0] - 2017-07-22
Backwards incompatible changes
- When processing Diaspora payloads, entity used to get a
_source_objectstored to it. This was anetree.Elementcreated from the source object. Due to serialization issues in applications (for example pushing the object to a task queue or saving to database),_source_objectis now a byte string representation for the element done withetree.tostring().
Added
- New style Diaspora private encrypted JSON payloads are now supported in the receiving side. Outbound private Diaspora payloads are still sent as legacy encrypted payloads. (issue)
- No additional changes need to be made when calling
handle_receivefrom your task processing. Just pass in the full received XML or JSON payload as a string with recipient user object as before.
- No additional changes need to be made when calling
- Add
created_atto DiasporaCommententity XML creator. This is required in renewed Diaspora protocol. (related issue)
Fixed
- Fix getting sender from a combination of legacy Diaspora encrypted payload and new entity names (for example
author). This combination probably only existed in this library. - Correctly extend entity
_children. Certain Diaspora payloads caused_childrenfor an entity to be written over by an empty list, causing for example status message photos to not be saved. Correctly do an extend on it. (issue) - Fix parsing Diaspora profile
tag_stringintoProfile.tag_listif thetag_stringis an empty string. This caused the wholeProfileobject creation to fail. (issue) - Fix processing Diaspora payload if it is passed to
handle_receiveas abytesobject. (issue) - Fix broken Diaspora relayables after latest 0.2.0 protocol changes. Previously relayables worked only because they were reverse engineered from the legacy protocol. Now that XML order is not important and tag names can be different depending on which protocol version, the relayable forwarding broke. To fix, we don't regenerate the entity when forwarding it but store the original received object when generating a
parent_author_signature(which is optional in some cases, but we generate it anyway for now). This happens in the previously existingentity.sign_with_parent()method. In the sending part, if the original received object (now with a parent author signature) exists in the entity, we send that to the remote instead of serializing the entity to XML.- To forward a relayable you must call
entity.sign_with_parent()before callinghandle_sendto send the entity.
- To forward a relayable you must call
Removed
Post.photosentity attribute was never used by any code and has been removed. Child entities of typeImageare stored in thePost._childrenas before.- Removed deprecated user private key lookup using
user.keyin Diaspora receive processing. Passed inuserobjects must now have aprivate_keyattribute.
[0.12.0] - 2017-05-22
Backwards incompatible changes
- Removed exception class
NoHeaderInMessageError. New style Diaspora protocol does not have a custom header in the Salmon magic envelope and thus there is no need to raise this anywhere.
Added
- New style Diaspora public payloads are now supported (see here). Old style payloads are still supported. Payloads are also still sent out old style.
- Add new
Followbase entity and support for the new Diaspora "contact" payload. The simpleFollowmaps to Diaspora contact entity with following/sharing both true or false. Sharing as a separate concept is not currently supported. - Added
_receiving_guidto all entities. This is filled withuser.guidifuseris passed tofederation.inbound.handle_receiveand it has aguid. Normally in for example Diaspora, this will always be done in private payloads.
Fixed
- Legacy Diaspora retraction of sharing/following is now supported correctly. The end result is a
DiasporaRetractionfor entity typeProfile. Since the payload doesn't contain the receiving user for a sharing/following retraction in legacy Diaspora protocol, we store the guid of the user in the entity as_receiving_guid, assuming it was passed in for processing.
[0.11.0] - 2017-05-08
Backwards incompatible changes
Diaspora protocol support added for comment and like relayable types. On inbound payloads the signature included in the payload will be verified against the sender public key. A failed verification will raise SignatureVerificationError. For outbound entities, the author private key will be used to add a signature to the payload.
This introduces some backwards incompatible changes to the way entities are processed. Diaspora entity mappers get_outbound_entity and entity utilities get_full_xml_representation now requires the author private_key as a parameter. This is required to sign outgoing Comment and Reaction (like) entities.
Additionally, Diaspora entity mappers message_to_objects and element_to_objects now take an optional sender_key_fetcher parameter. This must be a function that when called with the sender handle will return the sender public key. This allows using locally cached public keys instead of fetching them as needed. NOTE! If the function is not given, each processed payload will fetch the public key over the network.
A failed payload signature verification now raises a SignatureVerificationError instead of a less specific AssertionError.
Added
- Three new attributes added to entities.
- Add protocol name to all entities to attribute
_source_protocol. This might be useful for applications to know which protocol payload the entity was created from once multiple protocols are implemented. - Add source payload object to the entity at
_source_objectwhen processing it. - Add sender public key to the entity at
_sender_key, but only if it was used for validating signatures.
- Add protocol name to all entities to attribute
- Add support for the new Diaspora payload properties coming in the next protocol version. Old XML payloads are and will be still supported.
DiasporaCommentandDiasporaLikewill get the order of elements in the XML payload as a list inxml_tags. For implementers who want to recreate payloads for these relayables, this list should be saved for later use.- High level
federation.outbound.handle_sendhelper function now allows sending entities to a list of recipients without having to deal with payload creation or caring about the protocol (in preparation of being a multi-protocol library).- The function takes three parameters,
entitythat will be sent,from_userthat is sending (note, not necessarely authoring, this user will be used to sign the payload for Diaspora for example) and a list of recipients as tuples of recipient handle/domain and optionally protocol. In the future, if protocol is not given, it will be guessed from the recipient handle, and if necessary a network lookup will be made to see what protocols the receiving identity supports. - Payloads will be delivered to each receiver only once. Currently only public messages are supported through this helper, so multiple recipients on a single domain will cause only one delivery.
- The function takes three parameters,
Changed
- Refactor processing of Diaspora payload XML into entities. Diaspora protocol is dropping the
<XML><post></post></XML>wrapper for the payloads. Payloads with the wrapper will still be parsed as before.
[0.10.1] - 2017-03-09
Fixes
- Ensure tags are lower cased after collecting them from entity
raw_content.
[0.10.0] - 2017-01-28
Added
- Add support for new Diaspora protocol ISO 8601 timestamp format introduced in protocol version 0.1.6.
- Tests are now executed also against Python 3.6.
Fixes
- Don't crash
federation.utils.diaspora.retrieve_diaspora_webfingerif XRD parse raises anxml.parsers.expat.ExpatError.
[0.9.1] - 2016-12-10
Fixes
- Made
Profile.raw_contentoptional. This fixes validating profiles parsed from Diaspora hCard's.
[0.9.0] - 2016-12-10
Backwards incompatible changes
Imageno longer has atextattribute. It is replaced byraw_content, the same attribute asPostandCommenthave. Unlike the latter two,Image.raw_contentis not mandatory.
Added
- Entities can now have a children. These can be accessed using the
_childrenlist. Acceptable children depends on the entity. Currently,Post,CommentandProfilecan have children of entity typeImage. Child types are validated in the.validate()entity method call.
Fixed
- Diaspora protocol
message_to_objectsmethod (called through inbound high level methods) now correctly parses Diaspora<photo>elements and createsImageentities from them. If they are children of status messages, they will be available through thePost._childrenlist.
[0.8.2] - 2016-10-23
Fixed
- Remove legacy splitting of payload to 60 chars when creating Diaspora payloads. Diaspora 0.6 doesn't understand these any more.
[0.8.1] - 2016-10-18
Fixed
federation.utils.network.send_documentincorrectly passed inkwargstorequests.post, causing an error when sending custom headers.- Make sure
federation.utils.network.send_documentheaders are treated case insensitive before passing then onwards torequests.post.
[0.8.0] - 2016-10-09
Library is now called federation
The name Social-Federation was really only an early project name which stuck. Since the beginning, the main module has been federation. It makes sense to unify these and also shorter names are generally nicer.
What do you need to do?
Mostly nothing since the module was already called federation. Some things to note below:
- Update your requirements with the new library name
federation. - If you hook to the old logger
social-federation, update those to listen tofederation, which is now the standard logger name used throughout.
Other backwards incompatible changes
federation.utils.diaspora.retrieve_and_parse_profilewill now returnNoneif theProfileretrieved doesn't validate. This will affect also the output offederation.fetchers.retrieve_remote_profilewhich is the high level function to retrieve profiles.- Remove unnecessary
protocolparameter fromfederation.fetchers.retrieve_remote_profile. We're miles away from including other protocols and ideally the caller shouldn't have to pass in the protocol anyway.
Added
- Added
Retractionentity withDiasporaRetractioncounterpart.
[0.7.0] - 2016-09-15
Backwards incompatible changes
- Made
guidmandatory forProfileentity. Library users should always be able to get a full validated object as we considerguida core attribute of a profile. - Always validate entities created through
federation.entities.diaspora.mappers.message_to_objects. This is the code that transforms federation messages for the Diaspora protocol to actual entity objects. Previously no validation was done and callers offederation.inbound.handle_receivereceived entities that were not always valid, for example they were missing aguid. Now validation is done in the conversion stage and errors are pushed to thefederationlogger in the event of invalid messages.- Note Diaspora Profile XML messages do not provide a GUID. This is handled internally by fetching the guid from the remote hCard so that a valid
Profileentity can be created.
- Note Diaspora Profile XML messages do not provide a GUID. This is handled internally by fetching the guid from the remote hCard so that a valid
Added
- Raise a warning if unknown parameters are passed to entities.
- Ensure entity required attributes are validated for
Noneor empty string values. Required attributes must not only exist but also have a value. - Add validation to entities with the attribute
public. Onlyboolvalues are accepted.
Changed
- Function
federation.utils.diaspora.parse_profile_from_hcardnow requires a second argument,handle. Since in the future Diaspora hCard is not guaranteed to have username and domain, we now pass handle to the parser directly.
[0.6.1] - 2016-09-14
Fixed
- New style Diaspora Magic Envelope didn't require or like payload data to be cut to 60 char lines, as the legacy protocol does. Fixed to not cut lines.
[0.6.0] - 2016-09-13
Added
- New style Diaspora Magic Envelope support. The magic envelope can be created using the class
federation.protocols.diaspora.magic_envelope.MagicEnvelope. By default this will not wrap the payload message in<XML><post></post></XML>. To provide that functionality the class should be initialized withwrap_payload=True. No changes are made to the protocol send methods yet, if you need this new magic envelope you can initialize and render it directly.
Changed
- Deprecate receiving user
keyattribute for Diaspora protocol. Instead correct attribute is nowprivate_keyfor any user passed tofederation.inbound.handle_receive. We already useprivate_keyin the message creation code so this is just to unify the user related required attributes.- DEPRECATION: There is a fallback with
keyfor user objects in the receiving payload part of the Diaspora protocol until 0.8.0.
- DEPRECATION: There is a fallback with
Fixes
- Loosen up hCard selectors when parsing profile from hCard document in
federation.utils.diaspora.parse_profile_from_hcard. The selectors now match Diaspora upcoming federation documentation.
[0.5.0] - 2016-09-05
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 - Add Diaspora entity utility
federation.entities.diaspora.utils.get_full_xml_representation. Renders the entity XML document and wraps it in<XML><post>...</post></XML>. #46
[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.