Author: skip.montanaro
Date: Thu Aug 16 16:35:24 2007
New Revision: 57097

Removed:
   python/branches/py3k/RISCOS/
Modified:
   python/branches/py3k/Doc/library/os.rst
   python/branches/py3k/Include/osdefs.h
   python/branches/py3k/Include/pyport.h
   python/branches/py3k/Lib/distutils/command/install_lib.py
   python/branches/py3k/Lib/dumbdbm.py
   python/branches/py3k/Lib/fileinput.py
   python/branches/py3k/Lib/os.py
   python/branches/py3k/Lib/pkgutil.py
   python/branches/py3k/Lib/site.py
   python/branches/py3k/Lib/test/regrtest.py
   python/branches/py3k/Lib/test/test_exceptions.py
   python/branches/py3k/Lib/test/test_import.py
   python/branches/py3k/Lib/test/test_mailbox.py
   python/branches/py3k/Lib/test/test_minidom.py
   python/branches/py3k/Lib/test/test_normalization.py
   python/branches/py3k/Lib/test/test_old_mailbox.py
   python/branches/py3k/Lib/test/test_pkg.py
   python/branches/py3k/Lib/test/test_pkgimport.py
   python/branches/py3k/Lib/test/test_repr.py
   python/branches/py3k/Lib/test/test_runpy.py
   python/branches/py3k/Lib/test/test_sax.py
   python/branches/py3k/Lib/test/test_support.py
   python/branches/py3k/Lib/test/test_tokenize.py
   python/branches/py3k/Lib/test/test_zipfile.py
   python/branches/py3k/Lib/test/test_zipimport.py
   python/branches/py3k/Lib/whichdb.py
   python/branches/py3k/Misc/HISTORY
   python/branches/py3k/Modules/_localemodule.c
   python/branches/py3k/Modules/main.c
   python/branches/py3k/Modules/socketmodule.c
   python/branches/py3k/Modules/timemodule.c
   python/branches/py3k/Modules/zipimport.c
   python/branches/py3k/Modules/zlib/README
   python/branches/py3k/Modules/zlib/example.c
   python/branches/py3k/Modules/zlib/minigzip.c
   python/branches/py3k/Modules/zlib/zutil.h
   python/branches/py3k/Parser/grammar.c
   python/branches/py3k/Parser/intrcheck.c
   python/branches/py3k/Parser/myreadline.c
   python/branches/py3k/Python/bltinmodule.c
   python/branches/py3k/Python/import.c
   python/branches/py3k/Python/sysmodule.c
   python/branches/py3k/README
Log:
Remove RISCOS support

Modified: python/branches/py3k/Doc/library/os.rst
==============================================================================
--- python/branches/py3k/Doc/library/os.rst     (original)
+++ python/branches/py3k/Doc/library/os.rst     Thu Aug 16 16:35:24 2007
@@ -64,7 +64,7 @@
 
    The name of the operating system dependent module imported.  The following 
names
    have currently been registered: ``'posix'``, ``'nt'``, ``'mac'``, ``'os2'``,
-   ``'ce'``, ``'java'``, ``'riscos'``.
+   ``'ce'``, ``'java'``.
 
 
 .. data:: path
@@ -1058,9 +1058,6 @@
    On Mac OS systems, the following attributes may also be available:
    :attr:`st_rsize`, :attr:`st_creator`, :attr:`st_type`.
 
-   On RISCOS systems, the following attributes are also available: 
:attr:`st_ftype`
-   (file type), :attr:`st_attrs` (attributes), :attr:`st_obtype` (object type).
-
    .. index:: module: stat
 
    For backward compatibility, the return value of :func:`stat` is also 
accessible

Modified: python/branches/py3k/Include/osdefs.h
==============================================================================
--- python/branches/py3k/Include/osdefs.h       (original)
+++ python/branches/py3k/Include/osdefs.h       Thu Aug 16 16:35:24 2007
@@ -23,13 +23,6 @@
 #endif
 #endif
 
-#ifdef RISCOS
-#define SEP '.'
-#define MAXPATHLEN 256
-#define DELIM ','
-#endif
-
-
 /* Filename separator */
 #ifndef SEP
 #define SEP '/'

Modified: python/branches/py3k/Include/pyport.h
==============================================================================
--- python/branches/py3k/Include/pyport.h       (original)
+++ python/branches/py3k/Include/pyport.h       Thu Aug 16 16:35:24 2007
@@ -261,11 +261,6 @@
 #define HAVE_FSTAT
 #endif
 
-#ifdef RISCOS
-#include <sys/types.h>
-#include "unixstuff.h"
-#endif
-
 #ifdef HAVE_SYS_STAT_H
 #if defined(PYOS_OS2) && defined(PYCC_GCC)
 #include <sys/types.h>
@@ -677,8 +672,7 @@
  * Hide GCC attributes from compilers that don't support them.
  */
 #if (!defined(__GNUC__) || __GNUC__ < 2 || \
-     (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ) && \
-    !defined(RISCOS)
+     (__GNUC__ == 2 && __GNUC_MINOR__ < 7) )
 #define Py_GCC_ATTRIBUTE(x)
 #else
 #define Py_GCC_ATTRIBUTE(x) __attribute__(x)

Modified: python/branches/py3k/Lib/distutils/command/install_lib.py
==============================================================================
--- python/branches/py3k/Lib/distutils/command/install_lib.py   (original)
+++ python/branches/py3k/Lib/distutils/command/install_lib.py   Thu Aug 16 
16:35:24 2007
@@ -9,10 +9,7 @@
 
 
 # Extension for Python source files.
-if hasattr(os, 'extsep'):
-    PYTHON_SOURCE_EXTENSION = os.extsep + "py"
-else:
-    PYTHON_SOURCE_EXTENSION = ".py"
+PYTHON_SOURCE_EXTENSION = ".py"
 
 class install_lib (Command):
 

Modified: python/branches/py3k/Lib/dumbdbm.py
==============================================================================
--- python/branches/py3k/Lib/dumbdbm.py (original)
+++ python/branches/py3k/Lib/dumbdbm.py Thu Aug 16 16:35:24 2007
@@ -51,14 +51,14 @@
         # where key is the string key, pos is the offset into the dat
         # file of the associated value's first byte, and siz is the number
         # of bytes in the associated value.
-        self._dirfile = filebasename + _os.extsep + 'dir'
+        self._dirfile = filebasename + '.dir'
 
         # The data file is a binary file pointed into by the directory
         # file, and holds the values associated with keys.  Each value
         # begins at a _BLOCKSIZE-aligned byte offset, and is a raw
         # binary 8-bit string value.
-        self._datfile = filebasename + _os.extsep + 'dat'
-        self._bakfile = filebasename + _os.extsep + 'bak'
+        self._datfile = filebasename + '.dat'
+        self._bakfile = filebasename + '.bak'
 
         # The index is an in-memory dict, mirroring the directory file.
         self._index = None  # maps keys to (pos, siz) pairs

Modified: python/branches/py3k/Lib/fileinput.py
==============================================================================
--- python/branches/py3k/Lib/fileinput.py       (original)
+++ python/branches/py3k/Lib/fileinput.py       Thu Aug 16 16:35:24 2007
@@ -315,7 +315,7 @@
             else:
                 if self._inplace:
                     self._backupfilename = (
-                        self._filename + (self._backup or os.extsep+"bak"))
+                        self._filename + (self._backup or ".bak"))
                     try: os.unlink(self._backupfilename)
                     except os.error: pass
                     # The next few lines may raise IOError

Modified: python/branches/py3k/Lib/os.py
==============================================================================
--- python/branches/py3k/Lib/os.py      (original)
+++ python/branches/py3k/Lib/os.py      Thu Aug 16 16:35:24 2007
@@ -7,7 +7,6 @@
   - 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 '\\')
-  - os.extsep is the extension separator ('.' or '/')
   - os.altsep is the alternate pathname separator (None or '/')
   - os.pathsep is the component separator used in $PATH etc
   - os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
