mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch.
If buildbots run before next push, test_logging will (temporarily) fail.
This commit is contained in:
		
							parent
							
								
									e2563462fc
								
							
						
					
					
						commit
						912bad7cd7
					
				
					 2 changed files with 3 additions and 6 deletions
				
			
		|  | @ -61,6 +61,7 @@ def idle_showwarning(message, category, filename, lineno, | ||||||
|                                               lineno, line=line)) |                                               lineno, line=line)) | ||||||
|         except OSError: |         except OSError: | ||||||
|             pass  ## file (probably __stderr__) is invalid, warning dropped. |             pass  ## file (probably __stderr__) is invalid, warning dropped. | ||||||
|  |     warnings.showwarning = idle_showwarning | ||||||
|     def idle_formatwarning(message, category, filename, lineno, line=None): |     def idle_formatwarning(message, category, filename, lineno, line=None): | ||||||
|         """Format warnings the IDLE way""" |         """Format warnings the IDLE way""" | ||||||
|         s = "\nWarning (from warnings module):\n" |         s = "\nWarning (from warnings module):\n" | ||||||
|  | @ -72,6 +73,7 @@ def idle_formatwarning(message, category, filename, lineno, line=None): | ||||||
|             s += "    %s\n" % line |             s += "    %s\n" % line | ||||||
|         s += "%s: %s\n>>> " % (category.__name__, message) |         s += "%s: %s\n>>> " % (category.__name__, message) | ||||||
|         return s |         return s | ||||||
|  |     warnings.formatwarning = idle_formatwarning | ||||||
| 
 | 
 | ||||||
| def extended_linecache_checkcache(filename=None, | def extended_linecache_checkcache(filename=None, | ||||||
|                                   orig_checkcache=linecache.checkcache): |                                   orig_checkcache=linecache.checkcache): | ||||||
|  | @ -1423,9 +1425,6 @@ def close(self): | ||||||
| def main(): | def main(): | ||||||
|     global flist, root, use_subprocess |     global flist, root, use_subprocess | ||||||
| 
 | 
 | ||||||
|     warnings.showwarning = idle_showwarning |  | ||||||
|     warnings.formatwarning = idle_formatwarning |  | ||||||
| 
 |  | ||||||
|     use_subprocess = True |     use_subprocess = True | ||||||
|     enable_shell = False |     enable_shell = False | ||||||
|     enable_edit = False |     enable_edit = False | ||||||
|  |  | ||||||
|  | @ -40,6 +40,7 @@ def idle_formatwarning_subproc(message, category, filename, lineno, | ||||||
|             s += "    %s\n" % line |             s += "    %s\n" % line | ||||||
|         s += "%s: %s\n" % (category.__name__, message) |         s += "%s: %s\n" % (category.__name__, message) | ||||||
|         return s |         return s | ||||||
|  |     warnings.formatwarning = idle_formatwarning_subproc | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| tcl = tkinter.Tcl() | tcl = tkinter.Tcl() | ||||||
|  | @ -81,9 +82,6 @@ def main(del_exitfunc=False): | ||||||
|     global exit_now |     global exit_now | ||||||
|     global quitting |     global quitting | ||||||
|     global no_exitfunc |     global no_exitfunc | ||||||
| 
 |  | ||||||
|     warnings.formatwarning = idle_formatwarning_subproc |  | ||||||
| 
 |  | ||||||
|     no_exitfunc = del_exitfunc |     no_exitfunc = del_exitfunc | ||||||
|     #time.sleep(15) # test subprocess not responding |     #time.sleep(15) # test subprocess not responding | ||||||
|     try: |     try: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Terry Jan Reedy
						Terry Jan Reedy