Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 501aeff

Browse files
Merged revisions 80178 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r80178 | ronald.oussoren | 2010-04-18 15:47:49 +0200 (Sun, 18 Apr 2010) | 2 lines Fix for issue #7072 ........
1 parent d61deca commit 501aeff

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

Include/pyport.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,16 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
625625
#ifdef __FreeBSD__
626626
#include <osreldate.h>
627627
#if __FreeBSD_version > 500039
628+
# define _PY_PORT_CTYPE_UTF8_ISSUE
629+
#endif
630+
#endif
631+
632+
633+
#if defined(__APPLE__)
634+
# define _PY_PORT_CTYPE_UTF8_ISSUE
635+
#endif
636+
637+
#ifdef _PY_PORT_CTYPE_UTF8_ISSUE
628638
#include <ctype.h>
629639
#include <wctype.h>
630640
#undef isalnum
@@ -642,7 +652,6 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
642652
#undef toupper
643653
#define toupper(c) towupper(btowc(c))
644654
#endif
645-
#endif
646655

647656

648657
/* Declarations for symbol visibility.

Lib/test/test_locale.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88

99
def get_enUS_locale():
1010
global enUS_locale
11-
if sys.platform.startswith("win"):
11+
if sys.platform == 'darwin':
12+
import os
13+
tlocs = ("en_US.UTF-8", "en_US.ISO8859-1", "en_US")
14+
if int(os.uname()[2].split('.')[0]) < 10:
15+
# The locale test work fine on OSX 10.6, I (ronaldoussoren)
16+
# haven't had time yet to verify if tests work on OSX 10.5
17+
# (10.4 is known to be bad)
18+
raise unittest.SkipTest("Locale support on MacOSX is minimal")
19+
elif sys.platform.startswith("win"):
1220
tlocs = ("En", "English")
1321
else:
1422
tlocs = ("en_US.UTF-8", "en_US.ISO8859-1", "en_US.US-ASCII", "en_US")

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ Core and Builtins
261261

262262
- Code objects now support weak references.
263263

264+
- Issue #7072: isspace(0xa0) is true on Mac OS X
265+
266+
264267
C-API
265268
-----
266269

0 commit comments

Comments
 (0)