@@ -131,8 +130,7 @@
     raise ImportError, 'no os specific module found'
 
 sys.modules['os.path'] = path
-from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,
-    devnull)
+from os.path import curdir, pardir, sep, pathsep, defpath, altsep, devnull
 
 del _names
 

Modified: python/branches/py3k/Lib/pkgutil.py
==============================================================================
--- python/branches/py3k/Lib/pkgutil.py (original)
+++ python/branches/py3k/Lib/pkgutil.py Thu Aug 16 16:35:24 2007
@@ -510,10 +510,8 @@
         return path
 
     pname = os.path.join(*name.split('.')) # Reconstitute as relative path
-    # Just in case os.extsep != '.'
-    sname = os.extsep.join(name.split('.'))
-    sname_pkg = sname + os.extsep + "pkg"
-    init_py = "__init__" + os.extsep + "py"
+    sname_pkg = name + ".pkg"
+    init_py = "__init__.py"
 
     path = path[:] # Start with a copy of the existing path
 

Modified: python/branches/py3k/Lib/site.py
==============================================================================
--- python/branches/py3k/Lib/site.py    (original)
+++ python/branches/py3k/Lib/site.py    Thu Aug 16 16:35:24 2007
@@ -167,7 +167,7 @@
         return
     names.sort()
     for name in names:
-        if name.endswith(os.extsep + "pth"):
+        if name.endswith(".pth"):
             addpackage(sitedir, name, known_paths)
     if reset:
         known_paths = None

Modified: python/branches/py3k/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/test/regrtest.py   (original)
+++ python/branches/py3k/Lib/test/regrtest.py   Thu Aug 16 16:35:24 2007
@@ -509,7 +509,7 @@
     names = os.listdir(testdir)
     tests = []
     for name in names:
-        if name[:5] == "test_" and name[-3:] == os.extsep+"py":
+        if name[:5] == "test_" and name[-3:] == ".py":
             modname = name[:-3]
             if modname not in stdtests and modname not in nottests:
                 tests.append(modname)
@@ -799,7 +799,7 @@
     return testdir
 
 def removepy(name):
-    if name.endswith(os.extsep + "py"):
+    if name.endswith(".py"):
         name = name[:-3]
     return name
 

Modified: python/branches/py3k/Lib/test/test_exceptions.py
==============================================================================
--- python/branches/py3k/Lib/test/test_exceptions.py    (original)
+++ python/branches/py3k/Lib/test/test_exceptions.py    Thu Aug 16 16:35:24 2007
@@ -155,7 +155,7 @@
                 exc, err, tb = sys.exc_info()
                 co = tb.tb_frame.f_code
                 self.assertEquals(co.co_name, "test_capi1")
-                
self.assert_(co.co_filename.endswith('test_exceptions'+os.extsep+'py'))
+                self.assert_(co.co_filename.endswith('test_exceptions.py'))
             else:
                 self.fail("Expected exception")
 
@@ -167,7 +167,7 @@
                 exc, err, tb = sys.exc_info()
                 co = tb.tb_frame.f_code
                 self.assertEquals(co.co_name, "__init__")
-                
self.assert_(co.co_filename.endswith('test_exceptions'+os.extsep+'py'))
+                self.assert_(co.co_filename.endswith('test_exceptions.py'))
                 co2 = tb.tb_frame.f_back.f_code
                 self.assertEquals(co2.co_name, "test_capi2")
             else:

Modified: python/branches/py3k/Lib/test/test_import.py
==============================================================================
--- python/branches/py3k/Lib/test/test_import.py        (original)
+++ python/branches/py3k/Lib/test/test_import.py        Thu Aug 16 16:35:24 2007
@@ -10,10 +10,10 @@
 
 
 def remove_files(name):
