libreant
libreant copied to clipboard
Migrate to python 3
Do you consider it a thing? I'd suggest to start this discussion, weighing the following metrics:
- It is feasible? (dependencies, complexity, ...)
- Are we interested? (Python 2 goes EOL by 2020: PEP 373)
- Which benefits shall we expect?
Meanwhile, I will start a tentative migration. But I cannot guarantee success.
@leophys I think the very blocking issue is dependencies. Making code py3-compatible is never impossible, but someone (ie: you) should check if all libreant dependencies are py3 compatible.
I don't think there is any serious benefit, apart of course staying compatible with what everyone will be developing/installing in 3 years from now.
According to caniusepython3, opensearch
is our only blocker. It is a library with many issues, by the way. We could fork/rewrite it if that's needed (do you remember that crazy bug we find? see https://github.com/edsu/opensearch/issues/6 , b746e3b96a2d0b5 and #31 )
Here is the complete check result https://caniusepython3.com/check/1abbbe2a-53bf-48b2-80bd-0507b0214f05
@boyska, I am slowly migrating libreant python2 to python3 code, and I forked opensearch and will see if it is feasible for me to migrate it to python3.
Blallo:
@boyska, I am slowly migrating libreant python2 to python3 code, and I forked opensearch and will see if it is feasible for me to migrate it to python3.
ok, I did some small try too, just running 2to3 and small fixes. let me
publish the few things I did in a branch py3
I went through the (not so useful) process of migrating opensearch to get python3 compatibility. You can find my progresses in python3
branch on my fork of opensearch.
Apparently I am able to perform an import in ipython2 and ipython3 without errors, but the test suite fails. It seems that such failures (see below) are related to the fact that http://www.koders.com/
does not offer anymore services. What shall we do? I'd propose to open a PR to edsu and see how he answers, maybe updating the test suite :grin:
running test
Searching for nose>=0.10.4
Reading https://pypi.python.org/simple/nose/
Downloading https://pypi.python.org/packages/99/4f/13fb671119e65c4dce97c60e67d3fd9e6f7f809f2b307e2611f4701205cb/nose-1.3.7-py2-none-any.whl#md5=2a10ed5020bd4785a91f96893204f65b
Best match: nose 1.3.7
Processing nose-1.3.7-py2-none-any.whl
Installing nose-1.3.7-py2-none-any.whl to /home/leo/Documents/coding/opensearch/.eggs
Installed /home/leo/Documents/coding/opensearch/.eggs/nose-1.3.7-py2.7.egg
running egg_info
writing opensearch.egg-info/PKG-INFO
writing top-level names to opensearch.egg-info/top_level.txt
writing dependency_links to opensearch.egg-info/dependency_links.txt
reading manifest file 'opensearch.egg-info/SOURCES.txt'
writing manifest file 'opensearch.egg-info/SOURCES.txt'
running build_ext
test_query (test.test_client.ClientTests) ... ERROR
test_adultcontent (test.test_description.DescriptionTests) ... ok
test_attribution (test.test_description.DescriptionTests) ... ok
test_contact (test.test_description.DescriptionTests) ... ok
test_description (test.test_description.DescriptionTests) ... ok
test_developer (test.test_description.DescriptionTests) ... ok
test_format (test.test_description.DescriptionTests) ... ok
test_image (test.test_description.DescriptionTests) ... ok
test_longname (test.test_description.DescriptionTests) ... ok
test_samplesearch (test.test_description.DescriptionTests) ... ok
test_shortname (test.test_description.DescriptionTests) ... ok
test_syndicationright (test.test_description.DescriptionTests) ... ok
test_tags (test.test_description.DescriptionTests) ... ok
test_url (test.test_description.DescriptionTests) ... ok
test_count (test.test_query.QueryTests) ... ok
test_extra_param (test.test_query.QueryTests) ... ok
test_macro (test.test_query.QueryTests) ... ok
test_multiple (test.test_query.QueryTests) ... ok
test_param (test.test_query.QueryTests) ... ok
test_prefix (test.test_query.QueryTests) ... ok
test_prefix_macro (test.test_query.QueryTests) ... ok
test_searchTerms (test.test_query.QueryTests) ... ok
test_startIndex (test.test_query.QueryTests) ... ok
test_startPage (test.test_query.QueryTests) ... ok
test_iterator_with_index (test.test_results.ResultsTests) ... ERROR
test_iterator_with_page (test.test_results.ResultsTests) ... ERROR
test_result (test.test_results.ResultsTests) ... ERROR