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
Add a build script for Python 2.7.12 with UCS-4 Unicode support #322
Conversation
Tested building with
...which is UCS-4 mode (see here). For comparison, this is a cedar-14 dyno's system Python vs the buildpack's current Python:
|
I have concerns about this regarding wheels — they are complex, but speaking with @dstufft gave me some great insight into the behavior and availability of wheels of both types within the community. |
A few points to note about this:
Given it won't break anyone else, could we just merge this and give it a go? :-) |
Yes, this is the information I collected. There are a few subtleties. As for the suffix, there are a few others available that use this mechanism (e.g. I am thinking about it. |
How will having these specific builds available for you, today, help you? I have no intention of releasing one of each ongoing in the future. This would be a one-time thing. |
I absolutely agree - we shouldn't release one of each for future Python versions - UCS-4 should be the default long term. I explained the reasoning in the OP, but perhaps some more context would help. Reasons for making UCS-4 the default:
Ways to do this:
Option (1) would mean us having to wait until December 2016 for the Python 2.7.13 release (schedule) or else fork the buildpack, build a custom Python 2.7.12 UCS-4 release and upload to our own S3 bucket, which in reality is too much of a hassle (politics with getting S3 bucket access etc). We could of course build Python during initial compile, however that still means forking the buildpack and longer initial build times in case of clearing the cache etc. Option (2) seemed less likely to be merged/accepted, due to possible risk of changing existing pinned Python runtimes. (Though I guess people would only redownload the new UCS4 archive if their build cache were cleared, so existing users would mostly be unaware?) Which is why I went with (3), however I'm also open to (2) :-) |
@kennethreitz any thoughts on the last comment? :-) |
This PR doesn't appear to work, at the moment. setting runtime.txt to python-2.7.12-ucs4, and the buildback to 'https://github.com/edmorley/heroku-buildpack-python.git#python2.7.12-ucs4', the build process fails with
https://github.com/edmorley/heroku-buildpack-python/blob/python2.7.12-ucs4/bin/steps/python#L31 seems to be the issue. |
After this PR is merged, a new python archive has to be created using the script, and uploaded to S3 - so it's expected it won't work as-is. @kennethreitz, any news on my replies to your questions above? Many thanks! |
UCS-4 will be added in 2.7.13 |
@kennethreitz any timeline when 2.7.13 based buildpack with UCS-4 will be released? |
https://www.python.org/dev/peps/pep-0373/#maintenance-releases says that Python 2.7.13 is due to be released in December 2016. |
* Switches to the canonical source tarball URL, to avoid the redirect * Avoids the repetition of the version number & outputs it to console * Whitespace cleanup
Unlike the previous Heroku Python 2.7.x builds, this one enables the UCS-4 unicode mode (instead of using UCS-2, which was the default until Python 3.3 when PEP393 landed), for parity with Ubuntu system Python. Fixes #305.
@kennethreitz many thanks :-) PR updated to use 2.7.13, ready for December. |
haha, excellent |
Can't wait! ✨🍰✨ |
Thanks for your due-diligence on this. I think this will be a bit improvement for the platform (mostly for wheels, but also for "astral-plane" unicode support). |
this should be released over the weekend — 2.7.13 is already released |
released! |
the latest python, |
1) Clean up the latest Python 2.7 and 3.5 build scripts:
2) Add a build script for Python 2.7.13 with UCS-4 Unicode support:
The default Python build's unicode mode (until Python 3.3, when PEP 393 landed) is UCS-2. However Ubuntu's system Python 2.7 is compiled in UCS-4 mode. This new build script overrides the default for parity with system Python, and to avoid hard to debug unicode bugs.
Fixes #305.