-    for f in (name + os.extsep + "py",
-              name + os.extsep + "pyc",
-              name + os.extsep + "pyo",
-              name + os.extsep + "pyw",
+    for f in (name + ".py",
+              name + ".pyc",
+              name + ".pyo",
+              name + ".pyw",
               name + "$py.class"):
         if os.path.exists(f):
             os.remove(f)
@@ -39,11 +39,11 @@
         def test_with_extension(ext):
             # ext normally ".py"; perhaps ".pyw"
             source = TESTFN + ext
-            pyo = TESTFN + os.extsep + "pyo"
+            pyo = TESTFN + ".pyo"
             if sys.platform.startswith('java'):
                 pyc = TESTFN + "$py.class"
             else:
-                pyc = TESTFN + os.extsep + "pyc"
+                pyc = TESTFN + ".pyc"
 
             f = open(source, "w")
             print("# This tests Python's ability to import a", ext, "file.", 
file=f)
@@ -71,7 +71,7 @@
 
         sys.path.insert(0, os.curdir)
         try:
-            test_with_extension(os.extsep + "py")
+            test_with_extension(".py")
             if sys.platform.startswith("win"):
                 for ext in ".PY", ".Py", ".pY", ".pyw", ".PYW", ".pYw":
                     test_with_extension(ext)
@@ -86,7 +86,7 @@
 
     def test_module_with_large_stack(self, module='longlist'):
         # create module w/list of 65000 elements to test bug #561858
-        filename = module + os.extsep + 'py'
+        filename = module + '.py'
 
         # create a file with a list of 65000 elements
         f = open(filename, 'w+')
@@ -110,13 +110,13 @@
 
         # cleanup
         del sys.path[-1]
-        for ext in 'pyc', 'pyo':
-            fname = module + os.extsep + ext
+        for ext in '.pyc', '.pyo':
+            fname = module + ext
             if os.path.exists(fname):
                 os.unlink(fname)
 
     def test_failing_import_sticks(self):
-        source = TESTFN + os.extsep + "py"
+        source = TESTFN + ".py"
         f = open(source, "w")
         print("a = 1/0", file=f)
         f.close()

Modified: python/branches/py3k/Lib/test/test_mailbox.py
==============================================================================
--- python/branches/py3k/Lib/test/test_mailbox.py       (original)
+++ python/branches/py3k/Lib/test/test_mailbox.py       Thu Aug 16 16:35:24 2007
@@ -1687,7 +1687,7 @@
         t = int(time.time() % 1000000)
         pid = self._counter
         self._counter += 1
-        filename = os.extsep.join((str(t), str(pid), "myhostname", "mydomain"))
+        filename = ".".join((str(t), str(pid), "myhostname", "mydomain"))
         tmpname = os.path.join(self._dir, "tmp", filename)
         newname = os.path.join(self._dir, dir, filename)
         fp = open(tmpname, "w")

Modified: python/branches/py3k/Lib/test/test_minidom.py
==============================================================================
--- python/branches/py3k/Lib/test/test_minidom.py       (original)
+++ python/branches/py3k/Lib/test/test_minidom.py       Thu Aug 16 16:35:24 2007
@@ -20,7 +20,7 @@
     base = sys.argv[0]
 else:
     base = __file__
-tstfile = os.path.join(os.path.dirname(base), "test"+os.extsep+"xml")
+tstfile = os.path.join(os.path.dirname(base), "test.xml")
 del base
 
 # The tests of DocumentType importing use these helpers to construct

Modified: python/branches/py3k/Lib/test/test_normalization.py
==============================================================================
--- python/branches/py3k/Lib/test/test_normalization.py (original)
+++ python/branches/py3k/Lib/test/test_normalization.py Thu Aug 16 16:35:24 2007
@@ -5,7 +5,7 @@
 import os
 from unicodedata import normalize
 
-TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
+TESTDATAFILE = "NormalizationTest.txt"
 TESTDATAURL = "http://www.unicode.org/Public/4.1.0/ucd/"; + TESTDATAFILE
 
 class RangeError(Exception):

Modified: python/branches/py3k/Lib/test/test_old_mailbox.py
==============================================================================
--- python/branches/py3k/Lib/test/test_old_mailbox.py   (original)
+++ python/branches/py3k/Lib/test/test_old_mailbox.py   Thu Aug 16 16:35:24 2007
@@ -45,7 +45,7 @@
         t = int(time.time() % 1000000)
         pid = self._counter
         self._counter += 1
-        filename = os.extsep.join((str(t), str(pid), "myhostname", "mydomain"))
+        filename = ".".join((str(t), str(pid), "myhostname", "mydomain"))
         tmpname = os.path.join(self._dir, "tmp", filename)
         newname = os.path.join(self._dir, dir, filename)
         fp = open(tmpname, "w")

Modified: python/branches/py3k/Lib/test/test_pkg.py
==============================================================================
--- python/branches/py3k/Lib/test/test_pkg.py   (original)
+++ python/branches/py3k/Lib/test/test_pkg.py   Thu Aug 16 16:35:24 2007
@@ -1,7 +1,7 @@
 # Test packages (dotted-name import)
 
 import sys, os, tempfile, traceback
-from os import mkdir, rmdir, extsep          # Can't test if these fail
+from os import mkdir, rmdir          # Can't test if these fail
 del mkdir, rmdir
 from test.test_support import verify, verbose, TestFailed
 
@@ -77,15 +77,15 @@
 # Test descriptions
 
 tests = [
-    ("t1", [("t1", None), ("t1 __init__"+os.extsep+"py", "")], "import t1"),
+    ("t1", [("t1", None), ("t1 __init__.py", "")], "import t1"),
 
     ("t2", [
     ("t2", None),
-    ("t2 __init__"+os.extsep+"py", "'doc for t2'; print(__name__, 'loading')"),
+    ("t2 __init__.py", "'doc for t2'; print(__name__, 'loading')"),
     ("t2 sub", None),
-    ("t2 sub __init__"+os.extsep+"py", ""),
+    ("t2 sub __init__.py", ""),
     ("t2 sub subsub", None),
-    ("t2 sub subsub __init__"+os.extsep+"py", "print(__name__, 'loading'); 
spam = 1"),
+    ("t2 sub subsub __init__.py", "print(__name__, 'loading'); spam = 1"),
     ],
 """
 import t2
@@ -111,11 +111,11 @@
 
     ("t3", [
     ("t3", None),
-    ("t3 __init__"+os.extsep+"py", "print(__name__, 'loading')"),
+    ("t3 __init__.py", "print(__name__, 'loading')"),
     ("t3 sub", None),
-    ("t3 sub __init__"+os.extsep+"py", ""),
+    ("t3 sub __init__.py", ""),
     ("t3 sub subsub", None),
-    ("t3 sub subsub __init__"+os.extsep+"py", "print(__name__, 'loading'); 
spam = 1"),
+    ("t3 sub subsub __init__.py", "print(__name__, 'loading'); spam = 1"),
     ],
 """
 import t3.sub.subsub
@@ -123,15 +123,15 @@
 """),
 
     ("t4", [
-    ("t4"+os.extsep+"py", "print('THIS SHOULD NOT BE PRINTED 
(t4"+os.extsep+"py)')"),
+    ("t4.py", "print('THIS SHOULD NOT BE PRINTED (t4.py)')"),
     ("t4", None),
-    ("t4 __init__"+os.extsep+"py", "print(__name__, 'loading')"),
-    ("t4 sub"+os.extsep+"py", "print('THIS SHOULD NOT BE PRINTED 
(sub"+os.extsep+"py)')"),
+    ("t4 __init__.py", "print(__name__, 'loading')"),
+    ("t4 sub.py", "print('THIS SHOULD NOT BE PRINTED (sub.py)')"),
     ("t4 sub", None),
-    ("t4 sub __init__"+os.extsep+"py", ""),
-    ("t4 sub subsub"+os.extsep+"py", "print('THIS SHOULD NOT BE PRINTED 
(subsub"+os.extsep+"py)')"),
+    ("t4 sub __init__.py", ""),
+    ("t4 sub subsub.py", "print('THIS SHOULD NOT BE PRINTED (subsub.py)')"),
     ("t4 sub subsub", None),
-    ("t4 sub subsub __init__"+os.extsep+"py", "print(__name__, 'loading'); 
spam = 1"),
+    ("t4 sub subsub __init__.py", "print(__name__, 'loading'); spam = 1"),
     ],
 """
 from t4.sub.subsub import *
@@ -140,9 +140,9 @@
 
     ("t5", [
     ("t5", None),
-    ("t5 __init__"+os.extsep+"py", "import t5.foo"),
-    ("t5 string"+os.extsep+"py", "print(__name__, 'loading'); spam = 1"),
-    ("t5 foo"+os.extsep+"py",
+    ("t5 __init__.py", "import t5.foo"),
+    ("t5 string.py", "print(__name__, 'loading'); spam = 1"),
+    ("t5 foo.py",
      "print(__name__, 'loading'); from . import string; print(string.spam)"),
      ],
 """
@@ -157,10 +157,10 @@
 
     ("t6", [
     ("t6", None),
-    ("t6 __init__"+os.extsep+"py", "__all__ = ['spam', 'ham', 'eggs']"),
-    ("t6 spam"+os.extsep+"py", "print(__name__, 'loading')"),
-    ("t6 ham"+os.extsep+"py", "print(__name__, 'loading')"),
-    ("t6 eggs"+os.extsep+"py", "print(__name__, 'loading')"),
+    ("t6 __init__.py", "__all__ = ['spam', 'ham', 'eggs']"),
+    ("t6 spam.py", "print(__name__, 'loading')"),
+    ("t6 ham.py", "print(__name__, 'loading')"),
+    ("t6 eggs.py", "print(__name__, 'loading')"),
     ],
 """
 import t6
@@ -171,15 +171,15 @@
 """),
 
     ("t7", [
-    ("t7"+os.extsep+"py", "print('Importing t7"+os.extsep+"py')"),
+    ("t7.py", "print('Importing t7.py')"),
     ("t7", None),
-    ("t7 __init__"+os.extsep+"py", "print(__name__, 'loading')"),
-    ("t7 sub"+os.extsep+"py", "print('THIS SHOULD NOT BE PRINTED 
(sub"+os.extsep+"py)')"),
+    ("t7 __init__.py", "print(__name__, 'loading')"),
+    ("t7 sub.py", "print('THIS SHOULD NOT BE PRINTED (sub.py)')"),
     ("t7 sub", None),
-    ("t7 sub __init__"+os.extsep+"py", ""),
-    ("t7 sub subsub"+os.extsep+"py", "print('THIS SHOULD NOT BE PRINTED 
(subsub"+os.extsep+"py)')"),
+    ("t7 sub __init__.py", ""),
+    ("t7 sub subsub.py", "print('THIS SHOULD NOT BE PRINTED (subsub.py)')"),
     ("t7 sub subsub", None),
-    ("t7 sub subsub __init__"+os.extsep+"py", "print(__name__, 'loading'); 
spam = 1"),
+    ("t7 sub subsub __init__.py", "print(__name__, 'loading'); spam = 1"),
     ],
 """
 t7, sub, subsub = None, None, None

Modified: python/branches/py3k/Lib/test/test_pkgimport.py
==============================================================================
--- python/branches/py3k/Lib/test/test_pkgimport.py     (original)
+++ python/branches/py3k/Lib/test/test_pkgimport.py     Thu Aug 16 16:35:24 2007
@@ -22,8 +22,8 @@
         self.package_dir = os.path.join(self.test_dir,
                                         self.package_name)
         os.mkdir(self.package_dir)
-        open(os.path.join(self.package_dir, '__init__'+os.extsep+'py'), 'w')
-        self.module_path = os.path.join(self.package_dir, 'foo'+os.extsep+'py')
+        open(os.path.join(self.package_dir, '__init__.py'), 'w')
+        self.module_path = os.path.join(self.package_dir, 'foo.py')
 
     def tearDown(self):
         for file in os.listdir(self.package_dir):

Modified: python/branches/py3k/Lib/test/test_repr.py
==============================================================================
--- python/branches/py3k/Lib/test/test_repr.py  (original)
+++ python/branches/py3k/Lib/test/test_repr.py  Thu Aug 16 16:35:24 2007
@@ -205,10 +205,10 @@
         # Make the package and subpackage
         shutil.rmtree(self.pkgname, ignore_errors=True)
         os.mkdir(self.pkgname)
-        touch(os.path.join(self.pkgname, '__init__'+os.extsep+'py'))
+        touch(os.path.join(self.pkgname, '__init__.py'))
         shutil.rmtree(self.subpkgname, ignore_errors=True)
         os.mkdir(self.subpkgname)
-        touch(os.path.join(self.subpkgname, '__init__'+os.extsep+'py'))
+        touch(os.path.join(self.subpkgname, '__init__.py'))
         # Remember where we are
         self.here = os.getcwd()
         sys.path.insert(0, self.here)
@@ -228,7 +228,7 @@
 
     def test_module(self):
         eq = self.assertEquals
-        touch(os.path.join(self.subpkgname, self.pkgname + os.extsep + 'py'))
+        touch(os.path.join(self.subpkgname, self.pkgname + '.py'))
         from 
areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation
 import areallylongpackageandmodulenametotestreprtruncation
         eq(repr(areallylongpackageandmodulenametotestreprtruncation),
            "<module '%s' from '%s'>" % 
(areallylongpackageandmodulenametotestreprtruncation.__name__, 
areallylongpackageandmodulenametotestreprtruncation.__file__))
@@ -236,7 +236,7 @@
 
     def test_type(self):
         eq = self.assertEquals
-        touch(os.path.join(self.subpkgname, 'foo'+os.extsep+'py'), '''\
+        touch(os.path.join(self.subpkgname, 'foo.py'), '''\
 class foo(object):
     pass
 ''')
@@ -250,7 +250,7 @@
         pass
 
     def test_class(self):
-        touch(os.path.join(self.subpkgname, 'bar'+os.extsep+'py'), '''\
+        touch(os.path.join(self.subpkgname, 'bar.py'), '''\
 class bar:
     pass
 ''')
@@ -259,7 +259,7 @@
         self.assertEquals(repr(bar.bar), "<class '%s.bar'>" % bar.__name__)
 
     def test_instance(self):
-        touch(os.path.join(self.subpkgname, 'baz'+os.extsep+'py'), '''\
+        touch(os.path.join(self.subpkgname, 'baz.py'), '''\
 class baz:
     pass
 ''')
@@ -270,7 +270,7 @@
 
     def test_method(self):
         eq = self.assertEquals
-        touch(os.path.join(self.subpkgname, 'qux'+os.extsep+'py'), '''\
+        touch(os.path.join(self.subpkgname, 'qux.py'), '''\
 class 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
     def amethod(self): pass
 ''')

Modified: python/branches/py3k/Lib/test/test_runpy.py
==============================================================================
--- python/branches/py3k/Lib/test/test_runpy.py (original)
+++ python/branches/py3k/Lib/test/test_runpy.py Thu Aug 16 16:35:24 2007
@@ -103,14 +103,14 @@
 
     def _add_pkg_dir(self, pkg_dir):
         os.mkdir(pkg_dir)
-        pkg_fname = os.path.join(pkg_dir, "__init__"+os.extsep+"py")
+        pkg_fname = os.path.join(pkg_dir, "__init__.py")
         pkg_file = open(pkg_fname, "w")
         pkg_file.close()
         return pkg_fname
 
     def _make_pkg(self, source, depth):
         pkg_name = "__runpy_pkg__"
-        test_fname = "runpy_test"+os.extsep+"py"
+        test_fname = "runpy_test.py"
         pkg_dir = sub_dir = tempfile.mkdtemp()
         if verbose: print("  Package tree in:", sub_dir)
         sys.path.insert(0, pkg_dir)
@@ -182,7 +182,7 @@
             parent_dir = module_dir
             module_dir = os.path.join(module_dir, pkg_name)
         # Add sibling module
-        sibling_fname = os.path.join(module_dir, "sibling"+os.extsep+"py")
+        sibling_fname = os.path.join(module_dir, "sibling.py")
         sibling_file = open(sibling_fname, "w")
         sibling_file.close()
         if verbose: print("  Added sibling module:", sibling_fname)
@@ -193,7 +193,7 @@
         cousin_dir = os.path.join(uncle_dir, "cousin")
         self._add_pkg_dir(cousin_dir)
         if verbose: print("  Added cousin package:", cousin_dir)
-        nephew_fname = os.path.join(cousin_dir, "nephew"+os.extsep+"py")
+        nephew_fname = os.path.join(cousin_dir, "nephew.py")
         nephew_file = open(nephew_fname, "w")
         nephew_file.close()
         if verbose: print("  Added nephew module:", nephew_fname)

Modified: python/branches/py3k/Lib/test/test_sax.py
==============================================================================
--- python/branches/py3k/Lib/test/test_sax.py   (original)
+++ python/branches/py3k/Lib/test/test_sax.py   Thu Aug 16 16:35:24 2007
@@ -311,7 +311,7 @@
 #
 # ===========================================================================
 
-xml_test_out = open(findfile("test"+os.extsep+"xml"+os.extsep+"out")).read()
+xml_test_out = open(findfile("test.xml.out")).read()
 
 class ExpatReaderTest(XmlTestBase):
 
@@ -323,7 +323,7 @@
         xmlgen = XMLGenerator(result)
 
         parser.setContentHandler(xmlgen)
-        parser.parse(open(findfile("test"+os.extsep+"xml")))
+        parser.parse(open(findfile("test.xml")))
 
         self.assertEquals(result.getvalue(), xml_test_out)
 
@@ -452,7 +452,7 @@
         xmlgen = XMLGenerator(result)
 
         parser.setContentHandler(xmlgen)
-        parser.parse(findfile("test"+os.extsep+"xml"))
+        parser.parse(findfile("test.xml"))
 
         self.assertEquals(result.getvalue(), xml_test_out)
 
@@ -462,7 +462,7 @@
         xmlgen = XMLGenerator(result)
 
         parser.setContentHandler(xmlgen)
-        parser.parse(InputSource(findfile("test"+os.extsep+"xml")))
+        parser.parse(InputSource(findfile("test.xml")))
 
         self.assertEquals(result.getvalue(), xml_test_out)
 
@@ -473,7 +473,7 @@
 
         parser.setContentHandler(xmlgen)
         inpsrc = InputSource()
-        inpsrc.setByteStream(open(findfile("test"+os.extsep+"xml")))
+        inpsrc.setByteStream(open(findfile("test.xml")))
         parser.parse(inpsrc)
 
         self.assertEquals(result.getvalue(), xml_test_out)

Modified: python/branches/py3k/Lib/test/test_support.py
==============================================================================
--- python/branches/py3k/Lib/test/test_support.py       (original)
+++ python/branches/py3k/Lib/test/test_support.py       Thu Aug 16 16:35:24 2007
@@ -70,11 +70,11 @@
     deleting any .pyc and .pyo files.'''
     unload(modname)
     for dirname in sys.path:
-        unlink(os.path.join(dirname, modname + os.extsep + 'pyc'))
+        unlink(os.path.join(dirname, modname + '.pyc'))
         # Deleting the .pyo file cannot be within the 'try' for the .pyc since
         # the chance exists that there is no .pyc (and thus the 'try' statement
         # is exited) but there is a .pyo file.
-        unlink(os.path.join(dirname, modname + os.extsep + 'pyo'))
+        unlink(os.path.join(dirname, modname + '.pyo'))
 
 def is_resource_enabled(resource):
     """Test whether a resource is enabled.  Known resources are set by

Modified: python/branches/py3k/Lib/test/test_tokenize.py
==============================================================================
--- python/branches/py3k/Lib/test/test_tokenize.py      (original)
+++ python/branches/py3k/Lib/test/test_tokenize.py      Thu Aug 16 16:35:24 2007
@@ -186,14 +186,14 @@
     # This displays the tokenization of tokenize_tests.py to stdout, and
     # regrtest.py checks that this equals the expected output (in the
     # test/output/ directory).
-    f = open(findfile('tokenize_tests' + os.extsep + 'txt'))
+    f = open(findfile('tokenize_tests.txt'))
     tokenize(f.readline)
     f.close()
 
     # Now run test_roundtrip() over tokenize_test.py too, and over all
     # (if the "compiler" resource is enabled) or a small random sample (if
     # "compiler" is not enabled) of the test*.py files.
-    f = findfile('tokenize_tests' + os.extsep + 'txt')
+    f = findfile('tokenize_tests.txt')
     test_roundtrip(f)
 
     testdir = os.path.dirname(f) or os.curdir

Modified: python/branches/py3k/Lib/test/test_zipfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_zipfile.py       (original)
+++ python/branches/py3k/Lib/test/test_zipfile.py       Thu Aug 16 16:35:24 2007
@@ -29,7 +29,7 @@
     def makeTestArchive(self, f, compression):
         # Create the ZIP archive
         zipfp = zipfile.ZipFile(f, "w", compression)
-        zipfp.write(TESTFN, "another"+os.extsep+"name")
+        zipfp.write(TESTFN, "another.name")
         zipfp.write(TESTFN, TESTFN)
         zipfp.writestr("strfile", self.data)
         zipfp.close()
@@ -40,7 +40,7 @@
         # Read the ZIP archive
         zipfp = zipfile.ZipFile(f, "r", compression)
         self.assertEqual(zipfp.read(TESTFN), self.data)
-        self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data)
+        self.assertEqual(zipfp.read("another.name"), self.data)
         self.assertEqual(zipfp.read("strfile"), self.data)
 
         # Print the ZIP directory
@@ -64,7 +64,7 @@
         names = zipfp.namelist()
         self.assertEquals(len(names), 3)
         self.assert_(TESTFN in names)
-        self.assert_("another"+os.extsep+"name" in names)
+        self.assert_("another.name" in names)
         self.assert_("strfile" in names)
 
         # Check infolist
@@ -72,13 +72,13 @@
         names = [ i.filename for i in infos ]
         self.assertEquals(len(names), 3)
         self.assert_(TESTFN in names)
-        self.assert_("another"+os.extsep+"name" in names)
+        self.assert_("another.name" in names)
         self.assert_("strfile" in names)
         for i in infos:
             self.assertEquals(i.file_size, len(self.data))
 
         # check getinfo
-        for nm in (TESTFN, "another"+os.extsep+"name", "strfile"):
+        for nm in (TESTFN, "another.name", "strfile"):
             info = zipfp.getinfo(nm)
             self.assertEquals(info.filename, nm)
             self.assertEquals(info.file_size, len(self.data))
@@ -105,7 +105,7 @@
             zipdata1.append(read_data)
 
         zipdata2 = []
-        zipopen2 = zipfp.open("another"+os.extsep+"name")
+        zipopen2 = zipfp.open("another.name")
         while 1:
             read_data = zipopen2.read(256)
             if not read_data:
@@ -313,13 +313,13 @@
     def largeFileExceptionTest(self, f, compression):
         zipfp = zipfile.ZipFile(f, "w", compression)
         self.assertRaises(zipfile.LargeZipFile,
-                zipfp.write, TESTFN, "another"+os.extsep+"name")
+                zipfp.write, TESTFN, "another.name")
         zipfp.close()
 
     def largeFileExceptionTest2(self, f, compression):
         zipfp = zipfile.ZipFile(f, "w", compression)
         self.assertRaises(zipfile.LargeZipFile,
-                zipfp.writestr, "another"+os.extsep+"name", self.data)
+                zipfp.writestr, "another.name", self.data)
         zipfp.close()
 
     def testLargeFileException(self):
@@ -330,7 +330,7 @@
     def zipTest(self, f, compression):
         # Create the ZIP archive
         zipfp = zipfile.ZipFile(f, "w", compression, allowZip64=True)
-        zipfp.write(TESTFN, "another"+os.extsep+"name")
+        zipfp.write(TESTFN, "another.name")
         zipfp.write(TESTFN, TESTFN)
         zipfp.writestr("strfile", self.data)
         zipfp.close()
@@ -338,7 +338,7 @@
         # Read the ZIP archive
         zipfp = zipfile.ZipFile(f, "r", compression)
         self.assertEqual(zipfp.read(TESTFN), self.data)
-        self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data)
+        self.assertEqual(zipfp.read("another.name"), self.data)
         self.assertEqual(zipfp.read("strfile"), self.data)
 
         # Print the ZIP directory
@@ -362,7 +362,7 @@
         names = zipfp.namelist()
         self.assertEquals(len(names), 3)
         self.assert_(TESTFN in names)
-        self.assert_("another"+os.extsep+"name" in names)
+        self.assert_("another.name" in names)
         self.assert_("strfile" in names)
 
         # Check infolist
@@ -370,13 +370,13 @@
         names = [ i.filename for i in infos ]
         self.assertEquals(len(names), 3)
         self.assert_(TESTFN in names)
-        self.assert_("another"+os.extsep+"name" in names)
+        self.assert_("another.name" in names)
         self.assert_("strfile" in names)
         for i in infos:
             self.assertEquals(i.file_size, len(self.data))
 
         # check getinfo
-        for nm in (TESTFN, "another"+os.extsep+"name", "strfile"):
+        for nm in (TESTFN, "another.name", "strfile"):
             info = zipfp.getinfo(nm)
             self.assertEquals(info.filename, nm)
             self.assertEquals(info.file_size, len(self.data))
@@ -675,7 +675,7 @@
     def makeTestArchive(self, f, compression):
         # Create the ZIP archive
         zipfp = zipfile.ZipFile(f, "w", compression)
-        zipfp.write(TESTFN, "another"+os.extsep+"name")
+        zipfp.write(TESTFN, "another.name")
         zipfp.write(TESTFN, TESTFN)
         zipfp.close()
 
@@ -687,7 +687,7 @@
         testdata = zipfp.read(TESTFN)
         self.assertEqual(len(testdata), len(self.data))
         self.assertEqual(testdata, self.data)
-        self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data)
+        self.assertEqual(zipfp.read("another.name"), self.data)
         zipfp.close()
 
     def testStored(self):
@@ -708,7 +708,7 @@
             zipdata1.append(read_data)
 
         zipdata2 = []
-        zipopen2 = zipfp.open("another"+os.extsep+"name")
+        zipopen2 = zipfp.open("another.name")
         while 1:
             read_data = zipopen2.read(256)
             if not read_data:

Modified: python/branches/py3k/Lib/test/test_zipimport.py
==============================================================================
--- python/branches/py3k/Lib/test/test_zipimport.py     (original)
+++ python/branches/py3k/Lib/test/test_zipimport.py     Thu Aug 16 16:35:24 2007
@@ -51,7 +51,7 @@
 TESTMOD = "ziptestmodule"
 TESTPACK = "ziptestpackage"
 TESTPACK2 = "ziptestpackage2"
-TEMP_ZIP = os.path.abspath("junk95142" + os.extsep + "zip")
+TEMP_ZIP = os.path.abspath("junk95142.zip")
 
 class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
 

Modified: python/branches/py3k/Lib/whichdb.py
==============================================================================
--- python/branches/py3k/Lib/whichdb.py (original)
+++ python/branches/py3k/Lib/whichdb.py Thu Aug 16 16:35:24 2007
@@ -30,18 +30,18 @@
 
     # Check for dbm first -- this has a .pag and a .dir file
     try:
-        f = io.open(filename + os.extsep + "pag", "rb")
+        f = io.open(filename + ".pag", "rb")
         f.close()
         # dbm linked with gdbm on OS/2 doesn't have .dir file
         if not (dbm.library == "GNU gdbm" and sys.platform == "os2emx"):
-            f = io.open(filename + os.extsep + "dir", "rb")
+            f = io.open(filename + ".dir", "rb")
             f.close()
         return "dbm"
     except IOError:
         # some dbm emulations based on Berkeley DB generate a .db file
         # some do not, but they should be caught by the dbhash checks
         try:
-            f = io.open(filename + os.extsep + "db", "rb")
+            f = io.open(filename + ".db", "rb")
             f.close()
             # guarantee we can actually open the file using dbm
             # kind of overkill, but since we are dealing with emulations
@@ -56,12 +56,12 @@
     # Check for dumbdbm next -- this has a .dir and a .dat file
     try:
         # First check for presence of files
-        os.stat(filename + os.extsep + "dat")
-        size = os.stat(filename + os.extsep + "dir").st_size
+        os.stat(filename + ".dat")
+        size = os.stat(filename + ".dir").st_size
         # dumbdbm files with no keys are empty
         if size == 0:
             return "dumbdbm"
-        f = io.open(filename + os.extsep + "dir", "rb")
+        f = io.open(filename + ".dir", "rb")
         try:
             if f.read(1) in (b"'", b'"'):
                 return "dumbdbm"

Modified: python/branches/py3k/Misc/HISTORY
==============================================================================
--- python/branches/py3k/Misc/HISTORY   (original)
+++ python/branches/py3k/Misc/HISTORY   Thu Aug 16 16:35:24 2007
@@ -2611,7 +2611,7 @@
 - The distutils "register" command now uses http://www.python.org/pypi
   as the default repository.  (See PEP 301.)
 
-- the platform dependent path related variables sep, altsep, extsep,
+- the platform dependent path related variables sep, altsep,
   pathsep, curdir, pardir and defpath are now defined in the platform
   dependent path modules (e.g. ntpath.py) rather than os.py, so these
   variables are now available via os.path.  They continue to be
@@ -4196,11 +4196,6 @@
   cycles created by casual use of sys.exc_info() no longer cause
   permanent memory leaks (provided garbage collection is enabled).
 
-- os.extsep -- a new variable needed by the RISCOS support.  It is the
-  separator used by extensions, and is '.' on all platforms except
-  RISCOS, where it is '/'.  There is no need to use this variable
-  unless you have a masochistic desire to port your code to RISCOS.
-
 - mimetypes.py has optional support for non-standard, but commonly
   found types.  guess_type() and guess_extension() now accept an
   optional 'strict' flag, defaulting to true, which controls whether

Modified: python/branches/py3k/Modules/_localemodule.c
==============================================================================
--- python/branches/py3k/Modules/_localemodule.c        (original)
+++ python/branches/py3k/Modules/_localemodule.c        Thu Aug 16 16:35:24 2007
@@ -41,10 +41,6 @@
 #include <windows.h>
 #endif
 
-#ifdef RISCOS
-char *strdup(const char *);
-#endif
-
 PyDoc_STRVAR(locale__doc__, "Support for POSIX locales.");
 
 static PyObject *Error;

Modified: python/branches/py3k/Modules/main.c
==============================================================================
--- python/branches/py3k/Modules/main.c (original)
+++ python/branches/py3k/Modules/main.c Thu Aug 16 16:35:24 2007
@@ -41,15 +41,7 @@
 /* command line options */
 #define BASE_OPTS "c:dEhim:OStuvVW:xX?"
 
-#ifndef RISCOS
 #define PROGRAM_OPTS BASE_OPTS
-#else /*RISCOS*/
-/* extra option saying that we are running under a special task window
-   frontend; especially my_readline will behave different */
-#define PROGRAM_OPTS BASE_OPTS "w"
-/* corresponding flag */
-extern int Py_RISCOSWimpFlag;
-#endif /*RISCOS*/
 
 /* Short usage message (with %s for argv0) */
 static char *usage_line =
@@ -227,10 +219,6 @@
        orig_argc = argc;       /* For Py_GetArgcArgv() */
        orig_argv = argv;
 
-#ifdef RISCOS
-       Py_RISCOSWimpFlag = 0;
-#endif
-
        PySys_ResetWarnOptions();
 
        while ((c = _PyOS_GetOpt(argc, argv, PROGRAM_OPTS)) != EOF) {
@@ -295,12 +283,6 @@
                        Py_VerboseFlag++;
                        break;
 
-#ifdef RISCOS
-               case 'w':
-                       Py_RISCOSWimpFlag = 1;
-                       break;
-#endif
-
                case 'x':
                        skipfirstline = 1;
                        break;
@@ -513,10 +495,6 @@
        WaitForThreadShutdown();
 
        Py_Finalize();
-#ifdef RISCOS
-       if (Py_RISCOSWimpFlag)
-                fprintf(stderr, "\x0cq\x0c"); /* make frontend quit */
-#endif
 
 #ifdef __INSURE__
        /* Insure++ is a memory analysis tool that aids in discovering

Modified: python/branches/py3k/Modules/socketmodule.c
==============================================================================
--- python/branches/py3k/Modules/socketmodule.c (original)
+++ python/branches/py3k/Modules/socketmodule.c Thu Aug 16 16:35:24 2007
@@ -251,15 +251,7 @@
 #   include <arpa/inet.h>
 # endif
 
-# ifndef RISCOS
 #  include <fcntl.h>
-# else
-#  include <sys/ioctl.h>
-#  include <socklib.h>
-#  define NO_DUP
-int h_errno; /* not used */
-#  define INET_ADDRSTRLEN 16
-# endif
 
 #else
 
@@ -417,11 +409,6 @@
 static PyObject *socket_gaierror;
 static PyObject *socket_timeout;
 
-#ifdef RISCOS
-/* Global variable which is !=0 if Python is running in a RISC OS taskwindow */
-static int taskwindow;
-#endif
-
 /* A forward reference to the socket type object.
    The sock_type variable contains pointers to various functions,
    some of which call new_sockobject(), which uses sock_type, so
@@ -582,18 +569,6 @@
        }
 #endif
 
-#if defined(RISCOS)
-       if (_inet_error.errnum != NULL) {
-               PyObject *v;
-               v = Py_BuildValue("(is)", errno, _inet_err());
-               if (v != NULL) {
-                       PyErr_SetObject(socket_error, v);
-                       Py_DECREF(v);
-               }
-               return NULL;
-       }
-#endif
-
        return PyErr_SetFromErrno(socket_error);
 }
 
@@ -670,11 +645,9 @@
 static int
 internal_setblocking(PySocketSockObject *s, int block)
 {
-#ifndef RISCOS
 #ifndef MS_WINDOWS
        int delay_flag;
 #endif
-#endif
 
        Py_BEGIN_ALLOW_THREADS
 #ifdef __BEOS__
@@ -682,7 +655,6 @@
        setsockopt(s->sock_fd, SOL_SOCKET, SO_NONBLOCK,
                   (void *)(&block), sizeof(int));
 #else
-#ifndef RISCOS
 #ifndef MS_WINDOWS
 #if defined(PYOS_OS2) && !defined(PYCC_GCC)
        block = !block;
@@ -702,10 +674,6 @@
        block = !block;
        ioctlsocket(s->sock_fd, FIONBIO, (u_long*)&block);
 #endif /* MS_WINDOWS */
-#else /* RISCOS */
-       block = !block;
-       socketioctl(s->sock_fd, FIONBIO, (u_long*)&block);
-#endif /* RISCOS */
 #endif /* __BEOS__ */
        Py_END_ALLOW_THREADS
 
@@ -778,9 +746,6 @@
 init_sockobject(PySocketSockObject *s,
                SOCKET_T fd, int family, int type, int proto)
 {
-#ifdef RISCOS
-       int block = 1;
-#endif
        s->sock_fd = fd;
        s->sock_family = family;
        s->sock_type = type;
@@ -792,10 +757,6 @@
        if (defaulttimeout >= 0.0)
                internal_setblocking(s, 0);
 
-#ifdef RISCOS
-       if (taskwindow)
-               socketioctl(s->sock_fd, 0x80046679, (u_long*)&block);
-#endif
 }
 
 
@@ -1700,30 +1661,6 @@
 operations. A timeout of None indicates that timeouts on socket \n\
 operations are disabled.");
 
-#ifdef RISCOS
-/* s.sleeptaskw(1 | 0) method */
-
-static PyObject *
-sock_sleeptaskw(PySocketSockObject *s,PyObject *arg)
-{
-       int block;
-       block = PyInt_AsLong(arg);
-       if (block == -1 && PyErr_Occurred())
-               return NULL;
-       Py_BEGIN_ALLOW_THREADS
-       socketioctl(s->sock_fd, 0x80046679, (u_long*)&block);
-       Py_END_ALLOW_THREADS
-
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-PyDoc_STRVAR(sleeptaskw_doc,
-"sleeptaskw(flag)\n\
-\n\
-Allow sleeps in taskwindows.");
-#endif
-
-
 /* s.setsockopt() method.
    With an integer third argument, sets an integer option.
    With a string third argument, sets an option from a buffer;
@@ -2749,10 +2686,6 @@
                          setsockopt_doc},
        {"shutdown",      (PyCFunction)sock_shutdown, METH_O,
                          shutdown_doc},
-#ifdef RISCOS
-       {"sleeptaskw",    (PyCFunction)sock_sleeptaskw, METH_O,
-                         sleeptaskw_doc},
-#endif
        {NULL,                  NULL}           /* sentinel */
 };
 
@@ -2963,11 +2896,7 @@
 
        if (h == NULL) {
                /* Let's get real error message to return */
-#ifndef RISCOS
                set_herror(h_errno);
-#else
-               PyErr_SetString(socket_error, "host not found");
-#endif
                return NULL;
        }
 
@@ -4016,24 +3945,6 @@
 };
 
 
-#ifdef RISCOS
-#define OS_INIT_DEFINED
-
-static int
-os_init(void)
-{
-       _kernel_swi_regs r;
-
-       r.r[0] = 0;
-       _kernel_swi(0x43380, &r, &r);
-       taskwindow = r.r[0];
-
-       return 1;
-}
-
-#endif /* RISCOS */
-
-
 #ifdef MS_WINDOWS
 #define OS_INIT_DEFINED
 

Modified: python/branches/py3k/Modules/timemodule.c
==============================================================================
--- python/branches/py3k/Modules/timemodule.c   (original)
+++ python/branches/py3k/Modules/timemodule.c   Thu Aug 16 16:35:24 2007
@@ -87,10 +87,6 @@
 #include <kernel/OS.h>
 #endif
 
-#ifdef RISCOS
-extern int riscos_sleep(double);
-#endif
-
 /* Forward declarations */
 static int floatsleep(double);
 static double floattime(void);
@@ -983,14 +979,6 @@
                }
                Py_END_ALLOW_THREADS
        }
-#elif defined(RISCOS)
-       if (secs <= 0.0)
-               return 0;
-       Py_BEGIN_ALLOW_THREADS
-       /* This sleep *CAN BE* interrupted. */
-       if ( riscos_sleep(secs) )
-               return -1;
-       Py_END_ALLOW_THREADS
 #elif defined(PLAN9)
        {
                double millisecs = secs * 1000.0;

Modified: python/branches/py3k/Modules/zipimport.c
==============================================================================
--- python/branches/py3k/Modules/zipimport.c    (original)
+++ python/branches/py3k/Modules/zipimport.c    Thu Aug 16 16:35:24 2007
@@ -92,7 +92,6 @@
        path = NULL;
        prefix = NULL;
        for (;;) {
-#ifndef RISCOS
                struct stat statbuf;
                int rv;
 
@@ -104,15 +103,6 @@
                                path = buf;
                        break;
                }
-#else
-               if (object_exists(buf)) {
-                       /* it exists */
-                       if (isfile(buf))
-                               /* it's a file */
-                               path = buf;
-                       break;
-               }
-#endif
                /* back up one path element */
                p = strrchr(buf, SEP);
                if (prefix != NULL)

Modified: python/branches/py3k/Modules/zlib/README
==============================================================================
--- python/branches/py3k/Modules/zlib/README    (original)
+++ python/branches/py3k/Modules/zlib/README    Thu Aug 16 16:35:24 2007
@@ -74,7 +74,7 @@
 - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
   other compilers. Use "make test" to check your compiler.
 
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
+- gzdopen is not supported on BEOS and by some Mac compilers.
 
 - For PalmOs, see http://palmzlib.sourceforge.net/
 

Modified: python/branches/py3k/Modules/zlib/example.c
==============================================================================
--- python/branches/py3k/Modules/zlib/example.c (original)
+++ python/branches/py3k/Modules/zlib/example.c Thu Aug 16 16:35:24 2007
@@ -13,7 +13,7 @@
 #  include <stdlib.h>
 #endif
 
-#if defined(VMS) || defined(RISCOS)
+#if defined(VMS)
 #  define TESTFILE "foo-gz"
 #else
 #  define TESTFILE "foo.gz"

Modified: python/branches/py3k/Modules/zlib/minigzip.c
==============================================================================
--- python/branches/py3k/Modules/zlib/minigzip.c        (original)
+++ python/branches/py3k/Modules/zlib/minigzip.c        Thu Aug 16 16:35:24 2007
@@ -41,11 +41,6 @@
 #  define unlink delete
 #  define GZ_SUFFIX "-gz"
 #endif
-#ifdef RISCOS
-#  define unlink remove
-#  define GZ_SUFFIX "-gz"
-#  define fileno(file) file->__file
-#endif
 #if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
 #  include <unix.h> /* for fileno */
 #endif

Modified: python/branches/py3k/Modules/zlib/zutil.h
==============================================================================
--- python/branches/py3k/Modules/zlib/zutil.h   (original)
+++ python/branches/py3k/Modules/zlib/zutil.h   Thu Aug 16 16:35:24 2007
@@ -147,7 +147,7 @@
 #  define OS_CODE  0x0f
 #endif
 
-#if defined(_BEOS_) || defined(RISCOS)
+#if defined(_BEOS_)
 #  define fdopen(fd,mode) NULL /* No fdopen() */
 #endif
 

Modified: python/branches/py3k/Parser/grammar.c
==============================================================================
--- python/branches/py3k/Parser/grammar.c       (original)
+++ python/branches/py3k/Parser/grammar.c       Thu Aug 16 16:35:24 2007
@@ -9,10 +9,6 @@
 #include "token.h"
 #include "grammar.h"
 
-#ifdef RISCOS
-#include <unixlib.h>
-#endif
-
 extern int Py_DebugFlag;
 
 grammar *

Modified: python/branches/py3k/Parser/intrcheck.c
==============================================================================
--- python/branches/py3k/Parser/intrcheck.c     (original)
+++ python/branches/py3k/Parser/intrcheck.c     Thu Aug 16 16:35:24 2007
@@ -126,11 +126,7 @@
        case 0:
                break;
        case 1:
-#ifdef RISCOS
-               fprintf(stderr, message);
-#else
                write(2, message, strlen(message));
-#endif
                break;
        case 2:
                interrupted = 0;

Modified: python/branches/py3k/Parser/myreadline.c
==============================================================================
--- python/branches/py3k/Parser/myreadline.c    (original)
+++ python/branches/py3k/Parser/myreadline.c    Thu Aug 16 16:35:24 2007
@@ -29,10 +29,6 @@
 
 int (*PyOS_InputHook)(void) = NULL;
 
-#ifdef RISCOS
-int Py_RISCOSWimpFlag;
-#endif
-
 /* This function restarts a fgets() after an EINTR error occurred
    except if PyOS_InterruptOccurred() returns true. */
 
@@ -114,17 +110,8 @@
        if ((p = (char *)PyMem_MALLOC(n)) == NULL)
                return NULL;
        fflush(sys_stdout);
-#ifndef RISCOS
        if (prompt)
                fprintf(stderr, "%s", prompt);
-#else
-       if (prompt) {
-               if(Py_RISCOSWimpFlag)
-                       fprintf(stderr, "\x0cr%s\x0c", prompt);
-               else
-                       fprintf(stderr, "%s", prompt);
-       }
-#endif
        fflush(stderr);
        switch (my_fgets(p, (int)n, sys_stdin)) {
        case 0: /* Normal case */

Modified: python/branches/py3k/Python/bltinmodule.c
==============================================================================
--- python/branches/py3k/Python/bltinmodule.c   (original)
+++ python/branches/py3k/Python/bltinmodule.c   Thu Aug 16 16:35:24 2007
@@ -8,10 +8,6 @@
 
 #include <ctype.h>
 
-#ifdef RISCOS
-#include "unixstuff.h"
-#endif
-
 /* The default encoding used by the platform file system APIs
    Can remain NULL for all platforms that don't have such a concept
 */

Modified: python/branches/py3k/Python/import.c
==============================================================================
--- python/branches/py3k/Python/import.c        (original)
+++ python/branches/py3k/Python/import.c        Thu Aug 16 16:35:24 2007
@@ -94,13 +94,6 @@
 /* these tables define the module suffixes that Python recognizes */
 struct filedescr * _PyImport_Filetab = NULL;
 
-#ifdef RISCOS
-static const struct filedescr _PyImport_StandardFiletab[] = {
-       {"/py", "U", PY_SOURCE},
-       {"/pyc", "rb", PY_COMPILED},
-       {0, 0}
-};
-#else
 static const struct filedescr _PyImport_StandardFiletab[] = {
        {".py", "U", PY_SOURCE},
 #ifdef MS_WINDOWS
@@ -109,7 +102,6 @@
        {".pyc", "rb", PY_COMPILED},
        {0, 0}
 };
-#endif
 
 static PyTypeObject NullImporterType;  /* Forward reference */
 
@@ -144,13 +136,8 @@
        if (Py_OptimizeFlag) {
                /* Replace ".pyc" with ".pyo" in _PyImport_Filetab */
                for (; filetab->suffix != NULL; filetab++) {
-#ifndef RISCOS
                        if (strcmp(filetab->suffix, ".pyc") == 0)
                                filetab->suffix = ".pyo";
-#else
-                       if (strcmp(filetab->suffix, "/pyc") == 0)
-                               filetab->suffix = "/pyo";
-#endif
                }
        }
 
@@ -1131,9 +1118,7 @@
        char *filemode;
        FILE *fp = NULL;
        PyObject *path_hooks, *path_importer_cache;
-#ifndef RISCOS
        struct stat statbuf;
-#endif
        static struct filedescr fd_frozen = {"", "", PY_FROZEN};
        static struct filedescr fd_builtin = {"", "", C_BUILTIN};
        static struct filedescr fd_package = {"", "", PKG_DIRECTORY};
@@ -1326,25 +1311,6 @@
                                }
                        }
                }
-#else
-               /* XXX How are you going to test for directories? */
-#ifdef RISCOS
-               if (isdir(buf) &&
-                   case_ok(buf, len, namelen, name)) {
-                       if (find_init_module(buf)) {
-                               return &fd_package;
-                       }
-                       else {
-                               char warnstr[MAXPATHLEN+80];
-                               sprintf(warnstr, "Not importing directory "
-                                       "'%.*s': missing __init__.py", 
-                                       MAXPATHLEN, buf);
-                               if (PyErr_WarnEx(PyExc_ImportWarning,
-                                                warnstr, 1)) {
-                                       return NULL;
-                               }
-               }
-#endif
 #endif
 #if defined(PYOS_OS2)
                /* take a snapshot of the module spec for restoration
@@ -1480,9 +1446,6 @@
 #define INCL_DOSERRORS
 #define INCL_NOPMAPI
 #include <os2.h>
-
-#elif defined(RISCOS)
-#include "oslib/osfscontrol.h"
 #endif
 
 static int
@@ -1568,31 +1531,6 @@
        }
        return 0 ; /* Not found */
 
-/* RISC OS */
-#elif defined(RISCOS)
-       char canon[MAXPATHLEN+1]; /* buffer for the canonical form of the path 
*/
-       char buf2[MAXPATHLEN+2];
-       char *nameWithExt = buf+len-namelen;
-       int canonlen;
-       os_error *e;
-
-       if (Py_GETENV("PYTHONCASEOK") != NULL)
-               return 1;
-
-       /* workaround:
-          append wildcard, otherwise case of filename wouldn't be touched */
-       strcpy(buf2, buf);
-       strcat(buf2, "*");
-
-       e = 
xosfscontrol_canonicalise_path(buf2,canon,0,0,MAXPATHLEN+1,&canonlen);
-       canonlen = MAXPATHLEN+1-canonlen;
-       if (e || canonlen<=0 || canonlen>(MAXPATHLEN+1) )
-               return 0;
-       if (strcmp(nameWithExt, canon+canonlen-strlen(nameWithExt))==0)
-               return 1; /* match */
-
-       return 0;
-
 /* OS/2 */
 #elif defined(PYOS_OS2)
        HDIR hdir = 1;
@@ -1668,38 +1606,6 @@
        return 0;
 }
 
-#else
-
-#ifdef RISCOS
-static int
-find_init_module(buf)
-       char *buf;
-{
-       int save_len = strlen(buf);
-       int i = save_len;
-
-       if (save_len + 13 >= MAXPATHLEN)
-               return 0;
-       buf[i++] = SEP;
-       strcpy(buf+i, "__init__/py");
-       if (isfile(buf)) {
-               buf[save_len] = '\0';
-               return 1;
-       }
-
-       if (Py_OptimizeFlag)
-               strcpy(buf+i, "o");
-       else
-               strcpy(buf+i, "c");
-       if (isfile(buf)) {
-               buf[save_len] = '\0';
-               return 1;
-       }
-       buf[save_len] = '\0';
-       return 0;
-}
-#endif /*RISCOS*/
-
 #endif /* HAVE_STAT */
 
 
@@ -3007,7 +2913,6 @@
                PyErr_SetString(PyExc_ImportError, "empty pathname");
                return -1;
        } else {
-#ifndef RISCOS
                struct stat statbuf;
                int rv;
 
@@ -3021,17 +2926,6 @@
                                return -1;
                        }
                }
-#else
-               if (object_exists(path)) {
-                       /* it exists */
-                       if (isdir(path)) {
-                               /* it's a directory */
-                               PyErr_SetString(PyExc_ImportError,
-                                               "existing directory");
-                               return -1;
-                       }
-               }
-#endif
        }
        return 0;
 }

Modified: python/branches/py3k/Python/sysmodule.c
==============================================================================
--- python/branches/py3k/Python/sysmodule.c     (original)
+++ python/branches/py3k/Python/sysmodule.c     Thu Aug 16 16:35:24 2007
@@ -1290,11 +1290,7 @@
                        p = strrchr(argv0, SEP);
                }
                if (p != NULL) {
-#ifndef RISCOS
                        n = p + 1 - argv0;
-#else /* don't include trailing separator */
-                       n = p - argv0;
-#endif /* RISCOS */
 #if SEP == '/' /* Special case for Unix filename syntax */
                        if (n > 1)
                                n--; /* Drop trailing separator */

Modified: python/branches/py3k/README
==============================================================================
--- python/branches/py3k/README (original)
+++ python/branches/py3k/README Thu Aug 16 16:35:24 2007
@@ -1248,7 +1248,6 @@
 Parser/         The parser and tokenizer and their input handling
 Python/         The byte-compiler and interpreter
 README          The file you're reading now
-RISCOS/         Files specific to RISC OS port
 Tools/          Some useful programs written in Python
 pyconfig.h.in   Source from which pyconfig.h is created (GNU autoheader output)
 configure       Configuration shell script (GNU autoconf output)
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to