mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

Support for Python 3 while maintaining support for Python 2. Minor formatting improvements. #240

Closed owski closed 4 years ago

owski commented 4 years ago

Implement support for Python 3 for users who may be running this script on systems that do not support Python 2. This should maintain backwards compatibility as well which is validated by using a containerized environment:

Python 3:

docker run -it --rm -v "$PWD:/usr/src/app:Z" python:3 bash -c "pip install pyfxa; python /usr/src/app/bin/delete_user_data.py <email>"

Password for <email>: 
Enter TOTP code: <totp_code>
Deleting from <api_endpoint>
<Response [200]>

Python 2:

docker run -it --rm -v "$PWD:/usr/src/app:Z" python:2 bash -c "pip install pyfxa; python /usr/src/app/bin/delete_user_data.py <email>"

Password for <email>: 
Enter TOTP code: <totp_code>
Deleting from <api_endpoint>
<Response [200]>