[Python-Dev] Breaking undocumented API

Glyph Lefkowitz glyph at twistedmatrix.com
Tue Nov 9 21:36:16 CET 2010


On Nov 8, 2010, at 4:50 PM, Guido van Rossum wrote:
> On Mon, Nov 8, 2010 at 3:55 PM, Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:
>> This seems like a pretty clear case of "practicality beats purity".  Not only has nobody complained about deprecatedModuleAttribute, but there are tons of things which show up in sys.modules that aren't modules in the sense of 'instances of ModuleType'.  The Twisted reactor, for example, is an instance, and we've been doing *that* for about 10 years with no complaints.
> 
> But the Twisted universe is only a subset of the Python universe. The
> Python stdlib needs to move more carefully.

While this is true, I think the Twisted universe generally represents a particularly conservative, compatibility-conscious area within the Python universe (multiverse?).  I know of several Twisted users who regularly upgrade to the most recent version of Twisted without incident, but can't move from Python 2.4->2.5 because of compatibility issues.

That's not to say that there are no areas within the larger Python ecosystem that I'm unaware of where putting non-module-objects into sys.modules would cause issues.  But if it were a practice that were at all common, I suspect that we would have bumped into it by now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101109/2b93f15a/attachment.html>


More information about the Python-Dev mailing list