3 ms·
Mostly when we do this, it's because there's a really useful/helpful stdlib module that wasn't standard for one of the older Python versions we support. We chec
by ubernostrum 16y ago
Mostly when we do this, it's because there's a really useful/helpful stdlib module that wasn't standard for one of the older Python versions we support. We check first to see if you have the stdlib version (or in some cases a third-party distribution of it), then fall back to our bundled copy.
In many cases we've had direct help from the maintainers of the stdlib modules in doing this, so saying that "we" backported it isn't particularly accurate.
(the big exception to all this was PyDispatcher, which we originally included verbatim, then essentially ended up forking to suit our needs, to the point where I don't think it's really the same library anymore)
We also do some similar but smaller-scale things to smooth issues in older Pythons or to enhance standard language features (for example, we monkeypatch Python 2.4's copy module, and ship our own implementation of parts of os.path to handle Unicode properly). Poke around in django/utils for the sordid history of all the stuff we've worked around in this manner.