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:
ResourceSet
object that was already sliced now supports reslicingResourceSet
object'sdelete()
,update()
,filter()
andget()
methods have been optimized for speedResourceSet
object'sdelete()
andupdate()
methods now call the corresponding Resource'spre_*()
andpost_*()
methodsResourceSet
object'sget()
andfilter()
methods now supports non-integer id's, e.g. WikiPage's title can now be used with itValuesResourceSet
class has been removedResourceSet.values()
method now returns an iterable of dicts instead ofValuesResourceSet
objectResourceSet.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
Resource
object 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
type
attribute which shows text representation oftype_id
-
RedmineUP CRM DealStatus resource now provides
status
attribute which shows text representation ofstatus_type
-
WikiPage resource now provides
project_id
attribute -
Unicode handling was significantly rewritten and shouldn't cause any more troubles
-
UnknownError
exception now containsstatus_code
attribute 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
redmine
toredminelib
- Resource class attributes that were previously tuples are now lists
_Resource
class renamed toResource
Redmine.custom_resource_paths
keyword argument renamed toresource_paths
Redmine.download()
method now returns a requests.Response object directly instead ofiter_content()
method if asavepath
param 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 useitself
param, e.g.Resource.refresh(itself=False)
- Removed Python 3.2 support
- Removed
container_filter
,container_create
andcontainer_update
attributes onResource
object in favor ofcontainer_many
attribute - 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
,params
andheaders
viarequests
keyword argument on Redmine object - Calling
str()
orrepr()
on a Resource was giving incorrect results if exception raising was turned off for a resource
Documentation: