Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 73b4a7a

Browse files
committed
Merged fixes for two bad bugs. This will be the new Python 3.5.0rc1.
2 parents cdab6f3 + 4a3d96c commit 73b4a7a

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.hgtags

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,3 @@ b4cbecbc0781e89a309d03b60a1f75f8499250e6 v3.4.3
152152
7a088af5615bf04024e9912068f4bd8f43ed3917 v3.5.0b2
153153
0035fcd9b9243ae52c2e830204fd9c1f7d528534 v3.5.0b3
154154
c0d64105463581f85d0e368e8d6e59b7fd8f12b1 v3.5.0b4
155-
01a684180b19a32a8e85566d43f3b62966ad0a30 v3.5.0rc1

Lib/idlelib/configHandler.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import sys
2323

2424
from configparser import ConfigParser
25+
from tkinter import TkVersion
2526
from tkinter.font import Font, nametofont
2627

2728
class InvalidConfigType(Exception): pass
@@ -688,13 +689,16 @@ def GetFont(self, root, configType, section):
688689
bold = self.GetOption(configType, section, 'font-bold', default=0,
689690
type='bool')
690691
if (family == 'TkFixedFont'):
691-
f = Font(name='TkFixedFont', exists=True, root=root)
692-
actualFont = Font.actual(f)
693-
family = actualFont['family']
694-
size = actualFont['size']
695-
if size < 0:
696-
size = 10 # if font in pixels, ignore actual size
697-
bold = actualFont['weight']=='bold'
692+
if TkVersion < 8.5:
693+
family = 'Courier'
694+
else:
695+
f = Font(name='TkFixedFont', exists=True, root=root)
696+
actualFont = Font.actual(f)
697+
family = actualFont['family']
698+
size = actualFont['size']
699+
if size < 0:
700+
size = 10 # if font in pixels, ignore actual size
701+
bold = actualFont['weight']=='bold'
698702
return (family, size, 'bold' if bold else 'normal')
699703

700704
def LoadCfgFiles(self):

Lib/test/test_asyncio/test_subprocess.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,11 @@ def kill_running():
417417
def test_popen_error(self):
418418
# Issue #24763: check that the subprocess transport is closed
419419
# when BaseSubprocessTransport fails
420-
with mock.patch('subprocess.Popen') as popen:
420+
if sys.platform == 'win32':
421+
target = 'asyncio.windows_utils.Popen'
422+
else:
423+
target = 'subprocess.Popen'
424+
with mock.patch(target) as popen:
421425
exc = ZeroDivisionError
422426
popen.side_effect = exc
423427

0 commit comments

Comments
 (0)