benjamin.peterson
2008-09-10 21:57:35 UTC
Author: benjamin.peterson
Date: Wed Sep 10 23:57:34 2008
New Revision: 66376
Log:
Merged revisions 66337,66347,66350,66352,66358 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r66337 | vinay.sajip | 2008-09-09 08:42:08 -0500 (Tue, 09 Sep 2008) | 1 line
Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.
........
r66347 | georg.brandl | 2008-09-09 14:26:00 -0500 (Tue, 09 Sep 2008) | 2 lines
Fix varname in docstring. #3822.
........
r66350 | georg.brandl | 2008-09-09 15:28:31 -0500 (Tue, 09 Sep 2008) | 2 lines
#3472: update Mac-bundled Python version info.
........
r66352 | benjamin.peterson | 2008-09-09 15:55:01 -0500 (Tue, 09 Sep 2008) | 4 lines
Fix #3634 invalid return value from _weakref.ref(Exception).__init__
Reviewers: Amaury, Antoine, Benjamin
........
r66358 | benjamin.peterson | 2008-09-09 18:16:48 -0500 (Tue, 09 Sep 2008) | 1 line
use the latest pygments version
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/using/mac.rst
python/branches/py3k/Lib/test/test_logging.py
python/branches/py3k/Lib/test/test_weakref.py
python/branches/py3k/Objects/unicodeobject.c
python/branches/py3k/Objects/weakrefobject.c
Modified: python/branches/py3k/Doc/using/mac.rst
==============================================================================
--- python/branches/py3k/Doc/using/mac.rst (original)
+++ python/branches/py3k/Doc/using/mac.rst Wed Sep 10 23:57:34 2008
@@ -17,10 +17,10 @@
Getting and Installing MacPython
================================
-Mac OS X 10.5 comes with Python 2.5 pre-installed by Apple. However, you are
-encouraged to install the most recent version of Python from the Python website
-(http://www.python.org). A "universal binary" build of Python 2.5, which runs
-natively on the Mac's new Intel and legacy PPC CPU's, is available there.
+Mac OS X 10.5 comes with Python 2.5.1 pre-installed by Apple. If you wish, you
+are invited to install the most recent version of Python from the Python website
+(http://www.python.org). A current "universal binary" build of Python, which
+runs natively on the Mac's new Intel and legacy PPC CPU's, is available there.
What you get after installing is a number of things:
@@ -38,7 +38,10 @@
The Apple-provided build of Python is installed in
:file:`/System/Library/Frameworks/Python.framework` and :file:`/usr/bin/python`,
respectively. You should never modify or delete these, as they are
-Apple-controlled and are used by Apple- or third-party software.
+Apple-controlled and are used by Apple- or third-party software. Remember that
+if you choose to install a newer Python version from python.org, you will have
+two different but functional Python installations on your computer, so it will
+be important that your paths and usages are consistent with what you want to do.
IDLE includes a help menu that allows you to access Python documentation. If you
are completely new to Python you should start reading the tutorial introduction
Modified: python/branches/py3k/Lib/test/test_logging.py
==============================================================================
--- python/branches/py3k/Lib/test/test_logging.py (original)
+++ python/branches/py3k/Lib/test/test_logging.py Wed Sep 10 23:57:34 2008
@@ -615,10 +615,10 @@
args=(sys.stdout,)
[handler_hand2]
- class=FileHandler
+ class=StreamHandler
level=NOTSET
formatter=form1
- args=('test.blah', 'a')
+ args=(sys.stderr,)
[formatter_form1]
format=%(levelname)s ++ %(message)s
Modified: python/branches/py3k/Lib/test/test_weakref.py
==============================================================================
--- python/branches/py3k/Lib/test/test_weakref.py (original)
+++ python/branches/py3k/Lib/test/test_weakref.py Wed Sep 10 23:57:34 2008
@@ -660,6 +660,14 @@
w = Target()
+ def test_init(self):
+ # Issue 3634
+ # <weakref to class>.__init__() doesn't check errors correctly
+ r = weakref.ref(Exception)
+ self.assertRaises(TypeError, r.__init__, 0, 0, 0, 0, 0)
+ # No exception should be raised here
+ gc.collect()
+
class SubclassableWeakrefTestCase(TestBase):
Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c (original)
+++ python/branches/py3k/Objects/unicodeobject.c Wed Sep 10 23:57:34 2008
@@ -8190,8 +8190,8 @@
PyDoc_STRVAR(zfill__doc__,
"S.zfill(width) -> str\n\
\n\
-Pad a numeric string x with zeros on the left, to fill a field\n\
-of the specified width. The string x is never truncated.");
+Pad a numeric string S with zeros on the left, to fill a field\n\
+of the specified width. The string S is never truncated.");
static PyObject *
unicode_zfill(PyUnicodeObject *self, PyObject *args)
Modified: python/branches/py3k/Objects/weakrefobject.c
==============================================================================
--- python/branches/py3k/Objects/weakrefobject.c (original)
+++ python/branches/py3k/Objects/weakrefobject.c Wed Sep 10 23:57:34 2008
@@ -328,7 +328,7 @@
if (parse_weakref_init_args("__init__", args, kwargs, &tmp, &tmp))
return 0;
else
- return 1;
+ return -1;
}
Date: Wed Sep 10 23:57:34 2008
New Revision: 66376
Log:
Merged revisions 66337,66347,66350,66352,66358 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r66337 | vinay.sajip | 2008-09-09 08:42:08 -0500 (Tue, 09 Sep 2008) | 1 line
Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.
........
r66347 | georg.brandl | 2008-09-09 14:26:00 -0500 (Tue, 09 Sep 2008) | 2 lines
Fix varname in docstring. #3822.
........
r66350 | georg.brandl | 2008-09-09 15:28:31 -0500 (Tue, 09 Sep 2008) | 2 lines
#3472: update Mac-bundled Python version info.
........
r66352 | benjamin.peterson | 2008-09-09 15:55:01 -0500 (Tue, 09 Sep 2008) | 4 lines
Fix #3634 invalid return value from _weakref.ref(Exception).__init__
Reviewers: Amaury, Antoine, Benjamin
........
r66358 | benjamin.peterson | 2008-09-09 18:16:48 -0500 (Tue, 09 Sep 2008) | 1 line
use the latest pygments version
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/using/mac.rst
python/branches/py3k/Lib/test/test_logging.py
python/branches/py3k/Lib/test/test_weakref.py
python/branches/py3k/Objects/unicodeobject.c
python/branches/py3k/Objects/weakrefobject.c
Modified: python/branches/py3k/Doc/using/mac.rst
==============================================================================
--- python/branches/py3k/Doc/using/mac.rst (original)
+++ python/branches/py3k/Doc/using/mac.rst Wed Sep 10 23:57:34 2008
@@ -17,10 +17,10 @@
Getting and Installing MacPython
================================
-Mac OS X 10.5 comes with Python 2.5 pre-installed by Apple. However, you are
-encouraged to install the most recent version of Python from the Python website
-(http://www.python.org). A "universal binary" build of Python 2.5, which runs
-natively on the Mac's new Intel and legacy PPC CPU's, is available there.
+Mac OS X 10.5 comes with Python 2.5.1 pre-installed by Apple. If you wish, you
+are invited to install the most recent version of Python from the Python website
+(http://www.python.org). A current "universal binary" build of Python, which
+runs natively on the Mac's new Intel and legacy PPC CPU's, is available there.
What you get after installing is a number of things:
@@ -38,7 +38,10 @@
The Apple-provided build of Python is installed in
:file:`/System/Library/Frameworks/Python.framework` and :file:`/usr/bin/python`,
respectively. You should never modify or delete these, as they are
-Apple-controlled and are used by Apple- or third-party software.
+Apple-controlled and are used by Apple- or third-party software. Remember that
+if you choose to install a newer Python version from python.org, you will have
+two different but functional Python installations on your computer, so it will
+be important that your paths and usages are consistent with what you want to do.
IDLE includes a help menu that allows you to access Python documentation. If you
are completely new to Python you should start reading the tutorial introduction
Modified: python/branches/py3k/Lib/test/test_logging.py
==============================================================================
--- python/branches/py3k/Lib/test/test_logging.py (original)
+++ python/branches/py3k/Lib/test/test_logging.py Wed Sep 10 23:57:34 2008
@@ -615,10 +615,10 @@
args=(sys.stdout,)
[handler_hand2]
- class=FileHandler
+ class=StreamHandler
level=NOTSET
formatter=form1
- args=('test.blah', 'a')
+ args=(sys.stderr,)
[formatter_form1]
format=%(levelname)s ++ %(message)s
Modified: python/branches/py3k/Lib/test/test_weakref.py
==============================================================================
--- python/branches/py3k/Lib/test/test_weakref.py (original)
+++ python/branches/py3k/Lib/test/test_weakref.py Wed Sep 10 23:57:34 2008
@@ -660,6 +660,14 @@
w = Target()
+ def test_init(self):
+ # Issue 3634
+ # <weakref to class>.__init__() doesn't check errors correctly
+ r = weakref.ref(Exception)
+ self.assertRaises(TypeError, r.__init__, 0, 0, 0, 0, 0)
+ # No exception should be raised here
+ gc.collect()
+
class SubclassableWeakrefTestCase(TestBase):
Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c (original)
+++ python/branches/py3k/Objects/unicodeobject.c Wed Sep 10 23:57:34 2008
@@ -8190,8 +8190,8 @@
PyDoc_STRVAR(zfill__doc__,
"S.zfill(width) -> str\n\
\n\
-Pad a numeric string x with zeros on the left, to fill a field\n\
-of the specified width. The string x is never truncated.");
+Pad a numeric string S with zeros on the left, to fill a field\n\
+of the specified width. The string S is never truncated.");
static PyObject *
unicode_zfill(PyUnicodeObject *self, PyObject *args)
Modified: python/branches/py3k/Objects/weakrefobject.c
==============================================================================
--- python/branches/py3k/Objects/weakrefobject.c (original)
+++ python/branches/py3k/Objects/weakrefobject.c Wed Sep 10 23:57:34 2008
@@ -328,7 +328,7 @@
if (parse_weakref_init_args("__init__", args, kwargs, &tmp, &tmp))
return 0;
else
- return 1;
+ return -1;
}