This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Moving lib-tk to tkinter package
Type: Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, brett.cannon, georg.brandl, gpolo
Priority: release blocker Keywords: patch

Created on 2008-05-12 18:00 by gpolo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit gpolo, 2008-05-12 20:44 creates tkinter package with renamed lib-tk files
tkinter_imports.diff gpolo, 2008-05-12 20:44 fix imports inside new tkinter package
tkinter_step2.diff gpolo, 2008-05-16 15:44
tkinter_doc_updates.diff gpolo, 2008-05-16 16:48 tkinter doc updates patch gpolo, 2008-05-16 16:49
remove_libtk_path.diff gpolo, 2008-05-16 17:17
tkinter_modmerge.diff gpolo, 2008-05-17 15:03
tkinter_modmerge_py3k.diff gpolo, 2008-05-17 19:01
Messages (12)
msg66747 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-12 18:00
I'm moving lib-tk to a tkinter package, I've sent a patch for this which
can be found at issue 2775 but I started wrong (did a patch against py3k
msg66756 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-12 20:43
I've talked with Brett and we agreed on a plan slightly different from
the one described in PEP 3108, which seems to be better for tkinter.

The first step would be creating a tkinter package and then moving each
file in lib-tk to this new directory, correcting imports and the case
and renaming to so the directory is marked as a

After this step I can proceed with more patches, including stub modules,
tests in test_py3kwarn and continue with the rest of the plan.

I'm attaching two files I've used to do this first step. One is a .py
file, which will do the proper renamings and then there is a patch which
should be applied to fix imports inside the tkinter package.
msg66951 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-16 15:44
New patch, this one does the following:

* Fix tkinter imports in idlelib, pydoc and Canvas (deprecated)
* Creates stub modules for all old Tkinter modules, except tkFileDialog
and tkSimpleDialog
* Updates test_py3kwarn for all these renames

What is missing now:

* Merging tkSimpleDialog into tkinter.simpledialog and tkFileDialog into
tkinter.filedialog, I believe this should be done using svn merge and
then correct the result a bit.
* Update docs
msg66952 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-16 15:48
Committed step 2 patch as r63376.
msg66955 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-16 16:48
Patching for updating the docs added.

I've also added a script that should be executed after the patch is
applied, it will rename scrolledtext.rst to tkinter.scrolledtext.rst;
tix.rst to tkinter.rst and turtle.rst to tkinter.turtle.rst.
msg66957 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-16 17:17
After merging all these changes in py3k, lib-tk should be removed from
sys.path there. Patch added for this.

Note that the iss script at PC/VS7.1 should be regenerated
msg66999 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-17 15:03
This new patch handles the merging of tkSimpleDialog into
tkinter.simpledialog and tkFileDialog into

After doing it, the old files may be removed from lib-tk:
svn del Lib/lib-tk/
svn del Lib/lib-tk/

I will do the stub modules for these modules after the commit then, thanks.
msg67000 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-17 15:07
Committed modmerge patch in r63408.
msg67010 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-17 19:01
Patch added for handling the merging of tkSimpleDialog into
tkinter.simpledialog and tkFileDialog into tkinter.filedialog, specific
for py3k.
msg67012 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-17 19:20
Handled Py3k branch in revs 63417 to 63423. Closing this issue.
msg67099 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-05-20 04:38
The changes in 2.6 need to be reverted, leaving only a note in the docs.
msg67109 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-20 07:27
Done in r63485-63491.
Date User Action Args
2022-04-11 14:56:34adminsetnosy: + barry
github: 47088
2008-05-20 18:47:49brett.cannonunlinkissue2775 dependencies
2008-05-20 07:27:21georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg67109
2008-05-20 04:39:04brett.cannonlinkissue2775 dependencies
2008-05-20 04:38:47brett.cannonsetstatus: closed -> open
nosy: + brett.cannon
resolution: accepted -> (no value)
messages: + msg67099
2008-05-18 17:59:39brett.cannonunlinkissue2775 dependencies
2008-05-17 19:20:20georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg67012
2008-05-17 19:01:22gpolosetfiles: + tkinter_modmerge_py3k.diff
messages: + msg67010
2008-05-17 15:07:48georg.brandlsetmessages: + msg67000
2008-05-17 15:03:47gpolosetfiles: + tkinter_modmerge.diff
messages: + msg66999
2008-05-16 17:38:33georg.brandllinkissue2884 superseder
2008-05-16 17:17:04gpolosetfiles: + remove_libtk_path.diff
messages: + msg66957
2008-05-16 16:49:09gpolosetfiles: +
2008-05-16 16:48:43gpolosetfiles: + tkinter_doc_updates.diff
messages: + msg66955
2008-05-16 15:48:48georg.brandlsetnosy: + georg.brandl
messages: + msg66952
2008-05-16 15:44:45gpolosetfiles: + tkinter_step2.diff
messages: + msg66951
2008-05-16 04:39:03brett.cannonsetpriority: release blocker
2008-05-12 20:44:42gpolosetfiles: + tkinter_imports.diff
keywords: + patch
2008-05-12 20:44:05gpolosetfiles: +
messages: + msg66756
2008-05-12 18:01:08gpololinkissue2775 dependencies
2008-05-12 18:00:38gpolocreate