[Twisted-Python] twisted.python.dist as a public API

Glyph Lefkowitz glyph at twistedmatrix.com
Sat Aug 6 17:50:13 MDT 2016


> On Aug 6, 2016, at 16:31, Adi Roiban <adi at roiban.ro> wrote:
> 
> Hi,
> 
> Why is twisted.python.dist3.py <http://twisted.python.dist3.py/> a public module?

Negligence on the part of a code reviewer :).

> Are there any external projects which need to get the list of the modules ported to Python3?

No.  This info should be private.

> Why is twisted.python.dist a public module?

Similarly; this code was just accidentally made public without much thought.  This is why twisted.python._release exists, and contains much more code; 

> The docstring starts with `Don't use this outside of Twisted.'  but why not named it twisted.python._dist or twisted.python._setup to make it clear that it is private ?

Again; just a mistake.

> I am trying to clean up the setup.py code as I feel that having the setup() definition split between setup.py and dist.py is not ideal

The purpose of putting stuff in dist.py was just to be able to unit test it.  If you have some alternate strategy for testing, that might be better.

> Can I rename twisted.python.dist and remove unused code from twisted.python.dist without a deprecation dance?

You always have to follow the compatibility process - if it's not a security bug, we would have to change the process first :-).  But if you want to follow the exception path rather than the deprecation path (this message doesn't qualify, because the subject is incorrectly formatted) I certainly don't have any objection.

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20160806/f3a1569e/attachment-0002.html>


More information about the Twisted-Python mailing list