Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
289bc057
Kaydet (Commit)
289bc057
authored
Agu 17, 2007
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
some RiscOS stuff I missed before (was only looking for "RISCOS")
üst
ceaafa66
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
57 additions
and
117 deletions
+57
-117
tempfile.rst
Doc/library/tempfile.rst
+0
-3
os.py
Lib/os.py
+49
-67
bundlebuilder.py
Lib/plat-mac/bundlebuilder.py
+1
-1
site.py
Lib/site.py
+1
-1
tempfile.py
Lib/tempfile.py
+0
-3
regrtest.py
Lib/test/regrtest.py
+0
-27
test_bz2.py
Lib/test/test_bz2.py
+1
-1
test_mhlib.py
Lib/test/test_mhlib.py
+1
-2
test_select.py
Lib/test/test_select.py
+1
-1
test_signal.py
Lib/test/test_signal.py
+1
-1
test_support.py
Lib/test/test_support.py
+0
-2
test_threadsignals.py
Lib/test/test_threadsignals.py
+1
-1
test_urllib2.py
Lib/test/test_urllib2.py
+0
-4
urllib.py
Lib/urllib.py
+0
-2
freeze.py
Tools/freeze/freeze.py
+1
-1
No files found.
Doc/library/tempfile.rst
Dosyayı görüntüle @
289bc057
...
@@ -171,9 +171,6 @@ function arguments, instead.
...
@@ -171,9 +171,6 @@ function arguments, instead.
#. A platform-specific location:
#. A platform-specific location:
* On RiscOS, the directory named by the :envvar:`Wimp$ScrapDir` environment
variable.
* On Windows, the directories :file:`C:\\TEMP`, :file:`C:\\TMP`,
* On Windows, the directories :file:`C:\\TEMP`, :file:`C:\\TMP`,
:file:`\\TEMP`, and :file:`\\TMP`, in that order.
:file:`\\TEMP`, and :file:`\\TMP`, in that order.
...
...
Lib/os.py
Dosyayı görüntüle @
289bc057
...
@@ -3,7 +3,7 @@ r"""OS routines for Mac, NT, or Posix depending on what system we're on.
...
@@ -3,7 +3,7 @@ r"""OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
This exports:
- all functions from posix, nt, os2, mac, or ce, e.g. unlink, stat, etc.
- all functions from posix, nt, os2, mac, or ce, e.g. unlink, stat, etc.
- os.path is one of the modules posixpath, ntpath, or macpath
- os.path is one of the modules posixpath, ntpath, or macpath
- os.name is 'posix', 'nt', 'os2', 'mac'
, 'ce' or 'riscos
'
- os.name is 'posix', 'nt', 'os2', 'mac'
or 'ce
'
- os.curdir is a string representing the current directory ('.' or ':')
- os.curdir is a string representing the current directory ('.' or ':')
- os.pardir is a string representing the parent 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.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
...
@@ -112,20 +112,6 @@ elif 'ce' in _names:
...
@@ -112,20 +112,6 @@ elif 'ce' in _names:
__all__
.
extend
(
_get_exports_list
(
ce
))
__all__
.
extend
(
_get_exports_list
(
ce
))
del
ce
del
ce
elif
'riscos'
in
_names
:
name
=
'riscos'
linesep
=
'
\n
'
from
riscos
import
*
try
:
from
riscos
import
_exit
except
ImportError
:
pass
import
riscospath
as
path
import
riscos
__all__
.
extend
(
_get_exports_list
(
riscos
))
del
riscos
else
:
else
:
raise
ImportError
,
'no os specific module found'
raise
ImportError
,
'no os specific module found'
...
@@ -404,62 +390,58 @@ def _execvpe(file, args, env=None):
...
@@ -404,62 +390,58 @@ def _execvpe(file, args, env=None):
raise
error
,
last_exc
,
tb
raise
error
,
last_exc
,
tb
if
name
==
"riscos"
:
# Change environ to automatically call putenv(), unsetenv if they exist.
# On RISC OS, all env access goes through getenv and putenv
from
_abcoll
import
MutableMapping
# Can't use collections (bootstrap)
from
riscosenviron
import
_Environ
else
:
class
_Environ
(
MutableMapping
):
# Change environ to automatically call putenv(), unsetenv if they exist.
def
__init__
(
self
,
environ
,
keymap
,
putenv
,
unsetenv
):
from
_abcoll
import
MutableMapping
# Can't use collections (bootstrap)
self
.
keymap
=
keymap
self
.
putenv
=
putenv
class
_Environ
(
MutableMapping
):
self
.
unsetenv
=
unsetenv
def
__init__
(
self
,
environ
,
keymap
,
putenv
,
unsetenv
):
self
.
data
=
data
=
{}
self
.
keymap
=
keymap
for
key
,
value
in
environ
.
items
():
self
.
putenv
=
putenv
data
[
keymap
(
key
)]
=
str
(
value
)
self
.
unsetenv
=
unsetenv
def
__getitem__
(
self
,
key
):
self
.
data
=
data
=
{}
return
self
.
data
[
self
.
keymap
(
key
)]
for
key
,
value
in
environ
.
items
():
def
__setitem__
(
self
,
key
,
value
):
data
[
keymap
(
key
)]
=
str
(
value
)
value
=
str
(
value
)
def
__getitem__
(
self
,
key
):
self
.
putenv
(
key
,
value
)
return
self
.
data
[
self
.
keymap
(
key
)]
self
.
data
[
self
.
keymap
(
key
)]
=
value
def
__setitem__
(
self
,
key
,
value
):
def
__delitem__
(
self
,
key
):
value
=
str
(
value
)
self
.
unsetenv
(
key
)
self
.
putenv
(
key
,
value
)
del
self
.
data
[
self
.
keymap
(
key
)]
self
.
data
[
self
.
keymap
(
key
)]
=
value
def
__iter__
(
self
):
def
__delitem__
(
self
,
key
):
for
key
in
self
.
data
:
self
.
unsetenv
(
key
)
yield
key
del
self
.
data
[
self
.
keymap
(
key
)]
def
__len__
(
self
):
def
__iter__
(
self
):
return
len
(
self
.
data
)
for
key
in
self
.
data
:
def
copy
(
self
):
yield
key
return
dict
(
self
)
def
__len__
(
self
):
def
setdefault
(
self
,
key
,
value
):
return
len
(
self
.
data
)
if
key
not
in
self
:
def
copy
(
self
):
self
[
key
]
=
value
return
dict
(
self
)
return
self
[
key
]
def
setdefault
(
self
,
key
,
value
):
if
key
not
in
self
:
self
[
key
]
=
value
return
self
[
key
]
try
:
try
:
_putenv
=
putenv
_putenv
=
putenv
except
NameError
:
except
NameError
:
_putenv
=
lambda
key
,
value
:
None
_putenv
=
lambda
key
,
value
:
None
else
:
else
:
__all__
.
append
(
"putenv"
)
__all__
.
append
(
"putenv"
)
try
:
try
:
_unsetenv
=
unsetenv
_unsetenv
=
unsetenv
except
NameError
:
except
NameError
:
_unsetenv
=
lambda
key
:
_putenv
(
key
,
""
)
_unsetenv
=
lambda
key
:
_putenv
(
key
,
""
)
else
:
else
:
__all__
.
append
(
"unsetenv"
)
__all__
.
append
(
"unsetenv"
)
if
name
in
(
'os2'
,
'nt'
):
# Where Env Var Names Must Be UPPERCASE
if
name
in
(
'os2'
,
'nt'
):
# Where Env Var Names Must Be UPPERCASE
_keymap
=
lambda
key
:
str
(
key
.
upper
())
_keymap
=
lambda
key
:
str
(
key
.
upper
())
else
:
# Where Env Var Names Can Be Mixed Case
else
:
# Where Env Var Names Can Be Mixed Case
_keymap
=
lambda
key
:
str
(
key
)
_keymap
=
lambda
key
:
str
(
key
)
environ
=
_Environ
(
environ
,
_keymap
,
_putenv
,
_unsetenv
)
environ
=
_Environ
(
environ
,
_keymap
,
_putenv
,
_unsetenv
)
def
getenv
(
key
,
default
=
None
):
def
getenv
(
key
,
default
=
None
):
...
...
Lib/plat-mac/bundlebuilder.py
Dosyayı görüntüle @
289bc057
...
@@ -272,7 +272,7 @@ del __load
...
@@ -272,7 +272,7 @@ del __load
MAYMISS_MODULES
=
[
'mac'
,
'os2'
,
'nt'
,
'ntpath'
,
'dos'
,
'dospath'
,
MAYMISS_MODULES
=
[
'mac'
,
'os2'
,
'nt'
,
'ntpath'
,
'dos'
,
'dospath'
,
'win32api'
,
'ce'
,
'_winreg'
,
'nturl2path'
,
'sitecustomize'
,
'win32api'
,
'ce'
,
'_winreg'
,
'nturl2path'
,
'sitecustomize'
,
'org.python.core'
,
'riscos'
,
'riscosenviron'
,
'riscospath'
'org.python.core'
]
]
STRIP_EXEC
=
"/usr/bin/strip"
STRIP_EXEC
=
"/usr/bin/strip"
...
...
Lib/site.py
Dosyayı görüntüle @
289bc057
...
@@ -180,7 +180,7 @@ def addsitepackages(known_paths):
...
@@ -180,7 +180,7 @@ def addsitepackages(known_paths):
prefixes
.
append
(
sys
.
exec_prefix
)
prefixes
.
append
(
sys
.
exec_prefix
)
for
prefix
in
prefixes
:
for
prefix
in
prefixes
:
if
prefix
:
if
prefix
:
if
sys
.
platform
in
(
'os2emx'
,
'riscos'
)
:
if
sys
.
platform
==
'os2emx'
:
sitedirs
=
[
os
.
path
.
join
(
prefix
,
"Lib"
,
"site-packages"
)]
sitedirs
=
[
os
.
path
.
join
(
prefix
,
"Lib"
,
"site-packages"
)]
elif
os
.
sep
==
'/'
:
elif
os
.
sep
==
'/'
:
sitedirs
=
[
os
.
path
.
join
(
prefix
,
sitedirs
=
[
os
.
path
.
join
(
prefix
,
...
...
Lib/tempfile.py
Dosyayı görüntüle @
289bc057
...
@@ -159,9 +159,6 @@ def _candidate_tempdir_list():
...
@@ -159,9 +159,6 @@ def _candidate_tempdir_list():
dirlist
.
append
(
dirname
)
dirlist
.
append
(
dirname
)
except
_Folder
.
error
:
except
_Folder
.
error
:
pass
pass
elif
_os
.
name
==
'riscos'
:
dirname
=
_os
.
getenv
(
'Wimp$ScrapDir'
)
if
dirname
:
dirlist
.
append
(
dirname
)
elif
_os
.
name
==
'nt'
:
elif
_os
.
name
==
'nt'
:
dirlist
.
extend
([
r'c:\temp'
,
r'c:\tmp'
,
r'\temp'
,
r'\tmp'
])
dirlist
.
extend
([
r'c:\temp'
,
r'c:\tmp'
,
r'\temp'
,
r'\tmp'
])
else
:
else
:
...
...
Lib/test/regrtest.py
Dosyayı görüntüle @
289bc057
...
@@ -947,33 +947,6 @@ _expectations = {
...
@@ -947,33 +947,6 @@ _expectations = {
test_threadedtempfile
test_threadedtempfile
test_threading
test_threading
"""
,
"""
,
'riscos'
:
"""
test_asynchat
test_atexit
test_bsddb
test_bsddb3
test_commands
test_crypt
test_dbm
test_dl
test_fcntl
test_fork1
test_gdbm
test_grp
test_largefile
test_locale
test_mmap
test_openpty
test_poll
test_pty
test_pwd
test_sundry
test_thread
test_threaded_import
test_threadedtempfile
test_threading
"""
,
'darwin'
:
'darwin'
:
"""
"""
test__locale
test__locale
...
...
Lib/test/test_bz2.py
Dosyayı görüntüle @
289bc057
...
@@ -11,7 +11,7 @@ import sys
...
@@ -11,7 +11,7 @@ import sys
import
bz2
import
bz2
from
bz2
import
BZ2File
,
BZ2Compressor
,
BZ2Decompressor
from
bz2
import
BZ2File
,
BZ2Compressor
,
BZ2Decompressor
has_cmdline_bunzip2
=
sys
.
platform
not
in
(
"win32"
,
"os2emx"
,
"riscos"
)
has_cmdline_bunzip2
=
sys
.
platform
not
in
(
"win32"
,
"os2emx"
)
class
BaseTest
(
unittest
.
TestCase
):
class
BaseTest
(
unittest
.
TestCase
):
"Base for other testcases."
"Base for other testcases."
...
...
Lib/test/test_mhlib.py
Dosyayı görüntüle @
289bc057
...
@@ -13,8 +13,7 @@ import io
...
@@ -13,8 +13,7 @@ import io
import
sys
import
sys
import
mhlib
import
mhlib
if
(
sys
.
platform
.
startswith
(
"win"
)
or
sys
.
platform
==
"riscos"
or
if
sys
.
platform
.
startswith
(
"win"
)
or
sys
.
platform
.
startswith
(
"atheos"
):
sys
.
platform
.
startswith
(
"atheos"
)):
# mhlib.updateline() renames a file to the name of a file that already
# mhlib.updateline() renames a file to the name of a file that already
# exists. That causes a reasonable OS <wink> to complain in test_sequence
# exists. That causes a reasonable OS <wink> to complain in test_sequence
# here, like the "OSError: [Errno 17] File exists" raised on Windows.
# here, like the "OSError: [Errno 17] File exists" raised on Windows.
...
...
Lib/test/test_select.py
Dosyayı görüntüle @
289bc057
...
@@ -42,7 +42,7 @@ else:
...
@@ -42,7 +42,7 @@ else:
def
test
():
def
test
():
import
sys
import
sys
if
sys
.
platform
[:
3
]
in
(
'win'
,
'mac'
,
'os2'
,
'riscos'
):
if
sys
.
platform
[:
3
]
in
(
'win'
,
'mac'
,
'os2'
):
if
verbose
:
if
verbose
:
print
(
"Can't test select easily on"
,
sys
.
platform
)
print
(
"Can't test select easily on"
,
sys
.
platform
)
return
return
...
...
Lib/test/test_signal.py
Dosyayı görüntüle @
289bc057
...
@@ -3,7 +3,7 @@ from test.test_support import verbose, TestSkipped, TestFailed, vereq
...
@@ -3,7 +3,7 @@ from test.test_support import verbose, TestSkipped, TestFailed, vereq
import
signal
import
signal
import
os
,
sys
,
time
import
os
,
sys
,
time
if
sys
.
platform
[:
3
]
in
(
'win'
,
'os2'
)
or
sys
.
platform
==
'riscos'
:
if
sys
.
platform
[:
3
]
in
(
'win'
,
'os2'
):
raise
TestSkipped
,
"Can't test signal on
%
s"
%
sys
.
platform
raise
TestSkipped
,
"Can't test signal on
%
s"
%
sys
.
platform
MAX_DURATION
=
20
# Entire test should last at most 20 sec.
MAX_DURATION
=
20
# Entire test should last at most 20 sec.
...
...
Lib/test/test_support.py
Dosyayı görüntüle @
289bc057
...
@@ -142,8 +142,6 @@ is_jython = sys.platform.startswith('java')
...
@@ -142,8 +142,6 @@ is_jython = sys.platform.startswith('java')
if
os
.
name
==
'java'
:
if
os
.
name
==
'java'
:
# Jython disallows @ in module names
# Jython disallows @ in module names
TESTFN
=
'$test'
TESTFN
=
'$test'
elif
os
.
name
==
'riscos'
:
TESTFN
=
'testfile'
else
:
else
:
TESTFN
=
'@test'
TESTFN
=
'@test'
...
...
Lib/test/test_threadsignals.py
Dosyayı görüntüle @
289bc057
...
@@ -7,7 +7,7 @@ import os
...
@@ -7,7 +7,7 @@ import os
import
sys
import
sys
from
test.test_support
import
run_unittest
,
TestSkipped
from
test.test_support
import
run_unittest
,
TestSkipped
if
sys
.
platform
[:
3
]
in
(
'win'
,
'os2'
)
or
sys
.
platform
==
'riscos'
:
if
sys
.
platform
[:
3
]
in
(
'win'
,
'os2'
):
raise
TestSkipped
,
"Can't test signal on
%
s"
%
sys
.
platform
raise
TestSkipped
,
"Can't test signal on
%
s"
%
sys
.
platform
process_pid
=
os
.
getpid
()
process_pid
=
os
.
getpid
()
...
...
Lib/test/test_urllib2.py
Dosyayı görüntüle @
289bc057
...
@@ -26,10 +26,6 @@ class TrivialTests(unittest.TestCase):
...
@@ -26,10 +26,6 @@ class TrivialTests(unittest.TestCase):
# urllib.pathname2url works, unfortunately...
# urllib.pathname2url works, unfortunately...
if
os
.
name
==
'mac'
:
if
os
.
name
==
'mac'
:
fname
=
'/'
+
fname
.
replace
(
':'
,
'/'
)
fname
=
'/'
+
fname
.
replace
(
':'
,
'/'
)
elif
os
.
name
==
'riscos'
:
import
string
fname
=
os
.
expand
(
fname
)
fname
=
fname
.
translate
(
string
.
maketrans
(
"/."
,
"./"
))
file_url
=
"file://
%
s"
%
fname
file_url
=
"file://
%
s"
%
fname
f
=
urllib2
.
urlopen
(
file_url
)
f
=
urllib2
.
urlopen
(
file_url
)
...
...
Lib/urllib.py
Dosyayı görüntüle @
289bc057
...
@@ -46,8 +46,6 @@ if os.name == 'mac':
...
@@ -46,8 +46,6 @@ if os.name == 'mac':
from
macurl2path
import
url2pathname
,
pathname2url
from
macurl2path
import
url2pathname
,
pathname2url
elif
os
.
name
==
'nt'
:
elif
os
.
name
==
'nt'
:
from
nturl2path
import
url2pathname
,
pathname2url
from
nturl2path
import
url2pathname
,
pathname2url
elif
os
.
name
==
'riscos'
:
from
rourl2path
import
url2pathname
,
pathname2url
else
:
else
:
def
url2pathname
(
pathname
):
def
url2pathname
(
pathname
):
"""OS-specific conversion from a relative URL of the 'file' scheme
"""OS-specific conversion from a relative URL of the 'file' scheme
...
...
Tools/freeze/freeze.py
Dosyayı görüntüle @
289bc057
...
@@ -125,7 +125,7 @@ def main():
...
@@ -125,7 +125,7 @@ def main():
# default the exclude list for each platform
# default the exclude list for each platform
if
win
:
exclude
=
exclude
+
[
if
win
:
exclude
=
exclude
+
[
'dos'
,
'dospath'
,
'mac'
,
'macpath'
,
'macfs'
,
'MACFS'
,
'posix'
,
'dos'
,
'dospath'
,
'mac'
,
'macpath'
,
'macfs'
,
'MACFS'
,
'posix'
,
'os2'
,
'ce'
,
'riscos'
,
'riscosenviron'
,
'riscospath'
,
'os2'
,
'ce'
,
]
]
fail_import
=
exclude
[:]
fail_import
=
exclude
[:]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment