diff -r c78774c7d032 Doc/library/os.rst --- a/Doc/library/os.rst Mon Jun 13 16:33:04 2016 +0200 +++ b/Doc/library/os.rst Mon Jun 20 00:36:08 2016 -0700 @@ -57,7 +57,7 @@ The name of the operating system dependent module imported. The following names have currently been registered: ``'posix'``, ``'nt'``, - ``'ce'``, ``'java'``. + ``'java'``. .. seealso:: :attr:`sys.platform` has a finer granularity. :func:`os.uname` gives diff -r c78774c7d032 Doc/library/undoc.rst --- a/Doc/library/undoc.rst Mon Jun 13 16:33:04 2016 +0200 +++ b/Doc/library/undoc.rst Mon Jun 20 00:36:08 2016 -0700 @@ -20,7 +20,7 @@ documented beyond this mention. There's little need to document these. :mod:`ntpath` - --- Implementation of :mod:`os.path` on Win32, Win64, and WinCE platforms. + --- Implementation of :mod:`os.path` on Win32 and Win64 platforms. :mod:`posixpath` --- Implementation of :mod:`os.path` on POSIX. diff -r c78774c7d032 Lib/asyncore.py --- a/Lib/asyncore.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/asyncore.py Mon Jun 20 00:36:08 2016 -0700 @@ -333,7 +333,7 @@ self.connecting = True err = self.socket.connect_ex(address) if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \ - or err == EINVAL and os.name in ('nt', 'ce'): + or err == EINVAL and os.name == 'nt': self.addr = address return if err in (0, EISCONN): diff -r c78774c7d032 Lib/ctypes/__init__.py --- a/Lib/ctypes/__init__.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/ctypes/__init__.py Mon Jun 20 00:36:08 2016 -0700 @@ -16,7 +16,7 @@ if __version__ != _ctypes_version: raise Exception("Version number mismatch", __version__, _ctypes_version) -if _os.name in ("nt", "ce"): +if _os.name == "nt": from _ctypes import FormatError DEFAULT_MODE = RTLD_LOCAL @@ -103,12 +103,9 @@ _c_functype_cache[(restype, argtypes, flags)] = CFunctionType return CFunctionType -if _os.name in ("nt", "ce"): +if _os.name == "nt": from _ctypes import LoadLibrary as _dlopen from _ctypes import FUNCFLAG_STDCALL as _FUNCFLAG_STDCALL - if _os.name == "ce": - # 'ce' doesn't have the stdcall calling convention - _FUNCFLAG_STDCALL = _FUNCFLAG_CDECL _win_functype_cache = {} def WINFUNCTYPE(restype, *argtypes, **kw): @@ -262,7 +259,7 @@ def _reset_cache(): _pointer_type_cache.clear() _c_functype_cache.clear() - if _os.name in ("nt", "ce"): + if _os.name == "nt": _win_functype_cache.clear() # _SimpleCData.c_wchar_p_from_param POINTER(c_wchar).from_param = c_wchar_p.from_param @@ -374,7 +371,7 @@ """ _func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI -if _os.name in ("nt", "ce"): +if _os.name == "nt": class WinDLL(CDLL): """This class represents a dll exporting functions using the @@ -427,7 +424,7 @@ cdll = LibraryLoader(CDLL) pydll = LibraryLoader(PyDLL) -if _os.name in ("nt", "ce"): +if _os.name == "nt": pythonapi = PyDLL("python dll", None, _sys.dllhandle) elif _sys.platform == "cygwin": pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) @@ -435,7 +432,7 @@ pythonapi = PyDLL(None) -if _os.name in ("nt", "ce"): +if _os.name == "nt": windll = LibraryLoader(WinDLL) oledll = LibraryLoader(OleDLL) @@ -503,7 +500,7 @@ return _wstring_at(ptr, size) -if _os.name in ("nt", "ce"): # COM stuff +if _os.name == "nt": # COM stuff def DllGetClassObject(rclsid, riid, ppv): try: ccom = __import__("comtypes.server.inprocserver", globals(), locals(), ['*']) diff -r c78774c7d032 Lib/ctypes/test/test_bitfields.py --- a/Lib/ctypes/test/test_bitfields.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/ctypes/test/test_bitfields.py Mon Jun 20 00:36:08 2016 -0700 @@ -196,7 +196,7 @@ class X(Structure): _fields_ = [("a", c_byte, 4), ("b", c_int, 4)] - if os.name in ("nt", "ce"): + if os.name == "nt": self.assertEqual(sizeof(X), sizeof(c_int)*2) else: self.assertEqual(sizeof(X), sizeof(c_int)) @@ -224,7 +224,7 @@ # MSVC does NOT combine c_short and c_int into one field, GCC # does (unless GCC is run with '-mms-bitfields' which # produces code compatible with MSVC). - if os.name in ("nt", "ce"): + if os.name == "nt": self.assertEqual(sizeof(X), sizeof(c_int) * 4) else: self.assertEqual(sizeof(X), sizeof(c_int) * 2) diff -r c78774c7d032 Lib/ctypes/test/test_funcptr.py --- a/Lib/ctypes/test/test_funcptr.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/ctypes/test/test_funcptr.py Mon Jun 20 00:36:08 2016 -0700 @@ -39,7 +39,7 @@ # possible, as in C, to call cdecl functions with more parameters. #self.assertRaises(TypeError, c, 1, 2, 3) self.assertEqual(c(1, 2, 3, 4, 5, 6), 3) - if not WINFUNCTYPE is CFUNCTYPE and os.name != "ce": + if not WINFUNCTYPE is CFUNCTYPE: self.assertRaises(TypeError, s, 1, 2, 3) def test_structures(self): diff -r c78774c7d032 Lib/ctypes/test/test_loading.py --- a/Lib/ctypes/test/test_loading.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/ctypes/test/test_loading.py Mon Jun 20 00:36:08 2016 -0700 @@ -11,8 +11,6 @@ global libc_name if os.name == "nt": libc_name = find_library("c") - elif os.name == "ce": - libc_name = "coredll" elif sys.platform == "cygwin": libc_name = "cygwin1.dll" else: @@ -49,8 +47,8 @@ cdll.LoadLibrary(lib) CDLL(lib) - @unittest.skipUnless(os.name in ("nt", "ce"), - 'test specific to Windows (NT/CE)') + @unittest.skipUnless(os.name == "nt", + 'test specific to Windows') def test_load_library(self): # CRT is no longer directly loadable. See issue23606 for the # discussion about alternative approaches. @@ -64,14 +62,9 @@ windll["kernel32"].GetModuleHandleW windll.LoadLibrary("kernel32").GetModuleHandleW WinDLL("kernel32").GetModuleHandleW - elif os.name == "ce": - windll.coredll.GetModuleHandleW - windll["coredll"].GetModuleHandleW - windll.LoadLibrary("coredll").GetModuleHandleW - WinDLL("coredll").GetModuleHandleW - @unittest.skipUnless(os.name in ("nt", "ce"), - 'test specific to Windows (NT/CE)') + @unittest.skipUnless(os.name == "nt", + 'test specific to Windows') def test_load_ordinal_functions(self): import _ctypes_test dll = WinDLL(_ctypes_test.__file__) diff -r c78774c7d032 Lib/ctypes/util.py --- a/Lib/ctypes/util.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/ctypes/util.py Mon Jun 20 00:36:08 2016 -0700 @@ -66,16 +66,6 @@ return fname return None -if os.name == "ce": - # search path according to MSDN: - # - absolute path specified by filename - # - The .exe launch directory - # - the Windows directory - # - ROM dll files (where are they?) - # - OEM specified search path: HKLM\Loader\SystemPath - def find_library(name): - return name - if os.name == "posix" and sys.platform == "darwin": from ctypes.macholib.dyld import dyld_find as _dyld_find def find_library(name): diff -r c78774c7d032 Lib/ntpath.py --- a/Lib/ntpath.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/ntpath.py Mon Jun 20 00:36:08 2016 -0700 @@ -28,8 +28,6 @@ pathsep = ';' altsep = '/' defpath = '.;C:\\bin' -if 'ce' in sys.builtin_module_names: - defpath = '\\Windows' devnull = 'nul' def _get_bothseps(path): diff -r c78774c7d032 Lib/os.py --- a/Lib/os.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/os.py Mon Jun 20 00:36:08 2016 -0700 @@ -1,9 +1,9 @@ r"""OS routines for NT or Posix depending on what system we're on. This exports: - - all functions from posix, nt or ce, e.g. unlink, stat, etc. + - all functions from posix or nt, e.g. unlink, stat, etc. - os.path is either posixpath or ntpath - - os.name is either 'posix', 'nt' or 'ce'. + - os.name is either 'posix' or 'nt' - os.curdir is a string representing the current directory ('.' or ':') - os.pardir is a string representing the parent directory ('..' or '::') - os.sep is the (or a most common) pathname separator ('/' or ':' or '\\') @@ -85,27 +85,6 @@ except ImportError: pass -elif 'ce' in _names: - name = 'ce' - linesep = '\r\n' - from ce import * - try: - from ce import _exit - __all__.append('_exit') - except ImportError: - pass - # We can use the standard Windows path. - import ntpath as path - - import ce - __all__.extend(_get_exports_list(ce)) - del ce - - try: - from ce import _have_functions - except ImportError: - pass - else: raise ImportError('no os specific module found') diff -r c78774c7d032 Lib/tarfile.py --- a/Lib/tarfile.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/tarfile.py Mon Jun 20 00:36:08 2016 -0700 @@ -144,7 +144,7 @@ #--------------------------------------------------------- # initialization #--------------------------------------------------------- -if os.name in ("nt", "ce"): +if os.name == "nt": ENCODING = "utf-8" else: ENCODING = sys.getfilesystemencoding() diff -r c78774c7d032 Lib/test/support/__init__.py --- a/Lib/test/support/__init__.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Lib/test/support/__init__.py Mon Jun 20 00:36:08 2016 -0700 @@ -803,7 +803,7 @@ # encoded by the filesystem encoding (in strict mode). It can be None if we # cannot generate such filename. TESTFN_UNENCODABLE = None -if os.name in ('nt', 'ce'): +if os.name == 'nt': # skip win32s (0) or Windows 9x/ME (1) if sys.getwindowsversion().platform >= 2: # Different kinds of characters from various languages to minimize the diff -r c78774c7d032 PC/pyconfig.h --- a/PC/pyconfig.h Mon Jun 13 16:33:04 2016 +0200 +++ b/PC/pyconfig.h Mon Jun 20 00:36:08 2016 -0700 @@ -14,7 +14,6 @@ MS_WIN64 - Code specific to the MS Win64 API MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs) MS_WINDOWS - Code specific to Windows, but all versions. -MS_WINCE - Code specific to Windows CE Py_ENABLE_SHARED - Code if the Python core is built as a DLL. Also note that neither "_M_IX86" or "_MSC_VER" should be used for @@ -30,10 +29,6 @@ */ -#ifdef _WIN32_WCE -#define MS_WINCE -#endif - /* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */ #ifdef USE_DL_EXPORT # define Py_BUILD_CORE @@ -53,8 +48,6 @@ #define _CRT_NONSTDC_NO_DEPRECATE 1 #endif -/* Windows CE does not have these */ -#ifndef MS_WINCE #define HAVE_IO_H #define HAVE_SYS_UTIME_H #define HAVE_TEMPNAM @@ -62,11 +55,8 @@ #define HAVE_TMPNAM #define HAVE_CLOCK #define HAVE_STRERROR -#endif -#ifdef HAVE_IO_H #include -#endif #define HAVE_HYPOT #define HAVE_STRFTIME @@ -86,17 +76,6 @@ #define USE_SOCKET #endif -/* CE6 doesn't have strdup() but _strdup(). Assume the same for earlier versions. */ -#if defined(MS_WINCE) -# include -# define strdup _strdup -#endif - -#ifdef MS_WINCE -/* Windows CE does not support environment variables */ -#define getenv(v) (NULL) -#define environ (NULL) -#endif /* Compiler specific defines */ @@ -448,14 +427,10 @@ /* #define const */ /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_CONIO_H 1 -#endif /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_DIRECT_H 1 -#endif /* Define if you have dirent.h. */ /* #define DIRENT 1 */ @@ -528,9 +503,7 @@ /* #define HAVE_ALTZONE */ /* Define if you have the putenv function. */ -#ifndef MS_WINCE #define HAVE_PUTENV -#endif /* Define if your compiler supports function prototypes */ #define HAVE_PROTOTYPES @@ -558,9 +531,7 @@ #define HAVE_DYNAMIC_LOADING /* Define if you have ftime. */ -#ifndef MS_WINCE #define HAVE_FTIME -#endif /* Define if you have getpeername. */ #define HAVE_GETPEERNAME @@ -569,9 +540,7 @@ /* #undef HAVE_GETPGRP */ /* Define if you have getpid. */ -#ifndef MS_WINCE #define HAVE_GETPID -#endif /* Define if you have gettimeofday. */ /* #undef HAVE_GETTIMEOFDAY */ @@ -633,14 +602,10 @@ #endif /* Define to 1 if you have the `wcscoll' function. */ -#ifndef MS_WINCE #define HAVE_WCSCOLL 1 -#endif /* Define to 1 if you have the `wcsxfrm' function. */ -#ifndef MS_WINCE #define HAVE_WCSXFRM 1 -#endif /* Define if the zlib library has inflateCopy */ #define HAVE_ZLIB_COPY 1 @@ -649,24 +614,16 @@ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_ERRNO_H 1 -#endif /* Define if you have the header file. */ -#ifndef MS_WINCE #define HAVE_FCNTL_H 1 -#endif /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_PROCESS_H 1 -#endif /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_SIGNAL_H 1 -#endif /* Define if you have the prototypes. */ #define HAVE_STDARG_PROTOTYPES @@ -684,9 +641,7 @@ /* #define HAVE_SYS_SELECT_H 1 */ /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_SYS_STAT_H 1 -#endif /* Define if you have the header file. */ /* #define HAVE_SYS_TIME_H 1 */ @@ -695,9 +650,7 @@ /* #define HAVE_SYS_TIMES_H 1 */ /* Define to 1 if you have the header file. */ -#ifndef MS_WINCE #define HAVE_SYS_TYPES_H 1 -#endif /* Define if you have the header file. */ /* #define HAVE_SYS_UN_H 1 */ diff -r c78774c7d032 Python/sysmodule.c --- a/Python/sysmodule.c Mon Jun 13 16:33:04 2016 +0200 +++ b/Python/sysmodule.c Mon Jun 20 00:36:08 2016 -0700 @@ -1999,7 +1999,7 @@ #endif #if defined(HAVE_REALPATH) wchar_t fullpath[MAXPATHLEN]; -#elif defined(MS_WINDOWS) && !defined(MS_WINCE) +#elif defined(MS_WINDOWS) wchar_t fullpath[MAX_PATH]; #endif @@ -2038,10 +2038,8 @@ #if SEP == '\\' /* Special case for MS filename syntax */ if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) { wchar_t *q; -#if defined(MS_WINDOWS) && !defined(MS_WINCE) - /* This code here replaces the first element in argv with the full - path that it represents. Under CE, there are no relative paths so - the argument must be the full path anyway. */ +#if defined(MS_WINDOWS) + /* Replace the first element in argv with the full path. */ wchar_t *ptemp; if (GetFullPathNameW(argv0, Py_ARRAY_LENGTH(fullpath), diff -r c78774c7d032 Python/thread_nt.h --- a/Python/thread_nt.h Mon Jun 13 16:33:04 2016 +0200 +++ b/Python/thread_nt.h Mon Jun 20 00:36:08 2016 -0700 @@ -161,11 +161,7 @@ /* thunker to call adapt between the function type used by the system's thread start function and the internally used one. */ -#if defined(MS_WINCE) -static DWORD WINAPI -#else static unsigned __stdcall -#endif bootstrap(void *call) { callobj *obj = (callobj*)call; @@ -193,32 +189,18 @@ return -1; obj->func = func; obj->arg = arg; -#if defined(MS_WINCE) - hThread = CreateThread(NULL, - Py_SAFE_DOWNCAST(_pythread_stacksize, Py_ssize_t, SIZE_T), - bootstrap, obj, 0, &threadID); -#else hThread = (HANDLE)_beginthreadex(0, Py_SAFE_DOWNCAST(_pythread_stacksize, Py_ssize_t, unsigned int), bootstrap, obj, 0, &threadID); -#endif if (hThread == 0) { -#if defined(MS_WINCE) - /* Save error in variable, to prevent PyThread_get_thread_ident - from clobbering it. */ - unsigned e = GetLastError(); - dprintf(("%ld: PyThread_start_new_thread failed, win32 error code %u\n", - PyThread_get_thread_ident(), e)); -#else /* I've seen errno == EAGAIN here, which means "there are * too many threads". */ int e = errno; dprintf(("%ld: PyThread_start_new_thread failed, errno %d\n", PyThread_get_thread_ident(), e)); -#endif threadID = (unsigned)-1; HeapFree(GetProcessHeap(), 0, obj); } @@ -249,11 +231,7 @@ dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident())); if (!initialized) exit(0); -#if defined(MS_WINCE) - ExitThread(0); -#else _endthreadex(0); -#endif } /* diff -r c78774c7d032 Tools/freeze/freeze.py --- a/Tools/freeze/freeze.py Mon Jun 13 16:33:04 2016 +0200 +++ b/Tools/freeze/freeze.py Mon Jun 20 00:36:08 2016 -0700 @@ -124,9 +124,7 @@ # default the exclude list for each platform if win: exclude = exclude + [ - 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', - 'ce', - ] + 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', ] fail_import = exclude[:]