Kaydet (Commit) d69fe2a8 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

Merged revisions 77712,77740-77741,77756,77886,77902,77936 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77712 | tarek.ziade | 2010-01-23 11:52:57 -0600 (Sat, 23 Jan 2010) | 1 line

  fixed the 64bits tests for get_platform() - mac osx
........
  r77740 | benjamin.peterson | 2010-01-24 21:58:21 -0600 (Sun, 24 Jan 2010) | 1 line

  compare types with is not ==
........
  r77741 | facundo.batista | 2010-01-25 00:15:01 -0600 (Mon, 25 Jan 2010) | 3 lines

  Added a note about Event.is_set() syntax being new to 2.6
........
  r77756 | tarek.ziade | 2010-01-26 11:20:37 -0600 (Tue, 26 Jan 2010) | 1 line

  fixed bdist_msi imports and added a test module for distutils.command.bdist_msi
........
  r77886 | benjamin.peterson | 2010-01-31 12:09:34 -0600 (Sun, 31 Jan 2010) | 1 line

  move distutils.rst to different toc
........
  r77902 | andrew.kuchling | 2010-01-31 20:04:26 -0600 (Sun, 31 Jan 2010) | 1 line

  Add various items
........
  r77936 | andrew.kuchling | 2010-02-02 20:19:14 -0600 (Tue, 02 Feb 2010) | 1 line

  Add various items
........
üst f044812f
...@@ -26,4 +26,3 @@ These modules include: ...@@ -26,4 +26,3 @@ These modules include:
compileall.rst compileall.rst
dis.rst dis.rst
pickletools.rst pickletools.rst
distutils.rst
...@@ -25,3 +25,4 @@ overview: ...@@ -25,3 +25,4 @@ overview:
inspect.rst inspect.rst
site.rst site.rst
fpectl.rst fpectl.rst
distutils.rst
...@@ -647,6 +647,9 @@ An event object manages an internal flag that can be set to true with the ...@@ -647,6 +647,9 @@ An event object manages an internal flag that can be set to true with the
Return true if and only if the internal flag is true. Return true if and only if the internal flag is true.
.. versionchanged:: 2.6
The ``is_set()`` syntax is new.
.. method:: set() .. method:: set()
Set the internal flag to true. All threads waiting for it to become true Set the internal flag to true. All threads waiting for it to become true
......
This diff is collapsed.
...@@ -3600,12 +3600,12 @@ class Decimal(object): ...@@ -3600,12 +3600,12 @@ class Decimal(object):
return (self.__class__, (str(self),)) return (self.__class__, (str(self),))
def __copy__(self): def __copy__(self):
if type(self) == Decimal: if type(self) is Decimal:
return self # I'm immutable; therefore I am my own clone return self # I'm immutable; therefore I am my own clone
return self.__class__(str(self)) return self.__class__(str(self))
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
if type(self) == Decimal: if type(self) is Decimal:
return self # My components are also immutable return self # My components are also immutable
return self.__class__(str(self)) return self.__class__(str(self))
......
...@@ -7,15 +7,12 @@ ...@@ -7,15 +7,12 @@
Implements the bdist_msi command. Implements the bdist_msi command.
""" """
import sys, os import sys, os
from sysconfig import get_python_version from sysconfig import get_python_version, get_platform
import sys, os
from distutils.core import Command from distutils.core import Command
from distutils.dir_util import remove_tree from distutils.dir_util import remove_tree
from distutils.sysconfig import get_python_version
from distutils.version import StrictVersion from distutils.version import StrictVersion
from distutils.errors import DistutilsOptionError from distutils.errors import DistutilsOptionError
from distutils.util import get_platform
from distutils import log from distutils import log
import msilib import msilib
......
"""Tests for distutils.command.bdist_msi."""
import unittest
import sys
from distutils.tests import support
@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
class BDistMSITestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
def test_minial(self):
# minimal test XXX need more tests
from distutils.command.bdist_msi import bdist_msi
pkg_pth, dist = self.create_dist()
cmd = bdist_msi(dist)
cmd.ensure_finalized()
def test_suite():
return unittest.makeSuite(BDistMSITestCase)
if __name__ == '__main__':
test_support.run_unittest(test_suite())
...@@ -145,14 +145,14 @@ class TestSysConfig(unittest.TestCase): ...@@ -145,14 +145,14 @@ class TestSysConfig(unittest.TestCase):
get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g '
'-fwrapv -O3 -Wall -Wstrict-prototypes') '-fwrapv -O3 -Wall -Wstrict-prototypes')
maxsize = sys.maxsize maxint = sys.maxsize
try: try:
sys.maxsize = 2147483647 sys.maxsize = 2147483647
self.assertEquals(get_platform(), 'macosx-10.3-ppc') self.assertEquals(get_platform(), 'macosx-10.3-ppc')
sys.maxsize = 9223372036854775807 sys.maxsize = 9223372036854775807
self.assertEquals(get_platform(), 'macosx-10.3-ppc64') self.assertEquals(get_platform(), 'macosx-10.3-ppc64')
finally: finally:
sys.maxsize = maxsize sys.maxsize = maxint
self._set_uname(('Darwin', 'macziade', '8.11.1', self._set_uname(('Darwin', 'macziade', '8.11.1',
...@@ -164,15 +164,14 @@ class TestSysConfig(unittest.TestCase): ...@@ -164,15 +164,14 @@ class TestSysConfig(unittest.TestCase):
get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g ' get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g '
'-fwrapv -O3 -Wall -Wstrict-prototypes') '-fwrapv -O3 -Wall -Wstrict-prototypes')
maxint = sys.maxsize
maxsize = sys.maxsize
try: try:
sys.maxsize = 2147483647 sys.maxsize = 2147483647
self.assertEquals(get_platform(), 'macosx-10.3-i386') self.assertEquals(get_platform(), 'macosx-10.3-i386')
sys.maxsize = 9223372036854775807 sys.maxsize = 9223372036854775807
self.assertEquals(get_platform(), 'macosx-10.3-x86_64') self.assertEquals(get_platform(), 'macosx-10.3-x86_64')
finally: finally:
sys.maxsize = maxsize sys.maxsize = maxint
# macbook with fat binaries (fat, universal or fat64) # macbook with fat binaries (fat, universal or fat64)
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4' os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.4'
......
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