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

Skip to content

Commit 7a98be2

Browse files
author
Skip Montanaro
committed
Remove RISCOS support
1 parent c5aba17 commit 7a98be2

62 files changed

Lines changed: 106 additions & 3823 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/library/os.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.
6464

6565
The name of the operating system dependent module imported. The following names
6666
have currently been registered: ``'posix'``, ``'nt'``, ``'mac'``, ``'os2'``,
67-
``'ce'``, ``'java'``, ``'riscos'``.
67+
``'ce'``, ``'java'``.
6868

6969

7070
.. data:: path
@@ -1058,9 +1058,6 @@ Files and Directories
10581058
On Mac OS systems, the following attributes may also be available:
10591059
:attr:`st_rsize`, :attr:`st_creator`, :attr:`st_type`.
10601060

1061-
On RISCOS systems, the following attributes are also available: :attr:`st_ftype`
1062-
(file type), :attr:`st_attrs` (attributes), :attr:`st_obtype` (object type).
1063-
10641061
.. index:: module: stat
10651062

10661063
For backward compatibility, the return value of :func:`stat` is also accessible

Include/osdefs.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ extern "C" {
2323
#endif
2424
#endif
2525

26-
#ifdef RISCOS
27-
#define SEP '.'
28-
#define MAXPATHLEN 256
29-
#define DELIM ','
30-
#endif
31-
32-
3326
/* Filename separator */
3427
#ifndef SEP
3528
#define SEP '/'

Include/pyport.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,6 @@ typedef Py_intptr_t Py_ssize_t;
261261
#define HAVE_FSTAT
262262
#endif
263263

264-
#ifdef RISCOS
265-
#include <sys/types.h>
266-
#include "unixstuff.h"
267-
#endif
268-
269264
#ifdef HAVE_SYS_STAT_H
270265
#if defined(PYOS_OS2) && defined(PYCC_GCC)
271266
#include <sys/types.h>
@@ -677,8 +672,7 @@ extern double hypot(double, double);
677672
* Hide GCC attributes from compilers that don't support them.
678673
*/
679674
#if (!defined(__GNUC__) || __GNUC__ < 2 || \
680-
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) ) && \
681-
!defined(RISCOS)
675+
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) )
682676
#define Py_GCC_ATTRIBUTE(x)
683677
#else
684678
#define Py_GCC_ATTRIBUTE(x) __attribute__(x)

Lib/distutils/command/install_lib.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99

1010

1111
# Extension for Python source files.
12-
if hasattr(os, 'extsep'):
13-
PYTHON_SOURCE_EXTENSION = os.extsep + "py"
14-
else:
15-
PYTHON_SOURCE_EXTENSION = ".py"
12+
PYTHON_SOURCE_EXTENSION = ".py"
1613

1714
class install_lib (Command):
1815

Lib/dumbdbm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ def __init__(self, filebasename, mode):
5151
# where key is the string key, pos is the offset into the dat
5252
# file of the associated value's first byte, and siz is the number
5353
# of bytes in the associated value.
54-
self._dirfile = filebasename + _os.extsep + 'dir'
54+
self._dirfile = filebasename + '.dir'
5555

5656
# The data file is a binary file pointed into by the directory
5757
# file, and holds the values associated with keys. Each value
5858
# begins at a _BLOCKSIZE-aligned byte offset, and is a raw
5959
# binary 8-bit string value.
60-
self._datfile = filebasename + _os.extsep + 'dat'
61-
self._bakfile = filebasename + _os.extsep + 'bak'
60+
self._datfile = filebasename + '.dat'
61+
self._bakfile = filebasename + '.bak'
6262

6363
# The index is an in-memory dict, mirroring the directory file.
6464
self._index = None # maps keys to (pos, siz) pairs

Lib/fileinput.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def readline(self):
315315
else:
316316
if self._inplace:
317317
self._backupfilename = (
318-
self._filename + (self._backup or os.extsep+"bak"))
318+
self._filename + (self._backup or ".bak"))
319319
try: os.unlink(self._backupfilename)
320320
except os.error: pass
321321
# The next few lines may raise IOError

Lib/os.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- os.curdir is a string representing the current directory ('.' or ':')
88
- os.pardir is a string representing the parent directory ('..' or '::')
99
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
10-
- os.extsep is the extension separator ('.' or '/')
1110
- os.altsep is the alternate pathname separator (None or '/')
1211
- os.pathsep is the component separator used in $PATH etc
1312
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
@@ -131,8 +130,7 @@ def _get_exports_list(module):
131130
raise ImportError, 'no os specific module found'
132131

133132
sys.modules['os.path'] = path
134-
from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,
135-
devnull)
133+
from os.path import curdir, pardir, sep, pathsep, defpath, altsep, devnull
136134

137135
del _names
138136

Lib/pkgutil.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,8 @@ def extend_path(path, name):
510510
return path
511511

512512
pname = os.path.join(*name.split('.')) # Reconstitute as relative path
513-
# Just in case os.extsep != '.'
514-
sname = os.extsep.join(name.split('.'))
515-
sname_pkg = sname + os.extsep + "pkg"
516-
init_py = "__init__" + os.extsep + "py"
513+
sname_pkg = name + ".pkg"
514+
init_py = "__init__.py"
517515

518516
path = path[:] # Start with a copy of the existing path
519517

Lib/site.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def addsitedir(sitedir, known_paths=None):
167167
return
168168
names.sort()
169169
for name in names:
170-
if name.endswith(os.extsep + "pth"):
170+
if name.endswith(".pth"):
171171
addpackage(sitedir, name, known_paths)
172172
if reset:
173173
known_paths = None

Lib/test/regrtest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS):
509509
names = os.listdir(testdir)
510510
tests = []
511511
for name in names:
512-
if name[:5] == "test_" and name[-3:] == os.extsep+"py":
512+
if name[:5] == "test_" and name[-3:] == ".py":
513513
modname = name[:-3]
514514
if modname not in stdtests and modname not in nottests:
515515
tests.append(modname)
@@ -799,7 +799,7 @@ def findtestdir():
799799
return testdir
800800

801801
def removepy(name):
802-
if name.endswith(os.extsep + "py"):
802+
if name.endswith(".py"):
803803
name = name[:-3]
804804
return name
805805

0 commit comments

Comments
 (0)