Kaydet (Commit) ab3f5cba authored tarafından Ronald Oussoren's avatar Ronald Oussoren

A number of APIs in macostools cannot work in 64-bit mode because they

use Carbon APIs that aren't available there.

This patch disables tests for the affected entrypoints in macostools and
mentions this in the documentation.

In theory it is possible to replace the implementation by code that does
work in 64-bit mode, but that would require further updates to the Carbon
wrappers because the modern APIs aren't wrapped properly.
üst b0eb4d3e
...@@ -17,6 +17,8 @@ files, so it should not be used on UFS partitions. ...@@ -17,6 +17,8 @@ files, so it should not be used on UFS partitions.
This module has been removed in Python 3.0. This module has been removed in Python 3.0.
The :mod:`macostools` module defines the following functions: The :mod:`macostools` module defines the following functions:
...@@ -28,17 +30,30 @@ The :mod:`macostools` module defines the following functions: ...@@ -28,17 +30,30 @@ The :mod:`macostools` module defines the following functions:
modification and backup times (default is to copy them). Custom icons, comments modification and backup times (default is to copy them). Custom icons, comments
and icon position are not copied. and icon position are not copied.
.. note::
This function does not work in 64-bit code because it uses APIs that
are not available in 64-bit mode.
.. function:: copytree(src, dst) .. function:: copytree(src, dst)
Recursively copy a file tree from *src* to *dst*, creating folders as needed. Recursively copy a file tree from *src* to *dst*, creating folders as needed.
*src* and *dst* should be specified as pathnames. *src* and *dst* should be specified as pathnames.
.. note::
This function does not work in 64-bit code because it uses APIs that
are not available in 64-bit mode.
.. function:: mkalias(src, dst) .. function:: mkalias(src, dst)
Create a finder alias *dst* pointing to *src*. Create a finder alias *dst* pointing to *src*.
.. note::
This function does not work in 64-bit code because it uses APIs that
are not available in 64-bit mode.
.. function:: touched(dst) .. function:: touched(dst)
......
...@@ -59,6 +59,7 @@ class TestMacostools(unittest.TestCase): ...@@ -59,6 +59,7 @@ class TestMacostools(unittest.TestCase):
DeprecationWarning) DeprecationWarning)
macostools.touched(test_support.TESTFN) macostools.touched(test_support.TESTFN)
if sys.maxint < 2**32:
def test_copy(self): def test_copy(self):
try: try:
os.unlink(TESTFN2) os.unlink(TESTFN2)
...@@ -67,6 +68,7 @@ class TestMacostools(unittest.TestCase): ...@@ -67,6 +68,7 @@ class TestMacostools(unittest.TestCase):
macostools.copy(test_support.TESTFN, TESTFN2) macostools.copy(test_support.TESTFN, TESTFN2)
self.assertEqual(self.compareData(), '') self.assertEqual(self.compareData(), '')
if sys.maxint < 2**32:
def test_mkalias(self): def test_mkalias(self):
try: try:
os.unlink(TESTFN2) os.unlink(TESTFN2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment