Py3 Compat#12
Conversation
THE CI use a docker image of Alfresco to be able to run the tests on a clean install of Alfresco
…d by the setContentStream method
Py.test allow us to run the same tests for a list of configurations. In one run we are therefore able to run the same tests for the browser binding and the atompub binding on alfresco. At this stage, the configurations is only defined for Alfresco, but it's easy to add configurations for others CMIS server.
|
What would it take to get this into an official release? |
|
@x2764tech We have to ask on the chemistry mailing list. dev@chemistry.apache.org |
|
I'm planning on using the AtomPub part, to integrate with JupyterHub, so I'll feed back any issues I find there. |
by default, python requests doesn't quote the sting literal '+'. Nevertheless this literal must be quoted when used in the getObjectByPath request
2337ced to
1468b28
Compare
1ac7f44 to
3686df1
Compare
Codecov Report
@@ Coverage Diff @@
## trunk #12 +/- ##
=======================================
Coverage ? 67.4%
=======================================
Files ? 11
Lines ? 3215
Branches ? 471
=======================================
Hits ? 2167
Misses ? 861
Partials ? 187
Continue to review full report at Codecov.
|
This PR makes the module compatible with Python 3 while remaining compatible with Python 2.7.
The first step in the migration process was the implementation of a continuous integration process based on travis and the refactoring of the tests. (see #10 for the motivations)
In a second step, the code was modified syntactically to be both Python 2 and Python 3 compliant.
The httplib2 library was then replaced by python-request (http://docs.python-requests.org/en/master/). It natively supports Python 2 and Python 3, manages sessions better (perf are improved), has no problem with large files and is very well maintained and documented. This library seems to be a de facto standard.
Finally, the code is now flake8.
These changes constitute a major evolution of the library. Even if all the unit tests allow us to believe that no regression was introduced by this refactoring, these changes must be validated by an intensive use of the library.