[Python-3000] PEP 3108 - stdlib reorg/cleanup

Brett Cannon brett at python.org
Tue Apr 29 23:04:57 CEST 2008


On Tue, Apr 29, 2008 at 7:39 AM, Quentin Gallet-Gilles
<qgallet at gmail.com> wrote:
>
>
>
> On Tue, Apr 29, 2008 at 5:43 PM, <mkieverpy at tlink.de> wrote:
> > Hi list,
> >
> > I'm a long time lurker with only a very few contributions
> > in Tkinter. Just one remark about the inclusion of Canvas
> > in the tkinter package:
> > Canvas is marked as obsolete since 2000.
> > See this issue (and the comment at the top of Canvas.py):
> >  http://bugs.python.org/issue210677
> >
> > Cheers,
> > Matthias Kievernagel.
> > (mkiever/at/web/dot/de)
>
> Indeed. I remember mentioning it back in December 2007, along with a
> question about the deprecated status of Tkdnd. With the stdlib-sig list
> creation, I guess the discussion was lost and I totally forgot to mention it
> again when the discussion about modules deletions occurred. Sorry Brett.
>

No need to apologize. Sorry for missing your initial email!

I have only seriously used Tkinter once, so I am not in a good
position to judge any of this. What do people think about the
suggestions?


> Quentin
>
>
> As a reminder, here's an abstract from the mail back then :
> """Apart from the awfully inconsistent naming convention, there are a few
> things that are worth considering for the reorg:
>
> 1. FixTk is only called by Tkinter and has no API to expose since it's only
> a win32 specific piece of code to manage the _tkinter import. It should be
> renamed _fixtk/_tkfix or merged into Tkinter.py
>

Already suggested to be hidden.

> 2. Tkconstants is used in several places :
>  - Tkinter.py does a simple "from Tkconstants import *"
>  - Tix doesn't import it and its documentation shows an example with "import
> Tkinter" followed by "from Tkconstants import *". And sure enough, DirList
> and DirTree (from Demo/tix/samples/) both do that.
>  - Finally, CodeContext (Lib/idlelib) imports a few constants manually
>
> IMO Tkconstants could be renamed _tkconstants and all imports besides the
> first one changed to access the constants via Tkinter.
>

What do people think about this?

> 3. Canvas contains a comment saying it's obsolete and that Tkinter.Canvas
> should be used instead. I've gone ahead and added it in the "Possible
> Deletions" tab.
>

Dealt with.

> 4. All those *Dialog modules seems an obvious candidate for
> merging/deleting/rewriting
>  /whatever but I have no idea which one should go or stay. Doing some quick
> greps, it appears the pynche tool uses the tk-prefixed versions, IDLE a
> combination of the two (see IOBinding.py that uses tkFileDialog,
> tkMessageBox but also SimpleDialog). I haven't seen much love for the
> non-prefixed versions, by the way.
>

Don't know about this.

> 5. About Tkdnd, Tkinter documentation says: "This is experimental and should
> become deprecated when it is replaced with the Tk DND". What's the status on
> this one ? """

Don't know about this one either. Thoughts?

-Brett


More information about the Python-3000 mailing list