Author: Brian Kearns <[email protected]>
Branch:
Changeset: r73416:2e37426702e6
Date: 2014-09-10 10:32 -0400
http://bitbucket.org/pypy/pypy/changeset/2e37426702e6/
Log: backout 5b5351812a83, breaks translation
diff --git a/rpython/rlib/rpath.py b/rpython/rlib/rpath.py
--- a/rpython/rlib/rpath.py
+++ b/rpython/rlib/rpath.py
@@ -4,7 +4,6 @@
import os, stat
from rpython.rlib import rposix
-from rpython.rlib.objectmodel import enforceargs
# ____________________________________________________________
@@ -12,7 +11,6 @@
# Generic implementations in RPython for both POSIX and NT
#
-@enforceargs(str)
def risdir(s):
"""Return true if the pathname refers to an existing directory."""
try:
@@ -27,12 +25,10 @@
# POSIX-only implementations
#
-@enforceargs(str)
def _posix_risabs(s):
"""Test whether a path is absolute"""
return s.startswith('/')
-@enforceargs(str)
def _posix_rnormpath(path):
"""Normalize path, eliminating double slashes, etc."""
slash, dot = '/', '.'
@@ -60,7 +56,6 @@
path = slash*initial_slashes + path
return path or dot
-@enforceargs(str)
def _posix_rabspath(path):
"""Return an absolute, **non-normalized** path.
**This version does not let exceptions propagate.**"""
@@ -72,7 +67,6 @@
except OSError:
return path
-@enforceargs(str, str)
def _posix_rjoin(a, b):
"""Join two pathname components, inserting '/' as needed.
If the second component is an absolute path, the first one
@@ -93,13 +87,11 @@
# NT-only implementations
#
-@enforceargs(str)
def _nt_risabs(s):
"""Test whether a path is absolute"""
s = _nt_rsplitdrive(s)[1]
return s.startswith('/') or s.startswith('\\')
-@enforceargs(str)
def _nt_rnormpath(path):
"""Normalize path, eliminating double slashes, etc."""
backslash, dot = '\\', '.'
@@ -150,7 +142,6 @@
comps.append(dot)
return prefix + backslash.join(comps)
-@enforceargs(str)
def _nt_rabspath(path):
try:
if path == '':
@@ -159,7 +150,6 @@
except OSError:
return path
-@enforceargs(str)
def _nt_rsplitdrive(p):
"""Split a pathname into drive/UNC sharepoint and relative path
specifiers.
@@ -187,7 +177,6 @@
return p[:2], p[2:]
return '', p
-@enforceargs(str, str)
def _nt_rjoin(path, p):
"""Join two or more pathname components, inserting "\\" as needed."""
result_drive, result_path = _nt_rsplitdrive(path)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit