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.
Created on 2011年02月01日 11:02 by ned.deily, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue-11088.patch | ronaldoussoren, 2011年03月15日 21:27 | review | ||
| issue11088-py27.txt | ronaldoussoren, 2011年03月16日 19:24 | |||
| Messages (14) | |||
|---|---|---|---|
| msg127691 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2011年02月01日 11:02 | |
As reported by Alex McNerney in Issue11075 msg127687: "... running Python 2.7.1:88286 (maintenance) [built from source] on ActiveState Tcl/Tk 8.5.9 causes the idle to hang when a simple script like: " x = raw_input("x: ") print x " is run. Is this a bug in Tcl/Tk? Looking in the logs I see several instances of "setCanCycle: is deprecated. Please use setCollectionBehavior instead" Does this have any relevancy?" I can reproduce the problem using input with Cocoa Tk 8.5 and Python 3.2rc2 or raw_input with Python 2.7.1+. It does not seem to happen with Carbon Tk 8.4. This may be related to Issue10940. Investigating further for impact on 3.2. |
|||
| msg131002 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年03月15日 17:49 | |
This does seem to be gone in 3.2 with a up-to-date Tk 8.5 from ActiveState. |
|||
| msg131009 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2011年03月15日 17:57 | |
I can still reproduce it in 3.2 with A/S Tk 8.5. The script needs to be run from a separate editor window, not the PyShell window. |
|||
| msg131010 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年03月15日 18:04 | |
On 15 Mar, 2011, at 13:57, Ned Deily wrote: > > Ned Deily <nad@acm.org> added the comment: > > I can still reproduce it in 3.2 with A/S Tk 8.5. The script needs to be run from a separate editor window, not the PyShell window. That's odd. What I did: * Create a new file (script.py) with the following two lines: x = input('prompt: ') print(x) * Save the script * Run the script using the menu All of this using an activestate Tcl/Tk that I downloaded earlier today. |
|||
| msg131013 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2011年03月15日 18:14 | |
Sorry, forgot one crucial step: you have to use the keyboard accelerator (F5) to run the script, not the mouse and the menu. It seems like a number of the problems out there with Cocoa Tk 8.5 have to do with using the keyboard accelerators. |
|||
| msg131035 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年03月15日 20:31 | |
This isn't strictly a key-bindings problem, other events also cause problems.
I've patched ScriptBinding.py and repacled run_module_event that causes the original, now renamed, method to be called a little why later. This change doesn't fix the issue but makes it even worse: even the menu no longer works.
def run_module_event(self, event):
self.editwin.text_frame.after('idle', self._run_module_event, None)
return 'break'
def _run_module_event(self, event):
"""Run the module after setting up the environment.
I'm getting more and more disappointed in the way Tk on OSX is moving forward.
|
|||
| msg131037 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年03月15日 20:51 | |
Got it to work by introducing both a delayed call and a generated event, just one of those isn't good enough. The attached patch seems to fix the issue for me (patch was created using diff(1), not through mercurial). I haven't tested this on anything else than IDLE 3.2 on OSX 10.6 with Tk 8.5.9 from ActiveState. If this gets committed I'd at the very least use this workaround only for Tk-Cocoa on OSX, and use the current code path on other platforms. That gives more code, but makes it clear than something special is being done for one specific platform. |
|||
| msg131040 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年03月15日 21:27 | |
Added an updated version of the patch: * Only perform the workaround in IDLE.app on OSX * A slightly longer timeout is needed to work reliably on my machine The latter bullet indicates that this is probably not a reliable fix, there is a timeing issue. |
|||
| msg131158 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年03月16日 19:24 | |
The same fix also works with 2.7. The attached patch is basically the same patch, but the special casing for OSX is impacts other platforms even less than before. |
|||
| msg131232 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2011年03月17日 07:17 | |
I don't have any better suggestions at the moment so let's go with it. Perhaps we'll get more insight to the root cause later. |
|||
| msg136153 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年05月17日 12:49 | |
New changeset 1c6823317a06 by Ronald Oussoren in branch '3.2': Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5 http://hg.python.org/cpython/rev/1c6823317a06 |
|||
| msg136155 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年05月17日 12:52 | |
New changeset 85aa02bc674c by Ronald Oussoren in branch 'default': Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5 http://hg.python.org/cpython/rev/85aa02bc674c |
|||
| msg136156 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年05月17日 13:13 | |
New changeset 578020fe2875 by Ronald Oussoren in branch '2.7': (backport) Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5 http://hg.python.org/cpython/rev/578020fe2875 |
|||
| msg136157 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2011年05月17日 13:14 | |
I don't really like this patch, but like crashes that cause data loss even less... |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:12 | admin | set | github: 55297 |
| 2011年05月17日 13:14:46 | ronaldoussoren | set | status: open -> closed resolution: fixed messages: + msg136157 stage: resolved |
| 2011年05月17日 13:13:56 | python-dev | set | messages: + msg136156 |
| 2011年05月17日 12:52:48 | python-dev | set | messages: + msg136155 |
| 2011年05月17日 12:49:51 | python-dev | set | nosy:
+ python-dev messages: + msg136153 |
| 2011年04月16日 06:26:15 | ned.deily | link | issue11853 superseder |
| 2011年03月17日 07:17:52 | ned.deily | set | nosy:
ronaldoussoren, ned.deily, amcnerney13 messages: + msg131232 |
| 2011年03月16日 19:24:33 | ronaldoussoren | set | files:
+ issue11088-py27.txt nosy: ronaldoussoren, ned.deily, amcnerney13 messages: + msg131158 |
| 2011年03月15日 21:27:19 | ronaldoussoren | set | files:
+ issue-11088.patch nosy: ronaldoussoren, ned.deily, amcnerney13 messages: + msg131040 |
| 2011年03月15日 21:25:30 | ronaldoussoren | set | files:
- issue-11088.patch nosy: ronaldoussoren, ned.deily, amcnerney13 |
| 2011年03月15日 20:51:17 | ronaldoussoren | set | files:
+ issue-11088.patch messages: + msg131037 keywords: + patch nosy: ronaldoussoren, ned.deily, amcnerney13 |
| 2011年03月15日 20:31:23 | ronaldoussoren | set | nosy:
ronaldoussoren, ned.deily, amcnerney13 messages: + msg131035 |
| 2011年03月15日 18:14:05 | ned.deily | set | nosy:
ronaldoussoren, ned.deily, amcnerney13 messages: + msg131013 |
| 2011年03月15日 18:04:16 | ronaldoussoren | set | nosy:
ronaldoussoren, ned.deily, amcnerney13 messages: + msg131010 |
| 2011年03月15日 17:57:47 | ned.deily | set | nosy:
ronaldoussoren, ned.deily, amcnerney13 messages: + msg131009 |
| 2011年03月15日 17:49:43 | ronaldoussoren | set | nosy:
+ ronaldoussoren messages: + msg131002 |
| 2011年02月01日 11:02:47 | ned.deily | create | |