Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: remove unused code #71343

Closed
terryjreedy opened this issue May 29, 2016 · 6 comments
Closed

IDLE: remove unused code #71343

terryjreedy opened this issue May 29, 2016 · 6 comments
Assignees
Labels
performance Performance or resource usage topic-IDLE

Comments

@terryjreedy
Copy link
Member

BPO 27156
Nosy @terryjreedy, @ned-deily

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:

assignee = 'https://github.com/terryjreedy'
closed_at = <Date 2016-06-06.01:36:49.282>
created_at = <Date 2016-05-29.20:21:44.882>
labels = ['expert-IDLE', 'performance']
title = 'IDLE: remove unused code'
updated_at = <Date 2016-06-06.01:36:49.241>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2016-06-06.01:36:49.241>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2016-06-06.01:36:49.282>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2016-05-29.20:21:44.882>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 27156
keywords = []
message_count = 6.0
messages = ['266629', '266678', '267366', '267439', '267499', '267500']
nosy_count = 2.0
nosy_names = ['terry.reedy', 'ned.deily']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'resource usage'
url = 'https://bugs.python.org/issue27156'
versions = ['Python 3.6']

@terryjreedy
Copy link
Member Author

With 3.6 not bound by compatibility with external imports, dead code can go. It is an annoying distraction. The resource saved is space in package and module content listings and maintainer time and attention.

  1. module idlever.py. It is obsolete at least since 2.6 and deprecated in 2.7.11 and 3.4.4+ in bpo-24199. If IDLE is ever separately versioned again, idlever should be an attribute in idlelib.__init__.

  2. file help.txt and its dedicated viewer editor.HelpDialog. help.txt is out-of-date and not maintained, as it was replaced years ago by Docs/library/idle.rst. Since Fall 2015, IDLE uses help.py to display help.html with formatting and index. See bpo-16893.

  3. stackviewer.StackBrowser.keys. I removed this trivial and no-longer used method in bpo-24790, and then restored it in the face of an objection and the lack of overt criteria for such removals. I expect the class to get far more drastic changes than this.

Note: 'unused' is determined by grepping the name in consideration in .../idlelib/*.py, where ... == <repository path>/Lib. IDLE => Edit => Find in Files, Alt-F3.

@terryjreedy terryjreedy self-assigned this May 29, 2016
@terryjreedy terryjreedy added the performance Performance or resource usage label May 29, 2016
@python-dev
Copy link
Mannequin

python-dev mannequin commented May 30, 2016

New changeset 0945b9729734 by Terry Jan Reedy in branch 'default':
Issue bpo-27156: Remove obsolete code not used by IDLE.
https://hg.python.org/cpython/rev/0945b9729734

@terryjreedy
Copy link
Member Author

Patch removed 1 & 2.

  1. macosx.runningAsOSXApp and macosx.isCarbonAquaTk were deprecated in then current versions on 2014 Feb 27 by New Deily in bpo-17654. In particular, 67a7a49e7b78 was applied to the future 3.4.1. Ned, do you have any objection to removing these now, for 3.6?

I checked the usage of isXyz functions outside the definitions and deprecated functions. isAquaTk: 8, isCarbonTk: 2, isCocoaTk: 5, isXQuartz: 0. I gather from www.python.org/download/mac/tcltk/ that Carbon might still be in use on machines with early 8.5 and that XQuartz is still in use and might be needed in the future. Also, since exactly 1 of 'Aqua' and 'XQuartz' are true on current machines running 8.5+, they are currently reduncant, but this could change in the future. So I don't propose any deletion for this group.

@ned-deily
Copy link
Member

Ned, do you have any objection to removing these now, for 3.6?

No, go right ahead. Nobody should be using them. And I concur with keeping the others around for the time being.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Jun 6, 2016

New changeset 166784c40be8 by Terry Jan Reedy in branch 'default':
Issue bpo-27156: Remove more unused idlelib code.
https://hg.python.org/cpython/rev/166784c40be8

@terryjreedy
Copy link
Member Author

3 and 4 removed. Closing at least until I find something else that is not part of a refactoring but needs at least a question answered.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage topic-IDLE
Projects
None yet
Development

No branches or pull requests

2 participants