-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3 support #14
Comments
Example pull request: galaxyproject#2453 Useful commands:
When done with changing the python file(s), make sure all tests pass and both python2 and 3 lint is OK. Then add the file(s) that are OK to this file, to check them automatically with python 3 lint: |
Smaller PRs or are we going to merge a bunch of stuff together? |
@jmchilton Still have to figure how to split the work among people, suggestions welcome! |
Regarding bx-python, code is now here and the tests run/pass. I will merge any Python 3 changes that don't break the tests under 2. |
@jxtx Thanks! I've removed it from the list. |
List of files that do not pass py34-lint tests:
|
@nsoranzo Sorry, to be clear the tests run/pass under Python 2. Still needs work for python 3. |
@jxtx Ohhh, OK. I don't think we will have time for that today, but I'll open an issue on your repo. |
@jmchilton I've created a |
I will start with |
Doing OK, done. |
Doing ./test/api/helpers.py |
WIP on getting an unit test to run in Python 3. |
doing ./test/api/test_datasets.py |
I've done |
doing ./test/unit/managers/base.py |
doing ./test/api/test_tool_data.py |
doing ./test/api/test_workflow_extraction.py |
doing ./test/unit/managers/test_DatasetManager.py |
Doing |
doing ./test/unit/managers/test_HDAManager.py |
Done |
found something interesting maybe helpful for this project Cheat Sheet: Writing Python 2-3 compatible code |
Done: |
test/unit/datatypes/dataproviders/test_line_dataproviders.py |
Doing |
I'm doing |
lib/galaxy/datatypes/sequence.py |
Doing lib/galaxy/datatypes/converters/interval_to_bed_converter.py |
./lib/galaxy/datatypes/sniff.py |
./lib/galaxy/datatypes/converters/fastq_to_fqtoc.py |
./lib/galaxy/datatypes/tabular.py |
lib/galaxy/datatypes/converters/bed_to_gff_converter.py |
./lib/galaxy/datatypes/converters/lped_to_fped_converter.py |
scripts/api/example_watch_folder.py |
./lib/galaxy/datatypes/util/gff_util.py |
./lib/galaxy/datatypes/dataproviders/line.py |
./lib/galaxy/datatypes/dataproviders/column.py |
./lib/galaxy/managers/context.py |
./scripts/bootstrap_history.py |
./lib/galaxy/datatypes/converters/pbed_ldreduced_converter.py |
|
./lib/galaxy/visualization/genomes.py |
./lib/galaxy/model/migrate/versions/0006_change_qual_datatype.py |
lib/galaxy/visualization/data_providers/phyloviz/newickparser.py |
./lib/galaxy/model/migrate/versions/0014_pages.py |
+lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py |
Hey, so I was looking at lending a hand in this, and trying to read up on porting methods. I notice that the example pull request doesn't really touch strings, instead of using any of the methods I've seen like unicode_literals or six.u(). What was the reasoning in going with this strategy? Are there things to watch out for when applying it? |
@NickSto You are very welcome to contribute to this effort, feel free to add commits to the Regarding your question, there is no need to use If you want a short introduction of the recommended approach to do the porting, we can meet for 10' tomorrow at some point. |
@tshtatland @ericenns Do not forget to add
at the top of a file when you change |
I've opened PR galaxyproject#2574, thank you all for the fantastic contribution! |
Python 2.7 will not be maintained past 2020.
Add support for Python >= 3.3 while maintaining support for Python 2.6 and 2.7.
xref.: https://trello.com/c/dZcCVf9I/2702-migrate-to-python-3
The list of files already fixed is in
.ci/py3_sources.txt
Useful tools and documentation:
https://docs.python.org/3/howto/pyporting.html
https://docs.python.org/2/library/2to3.html
https://python-modernize.readthedocs.org/
https://pythonhosted.org/six/
http://python3porting.com/preparing.html
Requirements which need to be ported or dropped:
xref: galaxyproject#1715
The text was updated successfully, but these errors were encountered: