v2.1.0
This release concentrates mostly on stability and adds small features here and there. Some of them are backwards incompatible and are marked as such. They shouldn't affect many users since most of them were used internally by Python-Redmine. A support for the Files API has been finally added, but please be sure to check it's documentation as the implementation on the Redmine side is horrible and there are things to keep in mind while working with Files API. Lastly, only until the end of May 2018 there is a chance to buy a Pro Edition for only 14.99$ instead of the usual 24.99$, this is your chance to get an edition with additional features for a good price and to support the further development of Python-Redmine, more info here.
New Features:
- Files API support (Issue #117)
Improvements:
-
Backwards Incompatible: ResourceSet's
filter()
method became more advanced. It is now possible to filter on all available resource attributes, to follow resource relationships and apply lookups to the filters (see docs for details) -
ResourceManager class has been refactored:
manager_class
attribute on theResource
class can now be used to assign a separateResourceManager
to a resource, that allows outsourcing a resource specific functionality to a separate manager class (seeWikiPageManager
as an example)- Backwards Incompatible:
request()
method has been removed _construct_*_url()
,_prepare_*_request()
,_process_*_response()
methods have been added for create, update and delete methods to allow a fine-grained control over these operations
-
Ability to upload file-like objects (Issue #186) (thanks to hjpotter92)
-
Support for retrieving project's time entry activities (see docs for details)
-
Attachment
update()
operation support (requires Redmine >= 3.4.0) -
Resource.save()
now accepts**attrs
that need to be changed/set and returnsself
instead of a booleanTrue
, which makes it chainable, so you can now do something likeproject.save(name='foo', description='bar').export('txt', '/home/foo')
-
get
operation support for News, Query, Enumeration, IssueStatus, Tracker, CustomField, ContactTag, DealStatus, DealCategory and CRMQuery resources -
include
param inget
,all
andfilter
operations now accepts lists and tuples instead of comma-separated string which is still accepted for backward compatibility reasons, i.e. one can useinclude=['foo', 'bar']
instead ofinclude='foo,bar'
-
It is now possible to use
None
and0
in addition to''
inassigned_to_id
attribute in Issue resource if an assignee needs to be removed from an issue
Changes:
- Backwards Incompatible: Issue
all
operation now really returns all issues, i.e. both open and closed, instead of only returning open issues in previous versions due to the respect to Redmine's standard behaviour - Backwards Incompatible: Instead of only returning a token string,
upload()
method was modified to return a dict that contains all the data for an upload returned from Redmine, i.e. id and token for Redmine >= 3.4.0, token only for Redmine < 3.4.0. Also it is now possible to use this token and pass it using atoken
key instead of thepath
key with path to the file inuploads
parameter when doing an upload, this gives more control over the uploading process if needed - Backwards Incompatible: Removed
resource_paths
argument from Redmine object sinceResourceManager
now uses a special resource registry, to which, all resources that inherit from any Python-Redmine resource are being automatically added - Backwards Incompatible: Removed
container_many
in favor ofcontainer_filter
,container_create
andcontainer_update
attributes onResource
object to allow more fine-grained resource setup - Backwards Incompatible:
return_raw
parameter onengine.request()
andengine.process_response()
methods has been removed in favor ofreturn_raw_response
attribute on engine object - Updated bundled requests library to v2.15.1
Bugfixes:
- Support 204 status code when deleting a resource (Issue #189) (thanks to dotSlashLu)
- Raise
ValidationError
instead of not helpfulTypeError
exception when trying to create a WikiPage resource that already exists (Issue #182) - Enumeration, Version, Group and Notes
custom_fields
attribute was returned as a list of dicts instead of being converted toResourceSet
object - Downloads were downloaded fully into memory instead of being streamed as needed
ResourceRequirementsError
exception was broken since v2.0.0- RedmineUP CRM Contact and Deal resources export functionality didn't work
- RedmineUP CRM Contact and Deal resources sometimes weren't converted to Resource objects using Search API
Documentation:
- Mentioned support for
generate_password
andsend_information
in User's resource create/update methods,status
in User's resource update method,parent_id
in Issue's filter method andinclude
in Issue's all method