python / cpython

The Python programming language
https://www.python.org
Other
62.34k stars 29.94k forks source link

Moving lib-tk to tkinter package #47088

Closed 1fecb825-97ee-46b6-913c-bb07e2a288a6 closed 16 years ago

1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago
BPO 2839
Nosy @brettcannon, @birkenfeld
Files
  • tkinter_package.py: creates tkinter package with renamed lib-tk files
  • tkinter_imports.diff: fix imports inside new tkinter package
  • tkinter_step2.diff
  • tkinter_doc_updates.diff: tkinter doc updates patch
  • rename_tkdocs.py
  • remove_libtk_path.diff
  • tkinter_modmerge.diff
  • tkinter_modmerge_py3k.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['library', 'release-blocker'] title = 'Moving lib-tk to tkinter package' updated_at = user = 'https://bugs.python.org/gpolo' ``` bugs.python.org fields: ```python activity = actor = 'georg.brandl' assignee = 'none' closed = True closed_date = closer = 'georg.brandl' components = ['Library (Lib)'] creation = creator = 'gpolo' dependencies = [] files = ['10309', '10310', '10346', '10348', '10349', '10350', '10354', '10358'] hgrepos = [] issue_num = 2839 keywords = ['patch'] message_count = 12.0 messages = ['66747', '66756', '66951', '66952', '66955', '66957', '66999', '67000', '67010', '67012', '67099', '67109'] nosy_count = 3.0 nosy_names = ['brett.cannon', 'georg.brandl', 'gpolo'] pr_nums = [] priority = 'release blocker' resolution = 'fixed' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue2839' versions = ['Python 2.6', 'Python 3.0'] ```

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    I'm moving lib-tk to a tkinter package, I've sent a patch for this which can be found at bpo-2775 but I started wrong (did a patch against py3k directly).

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    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 Tkinter.py to __init__.py so the directory is marked as a package.

    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.

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    New patch, this one does the following:

    What is missing now:

    birkenfeld commented 16 years ago

    Committed step 2 patch as r63376.

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    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.

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    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

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    This new patch handles the merging of tkSimpleDialog into tkinter.simpledialog and tkFileDialog into tkinter.filedialog.

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

    I will do the stub modules for these modules after the commit then, thanks.

    birkenfeld commented 16 years ago

    Committed modmerge patch in r63408.

    1fecb825-97ee-46b6-913c-bb07e2a288a6 commented 16 years ago

    Patch added for handling the merging of tkSimpleDialog into tkinter.simpledialog and tkFileDialog into tkinter.filedialog, specific for py3k.

    birkenfeld commented 16 years ago

    Handled Py3k branch in revs 63417 to 63423. Closing this issue.

    brettcannon commented 16 years ago

    The changes in 2.6 need to be reverted, leaving only a note in the docs.

    birkenfeld commented 16 years ago

    Done in r63485-63491.