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

Abandon python 2 #1398

Closed
Changaco opened this issue Jan 25, 2019 · 6 comments · Fixed by #1403
Closed

Abandon python 2 #1398

Changaco opened this issue Jan 25, 2019 · 6 comments · Fixed by #1403
Assignees
Labels
defense protecting ourselves, our users and innocent third-parties DevX making it easier to develop and maintain Liberapay

Comments

@Changaco
Copy link
Member

Python 2.7 is in its last year, it's time for Liberapay to finally make the jump to Python 3.6.

@Changaco Changaco added DevX making it easier to develop and maintain Liberapay defense protecting ourselves, our users and innocent third-parties labels Jan 25, 2019
@Changaco Changaco self-assigned this Jan 25, 2019
@Changaco
Copy link
Member Author

This StackOverflow answer suggests that it might be as simple as running this single command: aws elasticbeanstalk update-environment --solution-stack-name "64bit Amazon Linux 2018.03 v2.8.0 running Python 3.6" --environment-name "liberapay" --region "eu-west-1".

However it appears that Liberapay isn't ready for that yet because trying to run Liberapay with Python 3.6 locally fails.

This was referenced Jan 25, 2019
@Changaco
Copy link
Member Author

I'm going to attempt the switch. 🤞

@Changaco
Copy link
Member Author

The compilation of libsass failed:

Building wheel for libsass (setup.py): started
Building wheel for libsass (setup.py): finished with status 'error'
Complete output from command /opt/python/run/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-hs41kqva/libsass/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-x9n7apc6 --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying sass.py -> build/lib.linux-x86_64-3.6
copying sassc.py -> build/lib.linux-x86_64-3.6
copying sasstests.py -> build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/sassutils
copying sassutils/distutils.py -> build/lib.linux-x86_64-3.6/sassutils
copying sassutils/__init__.py -> build/lib.linux-x86_64-3.6/sassutils
copying sassutils/builder.py -> build/lib.linux-x86_64-3.6/sassutils
copying sassutils/wsgi.py -> build/lib.linux-x86_64-3.6/sassutils
running build_ext
building '_sass' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/libsass
creating build/temp.linux-x86_64-3.6/libsass/src
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I./libsass/include -I/usr/include/python3.6m -c pysass.cpp -o build/temp.linux-x86_64-3.6/pysass.o -c -O3 -fPIC -std=c++0x -Wall -Wno-parentheses -Werror=switch -DLIBSASS_VERSION="3.3.5"
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command 'gcc' failed with exit status 1

----------------------------------------
Failed building wheel for libsass
Running setup.py clean for libsass

@Changaco
Copy link
Member Author

Now it's failing on the parsing of the Japanese translations file. 😕

@Changaco
Copy link
Member Author

Liberapay is now running on Python 3.6.7 🕺

We had 25 minutes of downtime, but glancing at the logs it doesn't look like any human user was affected.

More problematic: requests containing non-ASCII chars in the path are failing completely (e.g. https://liberapay.com/%C3%A9).

@Changaco
Copy link
Member Author

Changaco commented Jan 29, 2019

I thought upgrading Pando would be enough to fix that Unicode issue, but it's not: AspenWeb/pando.py#587.

Edit: almost fixed in #1412.

Edit 2: finally fixed in #1416.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defense protecting ourselves, our users and innocent third-parties DevX making it easier to develop and maintain Liberapay
Development

Successfully merging a pull request may close this issue.

1 participant