Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Py3 Compat#12

Open
lmignon wants to merge 22 commits into
apache:trunkfrom
acsone:py3compat
Open

Py3 Compat#12
lmignon wants to merge 22 commits into
apache:trunkfrom
acsone:py3compat

Conversation

@lmignon

@lmignon lmignon commented Apr 9, 2018

Copy link
Copy Markdown

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.

@lmignon lmignon mentioned this pull request Apr 9, 2018
@lmignon lmignon mentioned this pull request Jun 29, 2018
8 tasks
@x2764tech

Copy link
Copy Markdown

What would it take to get this into an official release?

@lmignon

lmignon commented Oct 16, 2018

Copy link
Copy Markdown
Author

@x2764tech We have to ask on the chemistry mailing list. dev@chemistry.apache.org
Do you have some feedback to provide on this new version? I use it in many projects without any problems but only the BrowserBinding part. I would be interested to know if other people have had the opportunity to test this new version.

@x2764tech

Copy link
Copy Markdown

I'm planning on using the AtomPub part, to integrate with JupyterHub, so I'll feed back any issues I find there.
Using Session for the requests makes a lot of things a lot simpler too.

by default, python requests doesn't quote the sting literal '+'. Nevertheless this literal must be quoted when used in the getObjectByPath request
@lmignon lmignon force-pushed the py3compat branch 3 times, most recently from 2337ced to 1468b28 Compare November 14, 2018 08:31
@lmignon lmignon force-pushed the py3compat branch 4 times, most recently from 1ac7f44 to 3686df1 Compare November 27, 2018 16:05
@codecov-io

codecov-io commented Nov 27, 2018

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (trunk@e11e66b). Click here to learn what that means.
The diff coverage is 75.13%.

Impacted file tree graph

@@           Coverage Diff           @@
##             trunk     #12   +/-   ##
=======================================
  Coverage         ?   67.4%           
=======================================
  Files            ?      11           
  Lines            ?    3215           
  Branches         ?     471           
=======================================
  Hits             ?    2167           
  Misses           ?     861           
  Partials         ?     187
Impacted Files Coverage Δ
src/cmislib/atompub/binding.py 65.16% <ø> (ø)
src/cmislib/exceptions.py 100% <100%> (ø)
src/cmislib/__init__.py 100% <100%> (ø)
src/cmislib/messages.py 100% <100%> (ø)
src/cmislib/cmis_services.py 58.73% <57.4%> (ø)
src/cmislib/domain.py 59.52% <66.66%> (ø)
src/cmislib/util.py 71.42% <72.09%> (ø)
src/cmislib/browser/binding.py 71.42% <78.57%> (ø)
src/cmislib/model.py 90.9% <88.88%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e11e66b...538ee51. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants