v2.0.0
This version brings a lot of new features and changes, some of them are backward-incompatible, so please look carefully at the changelog below to find out what needs to be changed in your code to make it work with this version. Also Python-Redmine now comes in 2 editions: Standard and Pro, please have a look at this document for more details. Documentation was also significantly rewritten, so it is recommended to reread it even if you are an experienced Python-Redmine user.
New Features:
- RedmineUP Checklist plugin support
- Request Engines support. It is now possible to create engines to define how requests to Redmine are made, e.g. synchronous (one by one) or asynchronous using threads or processes etc.
redmine.session()context manager which allows to temporary redefine engine's behaviour- Search API support (Issue #138)
- Export functionality (Issue #58)
- REDMINE_USE_EXTERNAL_REQUESTS environmental variable for emergency cases which allows to use external requests instead of bundled one even if external requests version is lower than the bundled one
- Wrong HTTP protocol usage detector, e.g. one use HTTP when HTTPS should be used
Improvements:
-
ResourceSet objects were completely rewritten:
ResourceSetobject that was already sliced now supports reslicingResourceSetobject'sdelete(),update(),filter()andget()methods have been optimized for speedResourceSetobject'sdelete()andupdate()methods now call the corresponding Resource'spre_*()andpost_*()methodsResourceSetobject'sget()andfilter()methods now supports non-integer id's, e.g. WikiPage's title can now be used with itValuesResourceSetclass has been removedResourceSet.values()method now returns an iterable of dicts instead ofValuesResourceSetobjectResourceSet.values_list()method has been added which returns an iterable of tuples with Resource values or single values if flattened, i.e.flat=True
-
New
Resourceobject methods:delete()deletes current resource from Redminepre_delete()andpost_delete()can be used to execute tasks that should be done before/after deleting the resource throughdelete()methodbulk_decode(),bulk_encode(),decode()andencode()which are used to translate attributes of the resource to/from Python/Redmine
-
Attachment
delete()method support (requires Redmine >= 3.3.0) -
RedmineUP CRM Note resource now provides
typeattribute which shows text representation oftype_id -
RedmineUP CRM DealStatus resource now provides
statusattribute which shows text representation ofstatus_type -
WikiPage resource now provides
project_idattribute -
Unicode handling was significantly rewritten and shouldn't cause any more troubles
-
UnknownErrorexception now containsstatus_codeattribute which can be used to handle the exception instead of parsing code from exception's text -
Sync engine's speed improved to 8-12% depending on the amount of resources fetched
Changes:
- Renamed package name from
redminetoredminelib - Resource class attributes that were previously tuples are now lists
_Resourceclass renamed toResourceRedmine.custom_resource_pathskeyword argument renamed toresource_pathsRedmine.download()method now returns a requests.Response object directly instead ofiter_content()method if asavepathparam wasn't provided, this gives user even more control over response dataResource.refresh()now really refreshes itself instead of returning a new refreshed resource, to get the previous behaviour useitselfparam, e.g.Resource.refresh(itself=False)- Removed Python 3.2 support
- Removed
container_filter,container_createandcontainer_updateattributes onResourceobject in favor ofcontainer_manyattribute - Removed
Resource.translate_params()andResourceManager.prepare_params()in favor ofResource.bulk_decode() - Removed
is_unicode(),is_string()andto_string()fromredminelib.utilities - Updated bundled requests library to v2.13.0
Bugfixes:
- Infinite loop when uploading zero-length files (Issue #152)
- Unsupported Redmine resource error while trying to use Python-Redmine without installation (Issue #156)
- It was impossible to set
data,paramsandheadersviarequestskeyword argument on Redmine object - Calling
str()orrepr()on a Resource was giving incorrect results if exception raising was turned off for a resource
Documentation: