amaury.forgeotdarc
2008-11-22 22:18:04 UTC
Author: amaury.forgeotdarc
Date: Sat Nov 22 23:18:04 2008
New Revision: 67345
Log:
Merged revisions 67295,67301-67302,67318,67330,67342-67343 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r67295 | benjamin.peterson | 2008-11-20 05:05:12 +0100 (jeu., 20 nov. 2008) | 1 line
move useful sys.settrace information to the function's documentation from the debugger
........
r67301 | benjamin.peterson | 2008-11-20 22:25:31 +0100 (jeu., 20 nov. 2008) | 1 line
fix indentation and a sphinx warning
........
r67302 | benjamin.peterson | 2008-11-20 22:44:23 +0100 (jeu., 20 nov. 2008) | 1 line
oops! didn't mean to disable that test
........
r67318 | amaury.forgeotdarc | 2008-11-21 23:05:48 +0100 (ven., 21 nov. 2008) | 4 lines
#4363: Let uuid.uuid1() and uuid.uuid4() run even if the ctypes module is not present.
Will backport to 2.6
........
r67330 | georg.brandl | 2008-11-22 09:34:14 +0100 (sam., 22 nov. 2008) | 2 lines
#4364: fix attribute name on ctypes object.
........
r67342 | amaury.forgeotdarc | 2008-11-22 20:39:38 +0100 (sam., 22 nov. 2008) | 3 lines
yuvconvert.c is a part of the "sv" module, an old IRIX thing
and certainly not useful for any Windows build.
........
r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines
#3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from
stack overflow. But doing this, it always crashes when the stack is nearly full.
Reviewed by Martin von Loewis. Will backport to 2.6.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/library/multiprocessing.rst
python/branches/py3k/Doc/library/pdb.rst
python/branches/py3k/Doc/library/sys.rst
python/branches/py3k/Lib/test/test_bytes.py
python/branches/py3k/Lib/uuid.py
python/branches/py3k/Misc/NEWS
python/branches/py3k/PC/VC6/pythoncore.dsp
python/branches/py3k/PC/VS7.1/pythoncore.vcproj
python/branches/py3k/PC/VS8.0/pythoncore.vcproj
python/branches/py3k/PC/os2vacpp/makefile
python/branches/py3k/PC/os2vacpp/makefile.omk
python/branches/py3k/PCbuild/pythoncore.vcproj
python/branches/py3k/Python/pythonrun.c
Modified: python/branches/py3k/Doc/library/multiprocessing.rst
==============================================================================
--- python/branches/py3k/Doc/library/multiprocessing.rst (original)
+++ python/branches/py3k/Doc/library/multiprocessing.rst Sat Nov 22 23:18:04 2008
@@ -872,7 +872,7 @@
Note that *lock* is a keyword only argument.
- Note that an array of :data:`ctypes.c_char` has *value* and *rawvalue*
+ Note that an array of :data:`ctypes.c_char` has *value* and *raw*
attributes which allow one to use it to store and retrieve strings.
@@ -921,7 +921,7 @@
:func:`Value` instead to make sure that access is automatically synchronized
using a lock.
- Note that an array of :data:`ctypes.c_char` has ``value`` and ``rawvalue``
+ Note that an array of :data:`ctypes.c_char` has ``value`` and ``raw``
attributes which allow one to use it to store and retrieve strings -- see
documentation for :mod:`ctypes`.
Modified: python/branches/py3k/Doc/library/pdb.rst
==============================================================================
--- python/branches/py3k/Doc/library/pdb.rst (original)
+++ python/branches/py3k/Doc/library/pdb.rst Sat Nov 22 23:18:04 2008
@@ -336,68 +336,3 @@
q(uit)
Quit from the debugger. The program being executed is aborted.
-
-
-.. _debugger-hooks:
-
-How It Works
-============
-
-Some changes were made to the interpreter:
-
-* ``sys.settrace(func)`` sets the global trace function
-
-* there can also a local trace function (see later)
-
-Trace functions have three arguments: *frame*, *event*, and *arg*. *frame* is
-the current stack frame. *event* is a string: ``'call'``, ``'line'``,
-``'return'``, ``'exception'``, ``'c_call'``, ``'c_return'``, or
-``'c_exception'``. *arg* depends on the event type.
-
-The global trace function is invoked (with *event* set to ``'call'``) whenever a
-new local scope is entered; it should return a reference to the local trace
-function to be used that scope, or ``None`` if the scope shouldn't be traced.
-
-The local trace function should return a reference to itself (or to another
-function for further tracing in that scope), or ``None`` to turn off tracing in
-that scope.
-
-Instance methods are accepted (and very useful!) as trace functions.
-
-The events have the following meaning:
-
-``'call'``
- A function is called (or some other code block entered). The global trace
- function is called; *arg* is ``None``; the return value specifies the local
- trace function.
-
-``'line'``
- The interpreter is about to execute a new line of code (sometimes multiple line
- events on one line exist). The local trace function is called; *arg* is
- ``None``; the return value specifies the new local trace function.
-
-``'return'``
- A function (or other code block) is about to return. The local trace function
- is called; *arg* is the value that will be returned. The trace function's
- return value is ignored.
-
-``'exception'``
- An exception has occurred. The local trace function is called; *arg* is a
- triple ``(exception, value, traceback)``; the return value specifies the new
- local trace function.
-
-``'c_call'``
- A C function is about to be called. This may be an extension function or a
- builtin. *arg* is the C function object.
-
-``'c_return'``
- A C function has returned. *arg* is ``None``.
-
-``'c_exception'``
- A C function has thrown an exception. *arg* is ``None``.
-
-Note that as an exception is propagated down the chain of callers, an
-``'exception'`` event is generated at each level.
-
-For more information on code and frame objects, refer to :ref:`types`.
-
Modified: python/branches/py3k/Doc/library/sys.rst
==============================================================================
--- python/branches/py3k/Doc/library/sys.rst (original)
+++ python/branches/py3k/Doc/library/sys.rst Sat Nov 22 23:18:04 2008
@@ -623,11 +623,60 @@
single: debugger
Set the system's trace function, which allows you to implement a Python
- source code debugger in Python. See section :ref:`debugger-hooks` in the
- chapter on the Python debugger. The function is thread-specific; for a
+ source code debugger in Python. The function is thread-specific; for a
debugger to support multiple threads, it must be registered using
:func:`settrace` for each thread being debugged.
+ Trace functions should have three arguments: *frame*, *event*, and
+ *arg*. *frame* is the current stack frame. *event* is a string: ``'call'``,
+ ``'line'``, ``'return'``, ``'exception'``, ``'c_call'``, ``'c_return'``, or
+ ``'c_exception'``. *arg* depends on the event type.
+
+ The trace function is invoked (with *event* set to ``'call'``) whenever a new
+ local scope is entered; it should return a reference to a local trace
+ function to be used that scope, or ``None`` if the scope shouldn't be traced.
+
+ The local trace function should return a reference to itself (or to another
+ function for further tracing in that scope), or ``None`` to turn off tracing
+ in that scope.
+
+ The events have the following meaning:
+
+ ``'call'``
+ A function is called (or some other code block entered). The
+ global trace function is called; *arg* is ``None``; the return value
+ specifies the local trace function.
+
+ ``'line'``
+ The interpreter is about to execute a new line of code (sometimes multiple
+ line events on one line exist). The local trace function is called; *arg*
+ is ``None``; the return value specifies the new local trace function.
+
+ ``'return'``
+ A function (or other code block) is about to return. The local trace
+ function is called; *arg* is the value that will be returned. The trace
+ function's return value is ignored.
+
+ ``'exception'``
+ An exception has occurred. The local trace function is called; *arg* is a
+ tuple ``(exception, value, traceback)``; the return value specifies the
+ new local trace function.
+
+ ``'c_call'``
+ A C function is about to be called. This may be an extension function or
+ a builtin. *arg* is the C function object.
+
+ ``'c_return'``
+ A C function has returned. *arg* is ``None``.
+
+ ``'c_exception'``
+ A C function has thrown an exception. *arg* is ``None``.
+
+ Note that as an exception is propagated down the chain of callers, an
+ ``'exception'`` event is generated at each level.
+
+ For more information on code and frame objects, refer to :ref:`types`.
+
.. note::
The :func:`settrace` function is intended only for implementing debuggers,
Modified: python/branches/py3k/Lib/test/test_bytes.py
==============================================================================
--- python/branches/py3k/Lib/test/test_bytes.py (original)
+++ python/branches/py3k/Lib/test/test_bytes.py Sat Nov 22 23:18:04 2008
@@ -742,7 +742,7 @@
# Issue 4348. Make sure that operations that don't mutate the array
# copy the bytes.
b = bytearray(b'abc')
- #self.assertFalse(b is b.replace(b'abc', b'cde', 0))
+ self.assertFalse(b is b.replace(b'abc', b'cde', 0))
t = bytearray([i for i in range(256)])
x = bytearray(b'')
Modified: python/branches/py3k/Lib/uuid.py
==============================================================================
--- python/branches/py3k/Lib/uuid.py (original)
+++ python/branches/py3k/Lib/uuid.py Sat Nov 22 23:18:04 2008
@@ -500,8 +500,8 @@
# When the system provides a version-1 UUID generator, use it (but don't
# use UuidCreate here because its UUIDs don't conform to RFC 4122).
- _buffer = ctypes.create_string_buffer(16)
if _uuid_generate_time and node is clock_seq is None:
+ _buffer = ctypes.create_string_buffer(16)
_uuid_generate_time(_buffer)
return UUID(bytes=bytes_(_buffer.raw))
@@ -537,8 +537,8 @@
"""Generate a random UUID."""
# When the system provides a version-4 UUID generator, use it.
- _buffer = ctypes.create_string_buffer(16)
if _uuid_generate_random:
+ _buffer = ctypes.create_string_buffer(16)
_uuid_generate_random(_buffer)
return UUID(bytes=bytes_(_buffer.raw))
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sat Nov 22 23:18:04 2008
@@ -12,6 +12,13 @@
Core and Builtins
-----------------
+- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
+ interpreter to abort ("Fatal Python error: Could not reset the stack!")
+ instead of throwing a MemoryError.
+
+- Issue #4367: Python would segfault during compiling when the unicodedata
+ module couldn't be imported and \N escapes were present.
+
Library
-------
@@ -48,6 +55,9 @@
Library
-------
+- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
+ the ctypes module is not present.
+
- FileIO's mode attribute now always includes ``"b"``.
- Issue #3799: Fix dbm.dumb to accept strings as well as bytes for keys. String
Modified: python/branches/py3k/PC/VC6/pythoncore.dsp
==============================================================================
--- python/branches/py3k/PC/VC6/pythoncore.dsp (original)
+++ python/branches/py3k/PC/VC6/pythoncore.dsp Sat Nov 22 23:18:04 2008
@@ -723,10 +723,6 @@
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\yuvconvert.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\zipimport.c
# End Source File
# Begin Source File
Modified: python/branches/py3k/PC/VS7.1/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PC/VS7.1/pythoncore.vcproj (original)
+++ python/branches/py3k/PC/VS7.1/pythoncore.vcproj Sat Nov 22 23:18:04 2008
@@ -804,9 +804,6 @@
RelativePath="..\..\Modules\xxsubtype.c">
</File>
<File
- RelativePath="..\..\Modules\yuvconvert.c">
- </File>
- <File
RelativePath="..\..\Modules\zipimport.c">
</File>
</Files>
Modified: python/branches/py3k/PC/VS8.0/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PC/VS8.0/pythoncore.vcproj (original)
+++ python/branches/py3k/PC/VS8.0/pythoncore.vcproj Sat Nov 22 23:18:04 2008
@@ -1143,14 +1143,6 @@
</File>
<File
- RelativePath="..\..\Modules\yuv.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\yuvconvert.c"
- >
- </File>
- <File
RelativePath="..\..\Modules\zipimport.c"
</File>
Modified: python/branches/py3k/PC/os2vacpp/makefile
==============================================================================
--- python/branches/py3k/PC/os2vacpp/makefile (original)
+++ python/branches/py3k/PC/os2vacpp/makefile Sat Nov 22 23:18:04 2008
@@ -200,8 +200,7 @@
$(PATHOBJ)\StropModule.obj \
$(PATHOBJ)\StructModule.obj \
$(PATHOBJ)\TimeModule.obj \
- $(PATHOBJ)\ThreadModule.obj \
- $(PATHOBJ)\YUVConvert.obj
+ $(PATHOBJ)\ThreadModule.obj
# Standalone Parser Generator Program (Shares Some of Python's Modules)
PGEN = \
@@ -894,8 +893,6 @@
$(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \
$(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h
-yuvconvert.obj: $(PY_MODULES)\yuv.h
-
zlibmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \
$(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \
$(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \
Modified: python/branches/py3k/PC/os2vacpp/makefile.omk
==============================================================================
--- python/branches/py3k/PC/os2vacpp/makefile.omk (original)
+++ python/branches/py3k/PC/os2vacpp/makefile.omk Sat Nov 22 23:18:04 2008
@@ -161,8 +161,7 @@
StropModule.obj \
StructModule.obj \
TimeModule.obj \
- ThreadModule.obj \
- YUVConvert.obj
+ ThreadModule.obj
# Omitted Modules (and Description/Reason):
#
@@ -645,8 +644,6 @@
pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \
traceback.h tupleobject.h
-yuvconvert.obj: yuv.h
-
zlibmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \
pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \
import.h intobject.h intrcheck.h listobject.h longobject.h \
Modified: python/branches/py3k/PCbuild/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PCbuild/pythoncore.vcproj (original)
+++ python/branches/py3k/PCbuild/pythoncore.vcproj Sat Nov 22 23:18:04 2008
@@ -1143,14 +1143,6 @@
</File>
<File
- RelativePath="..\Modules\yuv.h"
- >
- </File>
- <File
- RelativePath="..\Modules\yuvconvert.c"
- >
- </File>
- <File
RelativePath="..\Modules\zipimport.c"
</File>
Modified: python/branches/py3k/Python/pythonrun.c
==============================================================================
--- python/branches/py3k/Python/pythonrun.c (original)
+++ python/branches/py3k/Python/pythonrun.c Sat Nov 22 23:18:04 2008
@@ -2039,7 +2039,7 @@
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH) {
int errcode = _resetstkoflw();
- if (errcode)
+ if (errcode == 0)
{
Py_FatalError("Could not reset the stack!");
}
Date: Sat Nov 22 23:18:04 2008
New Revision: 67345
Log:
Merged revisions 67295,67301-67302,67318,67330,67342-67343 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r67295 | benjamin.peterson | 2008-11-20 05:05:12 +0100 (jeu., 20 nov. 2008) | 1 line
move useful sys.settrace information to the function's documentation from the debugger
........
r67301 | benjamin.peterson | 2008-11-20 22:25:31 +0100 (jeu., 20 nov. 2008) | 1 line
fix indentation and a sphinx warning
........
r67302 | benjamin.peterson | 2008-11-20 22:44:23 +0100 (jeu., 20 nov. 2008) | 1 line
oops! didn't mean to disable that test
........
r67318 | amaury.forgeotdarc | 2008-11-21 23:05:48 +0100 (ven., 21 nov. 2008) | 4 lines
#4363: Let uuid.uuid1() and uuid.uuid4() run even if the ctypes module is not present.
Will backport to 2.6
........
r67330 | georg.brandl | 2008-11-22 09:34:14 +0100 (sam., 22 nov. 2008) | 2 lines
#4364: fix attribute name on ctypes object.
........
r67342 | amaury.forgeotdarc | 2008-11-22 20:39:38 +0100 (sam., 22 nov. 2008) | 3 lines
yuvconvert.c is a part of the "sv" module, an old IRIX thing
and certainly not useful for any Windows build.
........
r67343 | amaury.forgeotdarc | 2008-11-22 21:01:18 +0100 (sam., 22 nov. 2008) | 5 lines
#3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from
stack overflow. But doing this, it always crashes when the stack is nearly full.
Reviewed by Martin von Loewis. Will backport to 2.6.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/library/multiprocessing.rst
python/branches/py3k/Doc/library/pdb.rst
python/branches/py3k/Doc/library/sys.rst
python/branches/py3k/Lib/test/test_bytes.py
python/branches/py3k/Lib/uuid.py
python/branches/py3k/Misc/NEWS
python/branches/py3k/PC/VC6/pythoncore.dsp
python/branches/py3k/PC/VS7.1/pythoncore.vcproj
python/branches/py3k/PC/VS8.0/pythoncore.vcproj
python/branches/py3k/PC/os2vacpp/makefile
python/branches/py3k/PC/os2vacpp/makefile.omk
python/branches/py3k/PCbuild/pythoncore.vcproj
python/branches/py3k/Python/pythonrun.c
Modified: python/branches/py3k/Doc/library/multiprocessing.rst
==============================================================================
--- python/branches/py3k/Doc/library/multiprocessing.rst (original)
+++ python/branches/py3k/Doc/library/multiprocessing.rst Sat Nov 22 23:18:04 2008
@@ -872,7 +872,7 @@
Note that *lock* is a keyword only argument.
- Note that an array of :data:`ctypes.c_char` has *value* and *rawvalue*
+ Note that an array of :data:`ctypes.c_char` has *value* and *raw*
attributes which allow one to use it to store and retrieve strings.
@@ -921,7 +921,7 @@
:func:`Value` instead to make sure that access is automatically synchronized
using a lock.
- Note that an array of :data:`ctypes.c_char` has ``value`` and ``rawvalue``
+ Note that an array of :data:`ctypes.c_char` has ``value`` and ``raw``
attributes which allow one to use it to store and retrieve strings -- see
documentation for :mod:`ctypes`.
Modified: python/branches/py3k/Doc/library/pdb.rst
==============================================================================
--- python/branches/py3k/Doc/library/pdb.rst (original)
+++ python/branches/py3k/Doc/library/pdb.rst Sat Nov 22 23:18:04 2008
@@ -336,68 +336,3 @@
q(uit)
Quit from the debugger. The program being executed is aborted.
-
-
-.. _debugger-hooks:
-
-How It Works
-============
-
-Some changes were made to the interpreter:
-
-* ``sys.settrace(func)`` sets the global trace function
-
-* there can also a local trace function (see later)
-
-Trace functions have three arguments: *frame*, *event*, and *arg*. *frame* is
-the current stack frame. *event* is a string: ``'call'``, ``'line'``,
-``'return'``, ``'exception'``, ``'c_call'``, ``'c_return'``, or
-``'c_exception'``. *arg* depends on the event type.
-
-The global trace function is invoked (with *event* set to ``'call'``) whenever a
-new local scope is entered; it should return a reference to the local trace
-function to be used that scope, or ``None`` if the scope shouldn't be traced.
-
-The local trace function should return a reference to itself (or to another
-function for further tracing in that scope), or ``None`` to turn off tracing in
-that scope.
-
-Instance methods are accepted (and very useful!) as trace functions.
-
-The events have the following meaning:
-
-``'call'``
- A function is called (or some other code block entered). The global trace
- function is called; *arg* is ``None``; the return value specifies the local
- trace function.
-
-``'line'``
- The interpreter is about to execute a new line of code (sometimes multiple line
- events on one line exist). The local trace function is called; *arg* is
- ``None``; the return value specifies the new local trace function.
-
-``'return'``
- A function (or other code block) is about to return. The local trace function
- is called; *arg* is the value that will be returned. The trace function's
- return value is ignored.
-
-``'exception'``
- An exception has occurred. The local trace function is called; *arg* is a
- triple ``(exception, value, traceback)``; the return value specifies the new
- local trace function.
-
-``'c_call'``
- A C function is about to be called. This may be an extension function or a
- builtin. *arg* is the C function object.
-
-``'c_return'``
- A C function has returned. *arg* is ``None``.
-
-``'c_exception'``
- A C function has thrown an exception. *arg* is ``None``.
-
-Note that as an exception is propagated down the chain of callers, an
-``'exception'`` event is generated at each level.
-
-For more information on code and frame objects, refer to :ref:`types`.
-
Modified: python/branches/py3k/Doc/library/sys.rst
==============================================================================
--- python/branches/py3k/Doc/library/sys.rst (original)
+++ python/branches/py3k/Doc/library/sys.rst Sat Nov 22 23:18:04 2008
@@ -623,11 +623,60 @@
single: debugger
Set the system's trace function, which allows you to implement a Python
- source code debugger in Python. See section :ref:`debugger-hooks` in the
- chapter on the Python debugger. The function is thread-specific; for a
+ source code debugger in Python. The function is thread-specific; for a
debugger to support multiple threads, it must be registered using
:func:`settrace` for each thread being debugged.
+ Trace functions should have three arguments: *frame*, *event*, and
+ *arg*. *frame* is the current stack frame. *event* is a string: ``'call'``,
+ ``'line'``, ``'return'``, ``'exception'``, ``'c_call'``, ``'c_return'``, or
+ ``'c_exception'``. *arg* depends on the event type.
+
+ The trace function is invoked (with *event* set to ``'call'``) whenever a new
+ local scope is entered; it should return a reference to a local trace
+ function to be used that scope, or ``None`` if the scope shouldn't be traced.
+
+ The local trace function should return a reference to itself (or to another
+ function for further tracing in that scope), or ``None`` to turn off tracing
+ in that scope.
+
+ The events have the following meaning:
+
+ ``'call'``
+ A function is called (or some other code block entered). The
+ global trace function is called; *arg* is ``None``; the return value
+ specifies the local trace function.
+
+ ``'line'``
+ The interpreter is about to execute a new line of code (sometimes multiple
+ line events on one line exist). The local trace function is called; *arg*
+ is ``None``; the return value specifies the new local trace function.
+
+ ``'return'``
+ A function (or other code block) is about to return. The local trace
+ function is called; *arg* is the value that will be returned. The trace
+ function's return value is ignored.
+
+ ``'exception'``
+ An exception has occurred. The local trace function is called; *arg* is a
+ tuple ``(exception, value, traceback)``; the return value specifies the
+ new local trace function.
+
+ ``'c_call'``
+ A C function is about to be called. This may be an extension function or
+ a builtin. *arg* is the C function object.
+
+ ``'c_return'``
+ A C function has returned. *arg* is ``None``.
+
+ ``'c_exception'``
+ A C function has thrown an exception. *arg* is ``None``.
+
+ Note that as an exception is propagated down the chain of callers, an
+ ``'exception'`` event is generated at each level.
+
+ For more information on code and frame objects, refer to :ref:`types`.
+
.. note::
The :func:`settrace` function is intended only for implementing debuggers,
Modified: python/branches/py3k/Lib/test/test_bytes.py
==============================================================================
--- python/branches/py3k/Lib/test/test_bytes.py (original)
+++ python/branches/py3k/Lib/test/test_bytes.py Sat Nov 22 23:18:04 2008
@@ -742,7 +742,7 @@
# Issue 4348. Make sure that operations that don't mutate the array
# copy the bytes.
b = bytearray(b'abc')
- #self.assertFalse(b is b.replace(b'abc', b'cde', 0))
+ self.assertFalse(b is b.replace(b'abc', b'cde', 0))
t = bytearray([i for i in range(256)])
x = bytearray(b'')
Modified: python/branches/py3k/Lib/uuid.py
==============================================================================
--- python/branches/py3k/Lib/uuid.py (original)
+++ python/branches/py3k/Lib/uuid.py Sat Nov 22 23:18:04 2008
@@ -500,8 +500,8 @@
# When the system provides a version-1 UUID generator, use it (but don't
# use UuidCreate here because its UUIDs don't conform to RFC 4122).
- _buffer = ctypes.create_string_buffer(16)
if _uuid_generate_time and node is clock_seq is None:
+ _buffer = ctypes.create_string_buffer(16)
_uuid_generate_time(_buffer)
return UUID(bytes=bytes_(_buffer.raw))
@@ -537,8 +537,8 @@
"""Generate a random UUID."""
# When the system provides a version-4 UUID generator, use it.
- _buffer = ctypes.create_string_buffer(16)
if _uuid_generate_random:
+ _buffer = ctypes.create_string_buffer(16)
_uuid_generate_random(_buffer)
return UUID(bytes=bytes_(_buffer.raw))
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sat Nov 22 23:18:04 2008
@@ -12,6 +12,13 @@
Core and Builtins
-----------------
+- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
+ interpreter to abort ("Fatal Python error: Could not reset the stack!")
+ instead of throwing a MemoryError.
+
+- Issue #4367: Python would segfault during compiling when the unicodedata
+ module couldn't be imported and \N escapes were present.
+
Library
-------
@@ -48,6 +55,9 @@
Library
-------
+- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
+ the ctypes module is not present.
+
- FileIO's mode attribute now always includes ``"b"``.
- Issue #3799: Fix dbm.dumb to accept strings as well as bytes for keys. String
Modified: python/branches/py3k/PC/VC6/pythoncore.dsp
==============================================================================
--- python/branches/py3k/PC/VC6/pythoncore.dsp (original)
+++ python/branches/py3k/PC/VC6/pythoncore.dsp Sat Nov 22 23:18:04 2008
@@ -723,10 +723,6 @@
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\yuvconvert.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\zipimport.c
# End Source File
# Begin Source File
Modified: python/branches/py3k/PC/VS7.1/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PC/VS7.1/pythoncore.vcproj (original)
+++ python/branches/py3k/PC/VS7.1/pythoncore.vcproj Sat Nov 22 23:18:04 2008
@@ -804,9 +804,6 @@
RelativePath="..\..\Modules\xxsubtype.c">
</File>
<File
- RelativePath="..\..\Modules\yuvconvert.c">
- </File>
- <File
RelativePath="..\..\Modules\zipimport.c">
</File>
</Files>
Modified: python/branches/py3k/PC/VS8.0/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PC/VS8.0/pythoncore.vcproj (original)
+++ python/branches/py3k/PC/VS8.0/pythoncore.vcproj Sat Nov 22 23:18:04 2008
@@ -1143,14 +1143,6 @@
</File>
<File
- RelativePath="..\..\Modules\yuv.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\yuvconvert.c"
- >
- </File>
- <File
RelativePath="..\..\Modules\zipimport.c"
</File>
Modified: python/branches/py3k/PC/os2vacpp/makefile
==============================================================================
--- python/branches/py3k/PC/os2vacpp/makefile (original)
+++ python/branches/py3k/PC/os2vacpp/makefile Sat Nov 22 23:18:04 2008
@@ -200,8 +200,7 @@
$(PATHOBJ)\StropModule.obj \
$(PATHOBJ)\StructModule.obj \
$(PATHOBJ)\TimeModule.obj \
- $(PATHOBJ)\ThreadModule.obj \
- $(PATHOBJ)\YUVConvert.obj
+ $(PATHOBJ)\ThreadModule.obj
# Standalone Parser Generator Program (Shares Some of Python's Modules)
PGEN = \
@@ -894,8 +893,6 @@
$(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \
$(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h
-yuvconvert.obj: $(PY_MODULES)\yuv.h
-
zlibmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \
$(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \
$(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \
Modified: python/branches/py3k/PC/os2vacpp/makefile.omk
==============================================================================
--- python/branches/py3k/PC/os2vacpp/makefile.omk (original)
+++ python/branches/py3k/PC/os2vacpp/makefile.omk Sat Nov 22 23:18:04 2008
@@ -161,8 +161,7 @@
StropModule.obj \
StructModule.obj \
TimeModule.obj \
- ThreadModule.obj \
- YUVConvert.obj
+ ThreadModule.obj
# Omitted Modules (and Description/Reason):
#
@@ -645,8 +644,6 @@
pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \
traceback.h tupleobject.h
-yuvconvert.obj: yuv.h
-
zlibmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \
pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \
import.h intobject.h intrcheck.h listobject.h longobject.h \
Modified: python/branches/py3k/PCbuild/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PCbuild/pythoncore.vcproj (original)
+++ python/branches/py3k/PCbuild/pythoncore.vcproj Sat Nov 22 23:18:04 2008
@@ -1143,14 +1143,6 @@
</File>
<File
- RelativePath="..\Modules\yuv.h"
- >
- </File>
- <File
- RelativePath="..\Modules\yuvconvert.c"
- >
- </File>
- <File
RelativePath="..\Modules\zipimport.c"
</File>
Modified: python/branches/py3k/Python/pythonrun.c
==============================================================================
--- python/branches/py3k/Python/pythonrun.c (original)
+++ python/branches/py3k/Python/pythonrun.c Sat Nov 22 23:18:04 2008
@@ -2039,7 +2039,7 @@
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH) {
int errcode = _resetstkoflw();
- if (errcode)
+ if (errcode == 0)
{
Py_FatalError("Could not reset the stack!");
}