Babel as a library has a long history that goes back to the Trac project. Since then it has evolved into an independently developed project that implements data access for the CLDR project.
This document tries to explain as best as possible the general rules of the project in case you want to help out developing.
Generally the goal of the project is to work as closely as possible with the CLDR data. This has in the past caused some frustrating problems because the data is entirely out of our hand. To minimize the frustration we generally deal with CLDR updates the following way:
At the moment the following Python versions should be supported:
While PyPy does not currently support 3.3, it does support traditional unicode literals which simplifies the entire situation tremendously.
Documentation must build on Python 2, Python 3 support for the documentation is an optional goal. Code examples in the docs preferably are written in a style that makes them work on both 2.x and 3.x with preference to the former.
Unicode is a big deal in Babel. Here is how the rules are set up:
unicode_literals
, instead use the u''
string
syntax. The reason for this is that the former introduces countless
of unicode problems by accidentally upgrading strings to unicode which
should not be. (docstrings for instance).Generally all timezone support in Babel is based on pytz which it just depends on. Babel should assume that timezone objects are pytz based because those are the only ones with an API that actually work correctly (due to the API problems with non UTC based timezones).
Assumptions to make: