Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
diff --git a/Lib/plat-riscos/riscospath.py b/Lib/plat-riscos/riscospath.py
index c875a4f..27b5732 100644
--- a/Lib/plat-riscos/riscospath.py
+++ b/Lib/plat-riscos/riscospath.py
@@ -15,7 +15,7 @@
 # strings representing various path-related bits and pieces
 curdir = '@'
 pardir = '^'
-extsep = '.'
+extsep = '/'
 sep = '.'
 pathsep = ','
 defpath = '<Run$Dir>'
diff --git a/Lib/site.py b/Lib/site.py
index e862fc2..13522b1 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -162,7 +162,7 @@
     prefixes.append(sys.exec_prefix)
 for prefix in prefixes:
     if prefix:
-        if sys.platform == 'os2emx':
+        if sys.platform in ('os2emx', 'riscos'):
             sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
         elif os.sep == '/':
             sitedirs = [os.path.join(prefix,
diff --git a/Lib/socket.py b/Lib/socket.py
index 2ee0796..9598f99 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -96,7 +96,6 @@
     errorTab[10065] = "The host is unreachable."
     __all__.append("errorTab")
 
-del os, sys
 
 
 def getfqdn(name=''):
@@ -139,6 +138,9 @@
     'sendall', 'setblocking',
     'settimeout', 'gettimeout', 'shutdown')
 
+if sys.platform == "riscos":
+    _socketmethods = _socketmethods + ('sleeptaskw',)
+
 class _closedsocket(object):
     __slots__ = []
     def _dummy(*args):
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 3220b20..24b0aea 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -726,8 +726,10 @@
         """
         test_al
         test_asynchat
+        test_atexit
         test_bsddb
         test_bsddb185
+        test_bsddb3
         test_cd
         test_cl
         test_commands
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index 5280ba8..61f8047 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -11,7 +11,7 @@
 import bz2
 from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor
 
-has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx")
+has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx", "riscos")
 
 class BaseTest(unittest.TestCase):
     "Base for other testcases."
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 24ae9e3..83e680f 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -3,7 +3,7 @@
 from test.test_support import TestFailed, TESTFN, unlink
 from types import ClassType
 import warnings
-import sys, traceback
+import sys, traceback, os
 
 print '5. Built-in exceptions'
 # XXX This is not really enough, each *operation* should be tested!
@@ -185,7 +185,7 @@
         exc, err, tb = sys.exc_info()
         co = tb.tb_frame.f_code
         assert co.co_name == "test_capi1"
-        assert co.co_filename.endswith('test_exceptions.py')
+        assert co.co_filename.endswith('test_exceptions'+os.extsep+'py')
     else:
         print "Expected exception"
 
@@ -197,7 +197,7 @@
         exc, err, tb = sys.exc_info()
         co = tb.tb_frame.f_code
         assert co.co_name == "__init__"
-        assert co.co_filename.endswith('test_exceptions.py')
+        assert co.co_filename.endswith('test_exceptions'+os.extsep+'py')
         co2 = tb.tb_frame.f_back.f_code
         assert co2.co_name == "test_capi2"
     else:
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index f946445..cc424af 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -78,7 +78,7 @@
 
 def test_module_with_large_stack(module):
     # create module w/list of 65000 elements to test bug #561858
-    filename = module + '.py'
+    filename = module + os.extsep + 'py'
 
     # create a file with a list of 65000 elements
     f = open(filename, 'w+')
@@ -102,8 +102,8 @@
 
     # cleanup
     del sys.path[-1]
-    for ext in '.pyc', '.pyo':
-        fname = module + ext
+    for ext in 'pyc', 'pyo':
+        fname = module + os.extsep + ext
         if os.path.exists(fname):
             os.unlink(fname)
 
diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
index 94d07d5..f8d2786 100644
--- a/Lib/test/test_normalization.py
+++ b/Lib/test/test_normalization.py
@@ -3,7 +3,7 @@
 import os
 from unicodedata import normalize
 
-TESTDATAFILE = "NormalizationTest.txt"
+TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
 
 # This search allows using a build directory just inside the source
 # directory, and saving just one copy of the test data in the source
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py
index 1bc2ba9..6a00fe4 100644
--- a/Lib/test/test_select.py
+++ b/Lib/test/test_select.py
@@ -42,7 +42,7 @@
 
 def test():
     import sys
-    if sys.platform[:3] in ('win', 'mac', 'os2'):
+    if sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'):
         if verbose:
             print "Can't test select easily on", sys.platform
         return
diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py
index 8ef511e..f852be5 100644
--- a/Lib/test/test_shelve.py
+++ b/Lib/test/test_shelve.py
@@ -6,7 +6,7 @@
 
 class TestCase(unittest.TestCase):
 
-    fn = "shelftemp.db"
+    fn = "shelftemp" + os.extsep + "db"
 
     def test_ascii_file_shelf(self):
         try:
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 9c36cf6..57bca38 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -56,14 +56,14 @@
     import os
     for dirname in sys.path:
         try:
-            os.unlink(os.path.join(dirname, modname + '.pyc'))
+            os.unlink(os.path.join(dirname, modname + os.extsep + 'pyc'))
         except os.error:
             pass
         # 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.
         try:
-            os.unlink(os.path.join(dirname, modname + '.pyo'))
+            os.unlink(os.path.join(dirname, modname + os.extsep + 'pyo'))
         except os.error:
             pass
 
@@ -118,7 +118,9 @@
 if os.name == 'java':
     # Jython disallows @ in module names
     TESTFN = '$test'
-elif os.name != 'riscos':
+elif os.name == 'riscos':
+    TESTFN = 'testfile'
+else:
     TESTFN = '@test'
     # Unicode name only used if TEST_FN_ENCODING exists for the platform.
     if have_unicode:
@@ -129,8 +131,6 @@
         else:
             TESTFN_UNICODE=unicode("@test-\xe0\xf2", "latin-1") # 2 latin characters.
         TESTFN_ENCODING=sys.getfilesystemencoding()
-else:
-    TESTFN = 'test'
 
 # Make sure we can write to TESTFN, try in /tmp if we can't
 fp = None
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 496dede..e259712 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -21,15 +21,15 @@
 def path(path):
     return test_support.findfile(path)
 
-testtar = path("testtar.tar")
-tempdir = path("testtar.dir")
-tempname = path("testtar.tmp")
+testtar = path("testtar" + os.extsep + "tar")
+tempdir = path("testtar" + os.extsep + "dir")
+tempname = path("testtar" + os.extsep + "tmp")
 membercount = 10
 
 def tarname(comp=""):
     if not comp:
         return testtar
-    return "%s.%s" % (testtar, comp)
+    return "%s%s%s" % (testtar, os.extsep, comp)
 
 def dirname():
     if not os.path.exists(tempdir):
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 04682db..26a2f1f 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -37,7 +37,7 @@
 TESTMOD = "ziptestmodule"
 TESTPACK = "ziptestpackage"
 TESTPACK2 = "ziptestpackage2"
-TEMP_ZIP = os.path.abspath("junk95142.zip")
+TEMP_ZIP = os.path.abspath("junk95142" + os.extsep + "zip")
 
 class UncompressedZipImportTestCase(ImportHooksBaseTestCase):