Skip to content
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

Investigate changes necessary to move to Python 3 #88

Closed
englehardt opened this issue Sep 9, 2016 · 6 comments
Closed

Investigate changes necessary to move to Python 3 #88

englehardt opened this issue Sep 9, 2016 · 6 comments
Labels
backlog Not a priorty, but nice to have needs-investigation

Comments

@englehardt
Copy link
Collaborator

Python 2.7 is being slowly removed from the default installs of Ubuntu, we should investigate what changes are necessary to port to Python 3. I'm guessing some of our dependencies will be 2.7+ only.

@englehardt englehardt added help wanted backlog Not a priorty, but nice to have needs-investigation labels Sep 9, 2016
@gunesacar
Copy link
Contributor

gunesacar commented Nov 16, 2016

I ran 2to3 on the current master. Issues related to print, unicode, (x)rangeare the overwhelming majority, which can easily be fixed.

But I can't be sure about the other problems, such as requirements without python 3 support (e.g. pyamf, libmproxy).

You can find the patch generated by 2to3 here. Logs are given below:

RefactoringTool: Files that need to be modified:
RefactoringTool: ./demo.py
RefactoringTool: ./automation/BrowserManager.py
RefactoringTool: ./automation/CommandSequence.py
RefactoringTool: ./automation/Errors.py
RefactoringTool: ./automation/MPLogger.py
RefactoringTool: ./automation/SocketInterface.py
RefactoringTool: ./automation/TaskManager.py
RefactoringTool: ./automation/platform_utils.py
RefactoringTool: ./automation/Commands/browser_commands.py
RefactoringTool: ./automation/Commands/command_executor.py
RefactoringTool: ./automation/Commands/profile_commands.py
RefactoringTool: ./automation/Commands/utils/XPathUtil.py
RefactoringTool: ./automation/Commands/utils/domain_utils.py
RefactoringTool: ./automation/Commands/utils/file_utils.py
RefactoringTool: ./automation/Commands/utils/firefox_profile.py
RefactoringTool: ./automation/Commands/utils/lso.py
RefactoringTool: ./automation/Commands/utils/webdriver_extensions.py
RefactoringTool: ./automation/DataAggregator/DataAggregator.py
RefactoringTool: ./automation/DataAggregator/LevelDBAggregator.py
RefactoringTool: ./automation/DeployBrowsers/configure_firefox.py
RefactoringTool: ./automation/DeployBrowsers/deploy_browser.py
RefactoringTool: ./automation/DeployBrowsers/deploy_chrome.py
RefactoringTool: ./automation/DeployBrowsers/deploy_firefox.py
RefactoringTool: ./automation/PostProcessing/Cookie.py
RefactoringTool: ./automation/PostProcessing/build_cookie_table.py
RefactoringTool: ./automation/PostProcessing/post_processing.py
RefactoringTool: ./automation/Proxy/MITMProxy.py
RefactoringTool: ./automation/Proxy/deploy_mitm_proxy.py
RefactoringTool: ./automation/Proxy/mitm_commands.py
RefactoringTool: ./test/conftest.py
RefactoringTool: ./test/expected.py
RefactoringTool: ./test/manual_test.py
RefactoringTool: ./test/openwpmtest.py
RefactoringTool: ./test/test_adblock_plus.py
RefactoringTool: ./test/test_crawl.py
RefactoringTool: ./test/test_custom_function_command.py
RefactoringTool: ./test/test_env.py
RefactoringTool: ./test/test_extension.py
RefactoringTool: ./test/test_profile.py
RefactoringTool: ./test/test_simple_commands.py
RefactoringTool: ./test/test_storage_vectors.py
RefactoringTool: ./test/utilities.py
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file ./automation/PostProcessing/Cookie.py ###
RefactoringTool: Line 761: absolute and local imports together

@zackw
Copy link
Contributor

zackw commented Mar 3, 2017

FYI, I have an immediate need for this and, with the exception of mitmproxy (which I may just dike out) I am going to pound on it starting now until it's done. Expect some pull requests in the next couple days.

PyAMF, unfortunately, appears to be dead upstream; it might make sense to maintain a fork under the CITP umbrella.

@dreisman
Copy link
Contributor

dreisman commented Mar 3, 2017

mitmproxy support shouldn't be necessary anyway, the latest instrumentation is all done from the browser extension.

@zackw
Copy link
Contributor

zackw commented Mar 3, 2017 via email

@englehardt
Copy link
Collaborator Author

englehardt commented Oct 9, 2017

Python 3 support added in #152.

@zackw
Copy link
Contributor

zackw commented Oct 9, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Not a priorty, but nice to have needs-investigation
Projects
None yet
Development

No branches or pull requests

4 participants