[Python-checkins] r64612 - in python/branches/tlee-ast-optimize: Doc/Makefile Doc/library/collections.rst Doc/library/fractions.rst Doc/library/multiprocessing.rst Doc/library/socketserver.rst Doc/library/ssl.rst Doc/reference/compound_stmts.rst Doc/whatsnew/2.6.rst Lib/bsddb/test/test_replication.py Lib/fractions.py Lib/logging/config.py Lib/multiprocessing/dummy Lib/multiprocessing/managers.py Lib/ssl.py Lib/test/test_audioop.py Lib/test/test_cpickle.py Lib/test/test_fractions.py Lib/test/test_ssl.py Lib/test/test_sys.py Lib/test/test_threading_local.py Lib/test/test_warnings.py Lib/test/wrongcert.pem Lib/warnings.py Misc/ACKS Misc/NEWS Modules/_ssl.c Modules/cPickle.c Modules/threadmodule.c Objects/dictobject.c PCbuild/_bsddb.vcproj PCbuild/_bsddb44.vcproj PCbuild/pcbuild.sln PCbuild/pyproject.vsprops PCbuild/sqlite3.vcproj Python/_warnings.c Tools/buildbot/external-common.bat Tools/msi/msi.py configure configure.in pyconfig.h.in setup.py
thomas.lee
python-checkins at python.org
Tue Jul 1 14:28:02 CEST 2008
Author: thomas.lee
Date: Tue Jul 1 14:28:00 2008
New Revision: 64612
Log:
Merged revisions 64532-64611 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r64533 | robert.schuppenies | 2008-06-27 01:20:35 +1000 (Fri, 27 Jun 2008) | 3 lines
Corrected inconsistencies in sizeof tests and addressed issue pointed
out by Jean Brouwers.
................
r64535 | georg.brandl | 2008-06-27 04:55:37 +1000 (Fri, 27 Jun 2008) | 2 lines
Add a version tag for shutdown().
................
r64544 | georg.brandl | 2008-06-27 07:12:55 +1000 (Fri, 27 Jun 2008) | 2 lines
Use newer versions of externals.
................
r64545 | benjamin.peterson | 2008-06-27 07:23:30 +1000 (Fri, 27 Jun 2008) | 1 line
add a htmlview directive
................
r64546 | benjamin.peterson | 2008-06-27 07:24:35 +1000 (Fri, 27 Jun 2008) | 1 line
use the new API
................
r64547 | benjamin.peterson | 2008-06-27 07:29:19 +1000 (Fri, 27 Jun 2008) | 1 line
fix isSet in _exposed
................
r64549 | brett.cannon | 2008-06-27 10:31:13 +1000 (Fri, 27 Jun 2008) | 7 lines
warnings.warn_explicit() did not have the proper TypeErrors in place to prevent
bus errors or SystemError being raised. As a side effect of fixing this, a bad
DECREF that could be triggered when 'message' and 'category' were both None was
fixed.
Closes issue 3211. Thanks JP Calderone for the bug report.
................
r64550 | brett.cannon | 2008-06-27 10:32:16 +1000 (Fri, 27 Jun 2008) | 2 lines
Ignore .pyc and .pyo files.
................
r64554 | trent.nelson | 2008-06-27 12:24:49 +1000 (Fri, 27 Jun 2008) | 3 lines
Initialized merge tracking via "svnmerge" with revisions "1-64347" from
svn+ssh://pythondev@svn.python.org/python/branches/tnelson-trunk-bsddb-47-upgrade
................
r64555 | trent.nelson | 2008-06-27 12:30:34 +1000 (Fri, 27 Jun 2008) | 13 lines
Merged revisions 64368-64369 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/tnelson-trunk-bsddb-47-upgrade
........
r64368 | trent.nelson | 2008-06-17 23:13:44 -0500 (Tue, 17 Jun 2008) | 1 line
Initial commit of work pertaining to switching the Windows build from Berkeley DB 4.4.20 to 4.7.25. Note that I've deprecated the standalone '_bsddb44.vcproj' in lieu of adding the sources in a separate folder to the _bsddb project. This was a conscious decision and actually makes everything far more easier to manage. With this approach, entire test suite passed straight off the bat. Well, almost -- the timeout in bsddb/test/test_replication.py needed bumping up a little -- 2 seconds was too short. 10 seconds seems to be fine for me, but I'll make sure Jesus verifies. More documentation to come once I've been able to test out this approach on the buildbots (hence keeping the changes in a separate branch for now).
........
r64369 | trent.nelson | 2008-06-17 23:19:12 -0500 (Tue, 17 Jun 2008) | 1 line
Bump Berkeley DB version from 4.4.20 to 4.7.25.
........
................
r64557 | mark.dickinson | 2008-06-27 20:11:52 +1000 (Fri, 27 Jun 2008) | 3 lines
Remove trailing 'L's from numerator and denominator in the
repr() of a Fraction instance.
................
r64558 | mark.dickinson | 2008-06-27 21:03:21 +1000 (Fri, 27 Jun 2008) | 2 lines
Add Jean Brouwers for his work on math.sum
................
r64561 | mark.dickinson | 2008-06-28 02:49:27 +1000 (Sat, 28 Jun 2008) | 2 lines
Issue #3197: rework documentation for fractions module.
................
r64565 | raymond.hettinger | 2008-06-28 07:34:24 +1000 (Sat, 28 Jun 2008) | 1 line
Fix whitespace in example code.
................
r64567 | mark.dickinson | 2008-06-28 08:20:14 +1000 (Sat, 28 Jun 2008) | 3 lines
Fix typo in configure.in, and propagate configure.in changes from r64002
to configure and pyconfig.h.in.
................
r64568 | benjamin.peterson | 2008-06-28 09:22:06 +1000 (Sat, 28 Jun 2008) | 1 line
edit multiprocessing docs
................
r64570 | hyeshik.chang | 2008-06-28 11:04:31 +1000 (Sat, 28 Jun 2008) | 8 lines
Give information for compililation of _multiprocessing.SemLock on FreeBSD:
FreeBSD's P1003.1b semaphore support is highly experimental and
it's disabled by default. Even if a user loads the experimental
kernel module manually, _multiprocessing doesn't work correctly due
to several known incompatibilities around sem_unlink and sem_getvalue,
yet.
................
r64572 | benjamin.peterson | 2008-06-28 23:18:14 +1000 (Sat, 28 Jun 2008) | 1 line
fix typo
................
r64577 | raymond.hettinger | 2008-06-29 08:16:53 +1000 (Sun, 29 Jun 2008) | 1 line
Issue 3230: Do not the set specific size macro.
................
r64578 | bill.janssen | 2008-06-29 08:19:33 +1000 (Sun, 29 Jun 2008) | 1 line
various SSL fixes; issues 1251, 3162, 3212
................
r64580 | bill.janssen | 2008-06-29 09:00:39 +1000 (Sun, 29 Jun 2008) | 1 line
make sure we close the active channels when eof is received on them
................
r64582 | benjamin.peterson | 2008-06-29 09:06:05 +1000 (Sun, 29 Jun 2008) | 2 lines
convert test_audioop to unittest. Thanks to Giampaolo Rodola.
................
r64583 | benjamin.peterson | 2008-06-29 09:06:49 +1000 (Sun, 29 Jun 2008) | 1 line
rewrap
................
r64585 | benjamin.peterson | 2008-06-29 09:35:31 +1000 (Sun, 29 Jun 2008) | 1 line
fix typo
................
r64590 | benjamin.peterson | 2008-06-29 23:43:07 +1000 (Sun, 29 Jun 2008) | 1 line
reinstate the ending backtick. thanks Nick :)
................
r64592 | vinay.sajip | 2008-06-30 07:25:28 +1000 (Mon, 30 Jun 2008) | 2 lines
Removed out-of-date comment in _install_handlers and
used issubclass in place of equality comparison of classes.
................
r64593 | vinay.sajip | 2008-06-30 07:27:15 +1000 (Mon, 30 Jun 2008) | 1 line
Updated to reflect change in logging.config to remove out-of-date comment in _install_handlers and the use of issubclass in place of equality comparison of classes.
................
r64595 | facundo.batista | 2008-06-30 11:10:55 +1000 (Mon, 30 Jun 2008) | 3 lines
Fix #2702, with a correct accounting of recursion.
................
r64597 | martin.v.loewis | 2008-06-30 16:57:39 +1000 (Mon, 30 Jun 2008) | 1 line
Issue #3215: Build sqlite3 as sqlite3.dll, not sqlite3.pyd
................
r64598 | martin.v.loewis | 2008-06-30 17:01:09 +1000 (Mon, 30 Jun 2008) | 1 line
Add _multiprocessing module.
................
r64601 | amaury.forgeotdarc | 2008-07-01 08:42:40 +1000 (Tue, 01 Jul 2008) | 11 lines
#Issue3088 in-progress: Race condition with instances of classes derived from threading.local:
When a thread touches such an object for the first time, a new thread-local __dict__ is created,
and the __init__ method is run.
But a thread switch can occur here; if the other thread touches the same object, it installs another
__dict__; when the first thread resumes, it updates the dictionary of the second...
This is the deep cause of the failures in test_multiprocessing involving "managers" objects.
Also a 2.5 backport candidate.
................
Added:
python/branches/tlee-ast-optimize/Lib/test/wrongcert.pem
- copied unchanged from r64601, /python/trunk/Lib/test/wrongcert.pem
Removed:
python/branches/tlee-ast-optimize/PCbuild/_bsddb44.vcproj
Modified:
python/branches/tlee-ast-optimize/ (props changed)
python/branches/tlee-ast-optimize/Doc/Makefile
python/branches/tlee-ast-optimize/Doc/library/collections.rst
python/branches/tlee-ast-optimize/Doc/library/fractions.rst
python/branches/tlee-ast-optimize/Doc/library/multiprocessing.rst
python/branches/tlee-ast-optimize/Doc/library/socketserver.rst
python/branches/tlee-ast-optimize/Doc/library/ssl.rst
python/branches/tlee-ast-optimize/Doc/reference/compound_stmts.rst
python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst
python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py
python/branches/tlee-ast-optimize/Lib/fractions.py
python/branches/tlee-ast-optimize/Lib/logging/config.py
python/branches/tlee-ast-optimize/Lib/multiprocessing/dummy/ (props changed)
python/branches/tlee-ast-optimize/Lib/multiprocessing/managers.py
python/branches/tlee-ast-optimize/Lib/ssl.py
python/branches/tlee-ast-optimize/Lib/test/test_audioop.py
python/branches/tlee-ast-optimize/Lib/test/test_cpickle.py
python/branches/tlee-ast-optimize/Lib/test/test_fractions.py
python/branches/tlee-ast-optimize/Lib/test/test_ssl.py
python/branches/tlee-ast-optimize/Lib/test/test_sys.py
python/branches/tlee-ast-optimize/Lib/test/test_threading_local.py
python/branches/tlee-ast-optimize/Lib/test/test_warnings.py
python/branches/tlee-ast-optimize/Lib/warnings.py
python/branches/tlee-ast-optimize/Misc/ACKS
python/branches/tlee-ast-optimize/Misc/NEWS
python/branches/tlee-ast-optimize/Modules/_ssl.c
python/branches/tlee-ast-optimize/Modules/cPickle.c
python/branches/tlee-ast-optimize/Modules/threadmodule.c
python/branches/tlee-ast-optimize/Objects/dictobject.c
python/branches/tlee-ast-optimize/PCbuild/_bsddb.vcproj
python/branches/tlee-ast-optimize/PCbuild/pcbuild.sln
python/branches/tlee-ast-optimize/PCbuild/pyproject.vsprops
python/branches/tlee-ast-optimize/PCbuild/sqlite3.vcproj
python/branches/tlee-ast-optimize/Python/_warnings.c
python/branches/tlee-ast-optimize/Tools/buildbot/external-common.bat
python/branches/tlee-ast-optimize/Tools/msi/msi.py
python/branches/tlee-ast-optimize/configure
python/branches/tlee-ast-optimize/configure.in
python/branches/tlee-ast-optimize/pyconfig.h.in
python/branches/tlee-ast-optimize/setup.py
Modified: python/branches/tlee-ast-optimize/Doc/Makefile
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/Makefile (original)
+++ python/branches/tlee-ast-optimize/Doc/Makefile Tue Jul 1 14:28:00 2008
@@ -33,15 +33,15 @@
fi
@if [ ! -d tools/docutils ]; then \
echo "Checking out Docutils..."; \
- svn checkout $(SVNROOT)/external/docutils-0.4/docutils tools/docutils; \
+ svn checkout $(SVNROOT)/external/docutils-0.5/docutils tools/docutils; \
fi
@if [ ! -d tools/jinja ]; then \
echo "Checking out Jinja..."; \
- svn checkout $(SVNROOT)/external/Jinja-1.1/jinja tools/jinja; \
+ svn checkout $(SVNROOT)/external/Jinja-1.2/jinja tools/jinja; \
fi
@if [ ! -d tools/pygments ]; then \
echo "Checking out Pygments..."; \
- svn checkout $(SVNROOT)/external/Pygments-0.9/pygments tools/pygments; \
+ svn checkout $(SVNROOT)/external/Pygments-0.10/pygments tools/pygments; \
fi
update: checkout
@@ -103,6 +103,8 @@
@echo "Building finished; now copy build/pydoc-topics/pydoc_topics.py " \
"into the Lib/ directory"
+htmlview: html
+ $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
clean:
-rm -rf build/*
-rm -rf tools/sphinx
Modified: python/branches/tlee-ast-optimize/Doc/library/collections.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/collections.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/library/collections.rst Tue Jul 1 14:28:00 2008
@@ -540,8 +540,8 @@
raise ValueError('Got unexpected field names: %r' % kwds.keys())
return result
<BLANKLINE>
- def __getnewargs__(self):
- return tuple(self)
+ def __getnewargs__(self):
+ return tuple(self)
<BLANKLINE>
x = property(itemgetter(0))
y = property(itemgetter(1))
Modified: python/branches/tlee-ast-optimize/Doc/library/fractions.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/fractions.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/library/fractions.rst Tue Jul 1 14:28:00 2008
@@ -9,38 +9,74 @@
.. versionadded:: 2.6
-The :mod:`fractions` module defines an immutable, infinite-precision
-Fraction number class.
+The :mod:`fractions` module provides support for rational number arithmetic.
+A Fraction instance can be constructed from a pair of integers, from
+another rational number, or from a string.
+
.. class:: Fraction(numerator=0, denominator=1)
Fraction(other_fraction)
Fraction(string)
The first version requires that *numerator* and *denominator* are
instances of :class:`numbers.Integral` and returns a new
- ``Fraction`` representing ``numerator/denominator``. If
- *denominator* is :const:`0`, raises a :exc:`ZeroDivisionError`. The
- second version requires that *other_fraction* is an instance of
- :class:`numbers.Rational` and returns an instance of
- :class:`Fraction` with the same value. The third version expects a
- string of the form ``[-+]?[0-9]+(/[0-9]+)?``, optionally surrounded
- by spaces.
-
- Implements all of the methods and operations from
- :class:`numbers.Rational` and is immutable and hashable.
+ :class:`Fraction` instance with value ``numerator/denominator``. If
+ *denominator* is :const:`0`, it raises a
+ :exc:`ZeroDivisionError`. The second version requires that
+ *other_fraction* is an instance of :class:`numbers.Rational` and
+ returns an :class:`Fraction` instance with the same value. The
+ last version of the constructor expects a string or unicode
+ instance in one of two possible forms. The first form is::
+
+ [sign] numerator ['/' denominator]
+
+ where the optional ``sign`` may be either '+' or '-' and
+ ``numerator`` and ``denominator`` (if present) are strings of
+ decimal digits. The second permitted form is that of a number
+ containing a decimal point::
+
+ [sign] integer '.' [fraction] | [sign] '.' fraction
+
+ where ``integer`` and ``fraction`` are strings of digits. In
+ either form the input string may also have leading and/or trailing
+ whitespace. Here are some examples::
+
+ >>> from fractions import Fraction
+ >>> Fraction(16, -10)
+ Fraction(-8, 5)
+ >>> Fraction(123)
+ Fraction(123, 1)
+ >>> Fraction()
+ Fraction(0, 1)
+ >>> Fraction('3/7')
+ Fraction(3, 7)
+ [40794 refs]
+ >>> Fraction(' -3/7 ')
+ Fraction(-3, 7)
+ >>> Fraction('1.414213 \t\n')
+ Fraction(1414213, 1000000)
+ >>> Fraction('-.125')
+ Fraction(-1, 8)
+
+
+ The :class:`Fraction` class inherits from the abstract base class
+ :class:`numbers.Rational`, and implements all of the methods and
+ operations from that class. :class:`Fraction` instances are hashable,
+ and should be treated as immutable. In addition,
+ :class:`Fraction` has the following methods:
.. method:: from_float(flt)
- This classmethod constructs a :class:`Fraction` representing the exact
+ This class method constructs a :class:`Fraction` representing the exact
value of *flt*, which must be a :class:`float`. Beware that
``Fraction.from_float(0.3)`` is not the same value as ``Fraction(3, 10)``
.. method:: from_decimal(dec)
- This classmethod constructs a :class:`Fraction` representing the exact
+ This class method constructs a :class:`Fraction` representing the exact
value of *dec*, which must be a :class:`decimal.Decimal`.
@@ -52,34 +88,24 @@
>>> from fractions import Fraction
>>> Fraction('3.1415926535897932').limit_denominator(1000)
- Fraction(355L, 113L)
+ Fraction(355, 113)
or for recovering a rational number that's represented as a float:
>>> from math import pi, cos
>>> Fraction.from_float(cos(pi/3))
- Fraction(4503599627370497L, 9007199254740992L)
+ Fraction(4503599627370497, 9007199254740992)
>>> Fraction.from_float(cos(pi/3)).limit_denominator()
- Fraction(1L, 2L)
-
-
- .. method:: __floor__()
-
- Returns the greatest :class:`int` ``<= self``.
-
-
- .. method:: __ceil__()
-
- Returns the least :class:`int` ``>= self``.
+ Fraction(1, 2)
- .. method:: __round__()
- __round__(ndigits)
+.. function:: gcd(a, b)
- The first version returns the nearest :class:`int` to ``self``, rounding
- half to even. The second version rounds ``self`` to the nearest multiple
- of ``Fraction(1, 10**ndigits)`` (logically, if ``ndigits`` is negative),
- again rounding half toward even.
+ Return the greatest common divisor of the integers `a` and `b`. If
+ either `a` or `b` is nonzero, then the absolute value of `gcd(a,
+ b)` is the largest integer that divides both `a` and `b`. `gcd(a,b)`
+ has the same sign as `b` if `b` is nonzero; otherwise it takes the sign
+ of `a`. `gcd(0, 0)` returns `0`.
.. seealso::
Modified: python/branches/tlee-ast-optimize/Doc/library/multiprocessing.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/multiprocessing.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/library/multiprocessing.rst Tue Jul 1 14:28:00 2008
@@ -6,23 +6,24 @@
.. versionadded:: 2.6
+
Introduction
----------------------
-:mod:`multiprocessing` is a package that supports spawning processes
-using an API similar to the :mod:`threading` module. The
-:mod:`multiprocessing` package offers both local and remote
-concurrency, effectively side-stepping the :term:`Global Interpreter
-Lock` by using subprocesses instead of threads. Due to this, the
-:mod:`multiprocessing` module allows the programmer to fully leverage
-multiple processors on a given machine. It runs on both Unix and
+:mod:`multiprocessing` is a package that supports spawning processes using an
+API similar to the :mod:`threading` module. The :mod:`multiprocessing` package
+offers both local and remote concurrency, effectively side-stepping the
+:term:`Global Interpreter Lock` by using subprocesses instead of threads. Due
+to this, the :mod:`multiprocessing` module allows the programmer to fully
+leverage multiple processors on a given machine. It runs on both Unix and
Windows.
+
The :class:`Process` class
~~~~~~~~~~~~~~~~~~~~~~~~~~
In :mod:`multiprocessing`, processes are spawned by creating a :class:`Process`
-object and then calling its :meth:`Process.start` method. :class:`Process`
+object and then calling its :meth:`~Process.start` method. :class:`Process`
follows the API of :class:`threading.Thread`. A trivial example of a
multiprocess program is ::
@@ -87,11 +88,12 @@
p.join()
The two connection objects returned by :func:`Pipe` represent the two ends of
- the pipe. Each connection object has :meth:`send` and :meth:`recv` methods
- (among others). Note that data in a pipe may become corrupted if two
- processes (or threads) try to read from or write to the *same* end of the
- pipe at the same time. Of course there is no risk of corruption from
- processes using different ends of the pipe at the same time.
+ the pipe. Each connection object has :meth:`~Connection.send` and
+ :meth:`~Connection.recv` methods (among others). Note that data in a pipe
+ may become corrupted if two processes (or threads) try to read from or write
+ to the *same* end of the pipe at the same time. Of course there is no risk
+ of corruption from processes using different ends of the pipe at the same
+ time.
Synchronization between processes
@@ -212,7 +214,7 @@
Using a pool of workers
~~~~~~~~~~~~~~~~~~~~~~~
-The :class:`multiprocessing.pool.Pool()` class represents a pool of worker
+The :class:`~multiprocessing.pool.Pool` class represents a pool of worker
processes. It has methods which allows tasks to be offloaded to the worker
processes in a few different ways.
@@ -248,8 +250,8 @@
The constructor should always be called with keyword arguments. *group*
should always be ``None``; it exists solely for compatibility with
- :class:`threading.Thread`. *target* is the callable object to be invoked by
- the :meth:`run()` method. It defaults to None, meaning nothing is
+ :class:`~threading.Thread`. *target* is the callable object to be invoked by
+ the :meth:`run()` method. It defaults to ``None``, meaning nothing is
called. *name* is the process name. By default, a unique name is constructed
of the form 'Process-N\ :sub:`1`:N\ :sub:`2`:...:N\ :sub:`k`' where N\
:sub:`1`,N\ :sub:`2`,...,N\ :sub:`k` is a sequence of integers whose length
@@ -360,7 +362,7 @@
.. method:: terminate()
Terminate the process. On Unix this is done using the ``SIGTERM`` signal;
- on Windows ``TerminateProcess()`` is used. Note that exit handlers and
+ on Windows :cfunc:`TerminateProcess` is used. Note that exit handlers and
finally clauses, etc., will not be executed.
Note that descendant processes of the process will *not* be terminated --
@@ -416,14 +418,17 @@
The :class:`Queue` and :class:`JoinableQueue` types are multi-producer,
multi-consumer FIFO queues modelled on the :class:`Queue.Queue` class in the
standard library. They differ in that :class:`Queue` lacks the
-:meth:`task_done` and :meth:`join` methods introduced into Python 2.5's
-:class:`Queue.Queue` class.
+:meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join` methods introduced
+into Python 2.5's :class:`Queue.Queue` class.
If you use :class:`JoinableQueue` then you **must** call
:meth:`JoinableQueue.task_done` for each task removed from the queue or else the
semaphore used to count the number of unfinished tasks may eventually overflow
raising an exception.
+Note that one can also create a shared queue by using a manager object -- see
+:ref:`multiprocessing-managers`.
+
.. note::
:mod:`multiprocessing` uses the usual :exc:`Queue.Empty` and
@@ -453,9 +458,6 @@
Note that a queue created using a manager does not have this issue. See
:ref:`multiprocessing-programming`.
-Note that one can also create a shared queue by using a manager object -- see
-:ref:`multiprocessing-managers`.
-
For an example of the usage of queues for interprocess communication see
:ref:`multiprocessing-examples`.
@@ -481,7 +483,7 @@
standard library's :mod:`Queue` module are raised to signal timeouts.
:class:`Queue` implements all the methods of :class:`Queue.Queue` except for
- :meth:`task_done` and :meth:`join`.
+ :meth:`~Queue.Queue.task_done` and :meth:`~Queue.Queue.join`.
.. method:: qsize()
@@ -549,13 +551,13 @@
By default if a process is not the creator of the queue then on exit it
will attempt to join the queue's background thread. The process can call
- :meth:`cancel_join_thread()` to make :meth:`join_thread()` do nothing.
+ :meth:`cancel_join_thread` to make :meth:`join_thread` do nothing.
.. method:: cancel_join_thread()
Prevent :meth:`join_thread` from blocking. In particular, this prevents
the background thread from being joined automatically when the process
- exits -- see :meth:`join_thread()`.
+ exits -- see :meth:`join_thread`.
.. class:: JoinableQueue([maxsize])
@@ -566,13 +568,13 @@
.. method:: task_done()
Indicate that a formerly enqueued task is complete. Used by queue consumer
- threads. For each :meth:`get` used to fetch a task, a subsequent call to
- :meth:`task_done` tells the queue that the processing on the task is
- complete.
-
- If a :meth:`join` is currently blocking, it will resume when all items
- have been processed (meaning that a :meth:`task_done` call was received
- for every item that had been :meth:`put` into the queue).
+ threads. For each :meth:`~Queue.get` used to fetch a task, a subsequent
+ call to :meth:`task_done` tells the queue that the processing on the task
+ is complete.
+
+ If a :meth:`~Queue.join` is currently blocking, it will resume when all
+ items have been processed (meaning that a :meth:`task_done` call was
+ received for every item that had been :meth:`~Queue.put` into the queue).
Raises a :exc:`ValueError` if called more times than there were items
placed in the queue.
@@ -586,7 +588,7 @@
queue. The count goes down whenever a consumer thread calls
:meth:`task_done` to indicate that the item was retrieved and all work on
it is complete. When the count of unfinished tasks drops to zero,
- :meth:`join` unblocks.
+ :meth:`~Queue.join` unblocks.
Miscellaneous
@@ -628,17 +630,17 @@
freeze_support()
Process(target=f).start()
- If the :func:`freeze_support()` line is missed out then trying to run the
- frozen executable will raise :exc:`RuntimeError`.
+ If the ``freeze_support()`` line is missed out then trying to run the frozen
+ executable will raise :exc:`RuntimeError`.
If the module is being run normally by the Python interpreter then
- :func:`freeze_support()` has no effect.
+ :func:`freeze_support` has no effect.
.. function:: set_executable()
Sets the path of the python interpreter to use when starting a child process.
- (By default `sys.executable` is used). Embedders will probably need to do
- some thing like ::
+ (By default :data:`sys.executable` is used). Embedders will probably need to
+ do some thing like ::
setExecutable(os.path.join(sys.exec_prefix, 'pythonw.exe'))
@@ -659,7 +661,7 @@
Connection objects allow the sending and receiving of picklable objects or
strings. They can be thought of as message oriented connected sockets.
-Connection objects usually created using :func:`Pipe()` -- see also
+Connection objects usually created using :func:`Pipe` -- see also
:ref:`multiprocessing-listeners-clients`.
.. class:: Connection
@@ -756,9 +758,10 @@
receives, which can be a security risk unless you can trust the process
which sent the message.
- Therefore, unless the connection object was produced using :func:`Pipe()`
- you should only use the `recv()` and `send()` methods after performing some
- sort of authentication. See :ref:`multiprocessing-auth-keys`.
+ Therefore, unless the connection object was produced using :func:`Pipe` you
+ should only use the :meth:`~Connection.recv` and :meth:`~Connection.send`
+ methods after performing some sort of authentication. See
+ :ref:`multiprocessing-auth-keys`.
.. warning::
@@ -771,8 +774,8 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~
Generally synchronization primitives are not as necessary in a multiprocess
-program as they are in a mulithreaded program. See the documentation for the
-standard library's :mod:`threading` module.
+program as they are in a mulithreaded program. See the documentation for
+:mod:`threading` module.
Note that one can also create synchronization primitives by using a manager
object -- see :ref:`multiprocessing-managers`.
@@ -786,7 +789,7 @@
.. class:: Condition([lock])
- A condition variable: a clone of `threading.Condition`.
+ A condition variable: a clone of :class:`threading.Condition`.
If *lock* is specified then it should be a :class:`Lock` or :class:`RLock`
object from :mod:`multiprocessing`.
@@ -809,7 +812,7 @@
.. note::
- The :meth:`acquire()` method of :class:`BoundedSemaphore`, :class:`Lock`,
+ The :meth:`acquire` method of :class:`BoundedSemaphore`, :class:`Lock`,
:class:`RLock` and :class:`Semaphore` has a timeout parameter not supported
by the equivalents in :mod:`threading`. The signature is
``acquire(block=True, timeout=None)`` with keyword parameters being
@@ -835,7 +838,7 @@
It is possible to create shared objects using shared memory which can be
inherited by child processes.
-.. function:: Value(typecode_or_type[, lock[, *args]])
+.. function:: Value(typecode_or_type[, *args, lock]])
Return a :mod:`ctypes` object allocated from shared memory. By default the
return value is actually a synchronized wrapper for the object.
@@ -927,7 +930,7 @@
attributes which allow one to use it to store and retrieve strings -- see
documentation for :mod:`ctypes`.
-.. function:: Array(typecode_or_type, size_or_initializer[, lock[, *args]])
+.. function:: Array(typecode_or_type, size_or_initializer[, *args[, lock]])
The same as :func:`RawArray` except that depending on the value of *lock* a
process-safe synchronization wrapper may be returned instead of a raw ctypes
@@ -969,11 +972,11 @@
:class:`multiprocessing.RLock` object is created automatically.
A synchronized wrapper will have two methods in addition to those of the
- object it wraps: :meth:`get_obj()` returns the wrapped object and
- :meth:`get_lock()` returns the lock object used for synchronization.
+ object it wraps: :meth:`get_obj` returns the wrapped object and
+ :meth:`get_lock` returns the lock object used for synchronization.
Note that accessing the ctypes object through the wrapper can be a lot slower
- han accessing the raw ctypes object.
+ than accessing the raw ctypes object.
The table below compares the syntax for creating shared ctypes objects from
@@ -1049,10 +1052,10 @@
.. function:: multiprocessing.Manager()
- Returns a started :class:`SyncManager` object which can be used for sharing
- objects between processes. The returned manager object corresponds to a
- spawned child process and has methods which will create shared objects and
- return corresponding proxies.
+ Returns a started :class:`~multiprocessing.managers.SyncManager` object which
+ can be used for sharing objects between processes. The returned manager
+ object corresponds to a spawned child process and has methods which will
+ create shared objects and return corresponding proxies.
.. module:: multiprocessing.managers
:synopsis: Share data between process with shared objects.
@@ -1092,7 +1095,7 @@
.. method:: shutdown()
Stop the process used by the manager. This is only available if
- meth:`start` has been used to start the server process.
+ :meth:`start` has been used to start the server process.
This can be called multiple times.
@@ -1106,12 +1109,12 @@
*callable* is a callable used for creating objects for this type
identifier. If a manager instance will be created using the
- :meth:`from_address()` classmethod or if the *create_method* argument is
+ :meth:`from_address` classmethod or if the *create_method* argument is
``False`` then this can be left as ``None``.
- *proxytype* is a subclass of :class:`multiprocessing.managers.BaseProxy`
- which is used to create proxies for shared objects with this *typeid*. If
- ``None`` then a proxy class is created automatically.
+ *proxytype* is a subclass of :class:`BaseProxy` which is used to create
+ proxies for shared objects with this *typeid*. If ``None`` then a proxy
+ class is created automatically.
*exposed* is used to specify a sequence of method names which proxies for
this typeid should be allowed to access using
@@ -1119,7 +1122,7 @@
:attr:`proxytype._exposed_` is used instead if it exists.) In the case
where no exposed list is specified, all "public methods" of the shared
object will be accessible. (Here a "public method" means any attribute
- which has a ``__call__()`` method and whose name does not begin with
+ which has a :meth:`__call__` method and whose name does not begin with
``'_'``.)
*method_to_typeid* is a mapping used to specify the return type of those
@@ -1144,7 +1147,7 @@
A subclass of :class:`BaseManager` which can be used for the synchronization
of processes. Objects of this type are returned by
- :func:`multiprocessing.Manager()`.
+ :func:`multiprocessing.Manager`.
It also supports creation of shared lists and dictionaries.
@@ -1175,7 +1178,7 @@
.. method:: Queue([maxsize])
- Create a shared `Queue.Queue` object and return a proxy for it.
+ Create a shared :class:`Queue.Queue` object and return a proxy for it.
.. method:: RLock()
@@ -1188,7 +1191,7 @@
.. method:: Array(typecode, sequence)
- Create an array and return a proxy for it. (*format* is ignored.)
+ Create an array and return a proxy for it.
.. method:: Value(typecode, value)
@@ -1229,8 +1232,8 @@
>>>>>>>>>>>>>>>>>>>
To create one's own manager, one creates a subclass of :class:`BaseManager` and
-use the :meth:`resgister()` classmethod to register new types or callables with
-the manager class. For example::
+use the :meth:`~BaseManager.resgister` classmethod to register new types or
+callables with the manager class. For example::
from multiprocessing.managers import BaseManager
@@ -1329,7 +1332,7 @@
>>> a = manager.list()
>>> b = manager.list()
- >>> a.append(b) # referent of `a` now contains referent of `b`
+ >>> a.append(b) # referent of a now contains referent of b
>>> print a, b
[[]] []
>>> b.append('hello')
@@ -1376,7 +1379,7 @@
Note in particular that an exception will be raised if *methodname* has
not been *exposed*
- An example of the usage of :meth:`_call_method()`::
+ An example of the usage of :meth:`_call_method`::
>>> l = manager.list(range(10))
>>> l._call_method('__len__')
@@ -1420,7 +1423,7 @@
:synopsis: Create pools of processes.
One can create a pool of processes which will carry out tasks submitted to it
-with the :class:`Pool` class in :mod:`multiprocess.pool`.
+with the :class:`Pool` class.
.. class:: multiprocessing.Pool([processes[, initializer[, initargs]]])
@@ -1458,7 +1461,7 @@
.. method:: map_async(func, iterable[, chunksize[, callback]])
- A variant of the :meth:`.map` method which returns a result object.
+ A variant of the :meth:`map` method which returns a result object.
If *callback* is specified then it should be a callable which accepts a
single argument. When the result becomes ready *callback* is applied to
@@ -1566,7 +1569,7 @@
However, the :mod:`multiprocessing.connection` module allows some extra
flexibility. It basically gives a high level message oriented API for dealing
with sockets or Windows named pipes, and also has support for *digest
-authentication* using the :mod:`hmac` module from the standard library.
+authentication* using the :mod:`hmac` module.
.. function:: deliver_challenge(connection, authkey)
@@ -1589,7 +1592,7 @@
.. function:: Client(address[, family[, authenticate[, authkey]]])
Attempt to set up a connection to the listener which is using address
- *address*, returning a :class:`Connection`.
+ *address*, returning a :class:`~multiprocessing.Connection`.
The type of the connection is determined by *family* argument, but this can
generally be omitted since it can usually be inferred from the format of
@@ -1665,15 +1668,6 @@
Exception raised when there is an authentication error.
-.. exception:: BufferTooShort
-
- Exception raise by the :meth:`Connection.recv_bytes_into` method of a
- connection object when the supplied buffer object is too small for the
- message read.
-
- If *e* is an instance of :exc:`BufferTooShort` then ``e.args[0]`` will give
- the message as a byte string.
-
**Examples**
@@ -1756,11 +1750,11 @@
If authentication is requested but do authentication key is specified then the
return value of ``current_process().get_auth_key`` is used (see
-:class:`Process`). This value will automatically inherited by any
-:class:`Process` object that the current process creates. This means that (by
-default) all processes of a multi-process program will share a single
-authentication key which can be used when setting up connections between the
-themselves.
+:class:`~multiprocessing.Process`). This value will automatically inherited by
+any :class:`~multiprocessing.Process` object that the current process creates.
+This means that (by default) all processes of a multi-process program will share
+a single authentication key which can be used when setting up connections
+between the themselves.
Suitable authentication keys can also be generated by using :func:`os.urandom`.
@@ -1810,7 +1804,7 @@
:synopsis: Dumb wrapper around threading.
:mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` but is
-no more than a wrapper around the `threading` module.
+no more than a wrapper around the :mod:`threading` module.
.. _multiprocessing-programming:
@@ -1870,8 +1864,7 @@
processes.
Therefore it is probably best to only consider using
- :meth:`Process.terminate()` on processes which never use any shared
- resources.
+ :meth:`Process.terminate` on processes which never use any shared resources.
Joining processes that use queues
@@ -1994,7 +1987,7 @@
p = Process(target=foo)
p.start()
- (The :func:`freeze_support()` line can be omitted if the program will be run
+ (The ``freeze_support()`` line can be omitted if the program will be run
normally instead of frozen.)
This allows the newly spawned Python interpreter to safely import the module
@@ -2047,4 +2040,4 @@
You will need to have private key authentication for all hosts configured for
this to work.
-.. literalinclude:: ../includes/mp_distributing.py
\ No newline at end of file
+.. literalinclude:: ../includes/mp_distributing.py
Modified: python/branches/tlee-ast-optimize/Doc/library/socketserver.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/socketserver.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/library/socketserver.rst Tue Jul 1 14:28:00 2008
@@ -158,6 +158,8 @@
Tells the :meth:`serve_forever` loop to stop and waits until it does.
+ .. versionadded:: 2.6
+
.. data:: address_family
Modified: python/branches/tlee-ast-optimize/Doc/library/ssl.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/ssl.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/library/ssl.rst Tue Jul 1 14:28:00 2008
@@ -54,7 +54,7 @@
network connection. This error is a subtype of :exc:`socket.error`, which
in turn is a subtype of :exc:`IOError`.
-.. function:: wrap_socket (sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None)
+.. function:: wrap_socket (sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True)
Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance of :class:`ssl.SSLSocket`, a subtype
of :class:`socket.socket`, which wraps the underlying socket in an SSL context.
@@ -122,6 +122,18 @@
In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4),
an SSLv2 client could not connect to an SSLv23 server.
+ The parameter ``do_handshake_on_connect`` specifies whether to do the SSL
+ handshake automatically after doing a :meth:`socket.connect`, or whether the
+ application program will call it explicitly, by invoking the :meth:`SSLSocket.do_handshake`
+ method. Calling :meth:`SSLSocket.do_handshake` explicitly gives the program control over
+ the blocking behavior of the socket I/O involved in the handshake.
+
+ The parameter ``suppress_ragged_eofs`` specifies how the :meth:`SSLSocket.read`
+ method should signal unexpected EOF from the other end of the connection. If specified
+ as :const:`True` (the default), it returns a normal EOF in response to unexpected
+ EOF errors raised from the underlying socket; if :const:`False`, it will raise
+ the exceptions back to the caller.
+
.. function:: RAND_status()
Returns True if the SSL pseudo-random number generator has been
@@ -290,6 +302,25 @@
number of secret bits being used. If no connection has been
established, returns ``None``.
+.. method:: SSLSocket.do_handshake()
+
+ Perform a TLS/SSL handshake. If this is used with a non-blocking socket,
+ it may raise :exc:`SSLError` with an ``arg[0]`` of :const:`SSL_ERROR_WANT_READ`
+ or :const:`SSL_ERROR_WANT_WRITE`, in which case it must be called again until it
+ completes successfully. For example, to simulate the behavior of a blocking socket,
+ one might write::
+
+ while True:
+ try:
+ s.do_handshake()
+ break
+ except ssl.SSLError, err:
+ if err.args[0] == ssl.SSL_ERROR_WANT_READ:
+ select.select([s], [], [])
+ elif err.args[0] == ssl.SSL_ERROR_WANT_WRITE:
+ select.select([], [s], [])
+ else:
+ raise
.. index:: single: certificates
@@ -367,6 +398,7 @@
chains for each issuer you are willing to trust. Again, this file just
contains these chains concatenated together. For validation, Python will
use the first chain it finds in the file which matches.
+
Some "standard" root certificates are available from various certification
authorities:
`CACert.org <http://www.cacert.org/index.php?id=3>`_,
Modified: python/branches/tlee-ast-optimize/Doc/reference/compound_stmts.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/reference/compound_stmts.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/reference/compound_stmts.rst Tue Jul 1 14:28:00 2008
@@ -538,10 +538,10 @@
class`\es, descriptors can be used to create instance variables with different
implementation details.
-Class definitions, like function definitions, may be wrapped by one or
-more :term:`decorator` expressions. The evaluation rules for the
-decorator expressions are the same as for functions. The result must
-be a class object, which is then bound to the class name.
+Class definitions, like function definitions, may be wrapped by one or more
+:term:`decorator` expressions. The evaluation rules for the decorator
+expressions are the same as for functions. The result must be a class object,
+which is then bound to the class name.
.. rubric:: Footnotes
Modified: python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst (original)
+++ python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst Tue Jul 1 14:28:00 2008
@@ -1284,12 +1284,12 @@
Here are all of the changes that Python 2.6 makes to the core Python language.
* The :func:`hasattr` function was catching and ignoring all errors,
- under the assumption that they meant a :meth:`__getattr__` method has
- failing somewhere and the return value of :func:`hasattr` would therefore
- be ``False``. This logic shouldn't be applied to
- :exc:`KeyboardInterrupt` and :exc:`SystemExit`, however; Python 2.6 will
- no longer discard such exceptions when :func:`hasattr` encounters them.
- (Fixed by Benjamin Peterson; :issue:`2196`.)
+ under the assumption that they meant a :meth:`__getattr__` method
+ was failing somewhere and the return value of :func:`hasattr` would
+ therefore be ``False``. This logic shouldn't be applied to
+ :exc:`KeyboardInterrupt` and :exc:`SystemExit`, however; Python 2.6
+ will no longer discard such exceptions when :func:`hasattr`
+ encounters them. (Fixed by Benjamin Peterson; :issue:`2196`.)
* When calling a function using the ``**`` syntax to provide keyword
arguments, you are no longer required to use a Python dictionary;
Modified: python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py (original)
+++ python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py Tue Jul 1 14:28:00 2008
@@ -94,7 +94,7 @@
# The timeout is necessary in BDB 4.5, since DB_EVENT_REP_STARTUPDONE
# is not generated if the master has no new transactions.
# This is solved in BDB 4.6 (#15542).
- timeout = time.time()+2
+ timeout = time.time()+10
while (time.time()<timeout) and not (self.confirmed_master and self.client_startupdone) :
time.sleep(0.02)
if db.version() >= (4,6) :
Modified: python/branches/tlee-ast-optimize/Lib/fractions.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/fractions.py (original)
+++ python/branches/tlee-ast-optimize/Lib/fractions.py Tue Jul 1 14:28:00 2008
@@ -203,7 +203,7 @@
def __repr__(self):
"""repr(self)"""
- return ('Fraction(%r, %r)' % (self._numerator, self._denominator))
+ return ('Fraction(%s, %s)' % (self._numerator, self._denominator))
def __str__(self):
"""str(self)"""
Modified: python/branches/tlee-ast-optimize/Lib/logging/config.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/logging/config.py (original)
+++ python/branches/tlee-ast-optimize/Lib/logging/config.py Tue Jul 1 14:28:00 2008
@@ -155,8 +155,7 @@
h.setLevel(logging._levelNames[level])
if len(fmt):
h.setFormatter(formatters[fmt])
- #temporary hack for FileHandler and MemoryHandler.
- if klass == logging.handlers.MemoryHandler:
+ if issubclass(klass, logging.handlers.MemoryHandler):
if "target" in opts:
target = cp.get(sectname,"target")
else:
Modified: python/branches/tlee-ast-optimize/Lib/multiprocessing/managers.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/multiprocessing/managers.py (original)
+++ python/branches/tlee-ast-optimize/Lib/multiprocessing/managers.py Tue Jul 1 14:28:00 2008
@@ -964,10 +964,9 @@
return self._callmethod('notify_all')
class EventProxy(BaseProxy):
- # XXX will Event.isSet name be available in Py3.0?
- _exposed_ = ('isSet', 'set', 'clear', 'wait')
+ _exposed_ = ('is_set', 'set', 'clear', 'wait')
def is_set(self):
- return self._callmethod('isSet')
+ return self._callmethod('is_set')
def set(self):
return self._callmethod('set')
def clear(self):
Modified: python/branches/tlee-ast-optimize/Lib/ssl.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/ssl.py (original)
+++ python/branches/tlee-ast-optimize/Lib/ssl.py Tue Jul 1 14:28:00 2008
@@ -74,7 +74,7 @@
SSL_ERROR_EOF, \
SSL_ERROR_INVALID_ERROR_CODE
-from socket import socket
+from socket import socket, _fileobject
from socket import getnameinfo as _getnameinfo
import base64 # for DER-to-PEM translation
@@ -86,8 +86,16 @@
def __init__(self, sock, keyfile=None, certfile=None,
server_side=False, cert_reqs=CERT_NONE,
- ssl_version=PROTOCOL_SSLv23, ca_certs=None):
+ ssl_version=PROTOCOL_SSLv23, ca_certs=None,
+ do_handshake_on_connect=True,
+ suppress_ragged_eofs=True):
socket.__init__(self, _sock=sock._sock)
+ # the initializer for socket trashes the methods (tsk, tsk), so...
+ self.send = lambda x, flags=0: SSLSocket.send(self, x, flags)
+ self.recv = lambda x, flags=0: SSLSocket.recv(self, x, flags)
+ self.sendto = lambda data, addr, flags=0: SSLSocket.sendto(self, data, addr, flags)
+ self.recvfrom = lambda addr, buflen, flags: SSLSocket.recvfrom(self, addr, buflen, flags)
+
if certfile and not keyfile:
keyfile = certfile
# see if it's connected
@@ -101,18 +109,34 @@
self._sslobj = _ssl.sslwrap(self._sock, server_side,
keyfile, certfile,
cert_reqs, ssl_version, ca_certs)
+ if do_handshake_on_connect:
+ timeout = self.gettimeout()
+ try:
+ self.settimeout(None)
+ self.do_handshake()
+ finally:
+ self.settimeout(timeout)
self.keyfile = keyfile
self.certfile = certfile
self.cert_reqs = cert_reqs
self.ssl_version = ssl_version
self.ca_certs = ca_certs
+ self.do_handshake_on_connect = do_handshake_on_connect
+ self.suppress_ragged_eofs = suppress_ragged_eofs
+ self._makefile_refs = 0
def read(self, len=1024):
"""Read up to LEN bytes and return them.
Return zero-length string on EOF."""
- return self._sslobj.read(len)
+ try:
+ return self._sslobj.read(len)
+ except SSLError, x:
+ if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:
+ return ''
+ else:
+ raise
def write(self, data):
@@ -143,16 +167,27 @@
raise ValueError(
"non-zero flags not allowed in calls to send() on %s" %
self.__class__)
- return self._sslobj.write(data)
+ while True:
+ try:
+ v = self._sslobj.write(data)
+ except SSLError, x:
+ if x.args[0] == SSL_ERROR_WANT_READ:
+ return 0
+ elif x.args[0] == SSL_ERROR_WANT_WRITE:
+ return 0
+ else:
+ raise
+ else:
+ return v
else:
return socket.send(self, data, flags)
- def send_to (self, data, addr, flags=0):
+ def sendto (self, data, addr, flags=0):
if self._sslobj:
- raise ValueError("send_to not allowed on instances of %s" %
+ raise ValueError("sendto not allowed on instances of %s" %
self.__class__)
else:
- return socket.send_to(self, data, addr, flags)
+ return socket.sendto(self, data, addr, flags)
def sendall (self, data, flags=0):
if self._sslobj:
@@ -160,7 +195,12 @@
raise ValueError(
"non-zero flags not allowed in calls to sendall() on %s" %
self.__class__)
- return self._sslobj.write(data)
+ amount = len(data)
+ count = 0
+ while (count < amount):
+ v = self.send(data[count:])
+ count += v
+ return amount
else:
return socket.sendall(self, data, flags)
@@ -170,25 +210,51 @@
raise ValueError(
"non-zero flags not allowed in calls to sendall() on %s" %
self.__class__)
- return self._sslobj.read(data, buflen)
+ while True:
+ try:
+ return self.read(buflen)
+ except SSLError, x:
+ if x.args[0] == SSL_ERROR_WANT_READ:
+ continue
+ else:
+ raise x
else:
return socket.recv(self, buflen, flags)
- def recv_from (self, addr, buflen=1024, flags=0):
+ def recvfrom (self, addr, buflen=1024, flags=0):
if self._sslobj:
- raise ValueError("recv_from not allowed on instances of %s" %
+ raise ValueError("recvfrom not allowed on instances of %s" %
self.__class__)
else:
- return socket.recv_from(self, addr, buflen, flags)
+ return socket.recvfrom(self, addr, buflen, flags)
- def shutdown(self, how):
+ def pending (self):
+ if self._sslobj:
+ return self._sslobj.pending()
+ else:
+ return 0
+
+ def shutdown (self, how):
self._sslobj = None
socket.shutdown(self, how)
- def close(self):
+ def close (self):
self._sslobj = None
socket.close(self)
+ def close (self):
+ if self._makefile_refs < 1:
+ self._sslobj = None
+ socket.close(self)
+ else:
+ self._makefile_refs -= 1
+
+ def do_handshake (self):
+
+ """Perform a TLS/SSL handshake."""
+
+ self._sslobj.do_handshake()
+
def connect(self, addr):
"""Connects to remote ADDR, and then wraps the connection in
@@ -202,6 +268,8 @@
self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
self.cert_reqs, self.ssl_version,
self.ca_certs)
+ if self.do_handshake_on_connect:
+ self.do_handshake()
def accept(self):
@@ -210,260 +278,39 @@
SSL channel, and the address of the remote client."""
newsock, addr = socket.accept(self)
- return (SSLSocket(newsock, True, self.keyfile, self.certfile,
- self.cert_reqs, self.ssl_version,
- self.ca_certs), addr)
-
+ return (SSLSocket(newsock,
+ keyfile=self.keyfile,
+ certfile=self.certfile,
+ server_side=True,
+ cert_reqs=self.cert_reqs,
+ ssl_version=self.ssl_version,
+ ca_certs=self.ca_certs,
+ do_handshake_on_connect=self.do_handshake_on_connect,
+ suppress_ragged_eofs=self.suppress_ragged_eofs),
+ addr)
def makefile(self, mode='r', bufsize=-1):
"""Ouch. Need to make and return a file-like object that
works with the SSL connection."""
- if self._sslobj:
- return SSLFileStream(self._sslobj, mode, bufsize)
- else:
- return socket.makefile(self, mode, bufsize)
-
-
-class SSLFileStream:
-
- """A class to simulate a file stream on top of a socket.
- Most of this is just lifted from the socket module, and
- adjusted to work with an SSL stream instead of a socket."""
-
-
- default_bufsize = 8192
- name = "<SSL stream>"
-
- __slots__ = ["mode", "bufsize", "softspace",
- # "closed" is a property, see below
- "_sslobj", "_rbufsize", "_wbufsize", "_rbuf", "_wbuf",
- "_close", "_fileno"]
-
- def __init__(self, sslobj, mode='rb', bufsize=-1, close=False):
- self._sslobj = sslobj
- self.mode = mode # Not actually used in this version
- if bufsize < 0:
- bufsize = self.default_bufsize
- self.bufsize = bufsize
- self.softspace = False
- if bufsize == 0:
- self._rbufsize = 1
- elif bufsize == 1:
- self._rbufsize = self.default_bufsize
- else:
- self._rbufsize = bufsize
- self._wbufsize = bufsize
- self._rbuf = "" # A string
- self._wbuf = [] # A list of strings
- self._close = close
- self._fileno = -1
-
- def _getclosed(self):
- return self._sslobj is None
- closed = property(_getclosed, doc="True if the file is closed")
-
- def fileno(self):
- return self._fileno
-
- def close(self):
- try:
- if self._sslobj:
- self.flush()
- finally:
- if self._close and self._sslobj:
- self._sslobj.close()
- self._sslobj = None
-
- def __del__(self):
- try:
- self.close()
- except:
- # close() may fail if __init__ didn't complete
- pass
-
- def flush(self):
- if self._wbuf:
- buffer = "".join(self._wbuf)
- self._wbuf = []
- count = 0
- while (count < len(buffer)):
- written = self._sslobj.write(buffer)
- count += written
- buffer = buffer[written:]
-
- def write(self, data):
- data = str(data) # XXX Should really reject non-string non-buffers
- if not data:
- return
- self._wbuf.append(data)
- if (self._wbufsize == 0 or
- self._wbufsize == 1 and '\n' in data or
- self._get_wbuf_len() >= self._wbufsize):
- self.flush()
-
- def writelines(self, list):
- # XXX We could do better here for very long lists
- # XXX Should really reject non-string non-buffers
- self._wbuf.extend(filter(None, map(str, list)))
- if (self._wbufsize <= 1 or
- self._get_wbuf_len() >= self._wbufsize):
- self.flush()
-
- def _get_wbuf_len(self):
- buf_len = 0
- for x in self._wbuf:
- buf_len += len(x)
- return buf_len
-
- def read(self, size=-1):
- data = self._rbuf
- if size < 0:
- # Read until EOF
- buffers = []
- if data:
- buffers.append(data)
- self._rbuf = ""
- if self._rbufsize <= 1:
- recv_size = self.default_bufsize
- else:
- recv_size = self._rbufsize
- while True:
- data = self._sslobj.read(recv_size)
- if not data:
- break
- buffers.append(data)
- return "".join(buffers)
- else:
- # Read until size bytes or EOF seen, whichever comes first
- buf_len = len(data)
- if buf_len >= size:
- self._rbuf = data[size:]
- return data[:size]
- buffers = []
- if data:
- buffers.append(data)
- self._rbuf = ""
- while True:
- left = size - buf_len
- recv_size = max(self._rbufsize, left)
- data = self._sslobj.read(recv_size)
- if not data:
- break
- buffers.append(data)
- n = len(data)
- if n >= left:
- self._rbuf = data[left:]
- buffers[-1] = data[:left]
- break
- buf_len += n
- return "".join(buffers)
-
- def readline(self, size=-1):
- data = self._rbuf
- if size < 0:
- # Read until \n or EOF, whichever comes first
- if self._rbufsize <= 1:
- # Speed up unbuffered case
- assert data == ""
- buffers = []
- while data != "\n":
- data = self._sslobj.read(1)
- if not data:
- break
- buffers.append(data)
- return "".join(buffers)
- nl = data.find('\n')
- if nl >= 0:
- nl += 1
- self._rbuf = data[nl:]
- return data[:nl]
- buffers = []
- if data:
- buffers.append(data)
- self._rbuf = ""
- while True:
- data = self._sslobj.read(self._rbufsize)
- if not data:
- break
- buffers.append(data)
- nl = data.find('\n')
- if nl >= 0:
- nl += 1
- self._rbuf = data[nl:]
- buffers[-1] = data[:nl]
- break
- return "".join(buffers)
- else:
- # Read until size bytes or \n or EOF seen, whichever comes first
- nl = data.find('\n', 0, size)
- if nl >= 0:
- nl += 1
- self._rbuf = data[nl:]
- return data[:nl]
- buf_len = len(data)
- if buf_len >= size:
- self._rbuf = data[size:]
- return data[:size]
- buffers = []
- if data:
- buffers.append(data)
- self._rbuf = ""
- while True:
- data = self._sslobj.read(self._rbufsize)
- if not data:
- break
- buffers.append(data)
- left = size - buf_len
- nl = data.find('\n', 0, left)
- if nl >= 0:
- nl += 1
- self._rbuf = data[nl:]
- buffers[-1] = data[:nl]
- break
- n = len(data)
- if n >= left:
- self._rbuf = data[left:]
- buffers[-1] = data[:left]
- break
- buf_len += n
- return "".join(buffers)
-
- def readlines(self, sizehint=0):
- total = 0
- list = []
- while True:
- line = self.readline()
- if not line:
- break
- list.append(line)
- total += len(line)
- if sizehint and total >= sizehint:
- break
- return list
-
- # Iterator protocols
-
- def __iter__(self):
- return self
-
- def next(self):
- line = self.readline()
- if not line:
- raise StopIteration
- return line
-
+ self._makefile_refs += 1
+ return _fileobject(self, mode, bufsize)
def wrap_socket(sock, keyfile=None, certfile=None,
server_side=False, cert_reqs=CERT_NONE,
- ssl_version=PROTOCOL_SSLv23, ca_certs=None):
+ ssl_version=PROTOCOL_SSLv23, ca_certs=None,
+ do_handshake_on_connect=True,
+ suppress_ragged_eofs=True):
return SSLSocket(sock, keyfile=keyfile, certfile=certfile,
server_side=server_side, cert_reqs=cert_reqs,
- ssl_version=ssl_version, ca_certs=ca_certs)
+ ssl_version=ssl_version, ca_certs=ca_certs,
+ do_handshake_on_connect=do_handshake_on_connect,
+ suppress_ragged_eofs=suppress_ragged_eofs)
+
# some utility functions
@@ -549,5 +396,7 @@
for compability with Python 2.5 and earlier. Will disappear in
Python 3.0."""
- return _ssl.sslwrap(sock._sock, 0, keyfile, certfile, CERT_NONE,
- PROTOCOL_SSLv23, None)
+ ssl_sock = _ssl.sslwrap(sock._sock, 0, keyfile, certfile, CERT_NONE,
+ PROTOCOL_SSLv23, None)
+ ssl_sock.do_handshake()
+ return ssl_sock
Modified: python/branches/tlee-ast-optimize/Lib/test/test_audioop.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_audioop.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_audioop.py Tue Jul 1 14:28:00 2008
@@ -1,286 +1,169 @@
-# Test audioop.
import audioop
-from test.test_support import verbose
+import unittest
+from test.test_support import run_unittest
+
def gendata1():
return '\0\1\2'
def gendata2():
- if verbose:
- print 'getsample'
if audioop.getsample('\0\1', 2, 0) == 1:
return '\0\0\0\1\0\2'
else:
return '\0\0\1\0\2\0'
def gendata4():
- if verbose:
- print 'getsample'
if audioop.getsample('\0\0\0\1', 4, 0) == 1:
return '\0\0\0\0\0\0\0\1\0\0\0\2'
else:
return '\0\0\0\0\1\0\0\0\2\0\0\0'
-def testmax(data):
- if verbose:
- print 'max'
- if audioop.max(data[0], 1) != 2 or \
- audioop.max(data[1], 2) != 2 or \
- audioop.max(data[2], 4) != 2:
- return 0
- return 1
-
-def testminmax(data):
- if verbose:
- print 'minmax'
- if audioop.minmax(data[0], 1) != (0, 2) or \
- audioop.minmax(data[1], 2) != (0, 2) or \
- audioop.minmax(data[2], 4) != (0, 2):
- return 0
- return 1
-
-def testmaxpp(data):
- if verbose:
- print 'maxpp'
- if audioop.maxpp(data[0], 1) != 0 or \
- audioop.maxpp(data[1], 2) != 0 or \
- audioop.maxpp(data[2], 4) != 0:
- return 0
- return 1
-
-def testavg(data):
- if verbose:
- print 'avg'
- if audioop.avg(data[0], 1) != 1 or \
- audioop.avg(data[1], 2) != 1 or \
- audioop.avg(data[2], 4) != 1:
- return 0
- return 1
-
-def testavgpp(data):
- if verbose:
- print 'avgpp'
- if audioop.avgpp(data[0], 1) != 0 or \
- audioop.avgpp(data[1], 2) != 0 or \
- audioop.avgpp(data[2], 4) != 0:
- return 0
- return 1
-
-def testrms(data):
- if audioop.rms(data[0], 1) != 1 or \
- audioop.rms(data[1], 2) != 1 or \
- audioop.rms(data[2], 4) != 1:
- return 0
- return 1
-
-def testcross(data):
- if verbose:
- print 'cross'
- if audioop.cross(data[0], 1) != 0 or \
- audioop.cross(data[1], 2) != 0 or \
- audioop.cross(data[2], 4) != 0:
- return 0
- return 1
-
-def testadd(data):
- if verbose:
- print 'add'
- data2 = []
- for d in data:
- str = ''
- for s in d:
- str = str + chr(ord(s)*2)
- data2.append(str)
- if audioop.add(data[0], data[0], 1) != data2[0] or \
- audioop.add(data[1], data[1], 2) != data2[1] or \
- audioop.add(data[2], data[2], 4) != data2[2]:
- return 0
- return 1
-
-def testbias(data):
- if verbose:
- print 'bias'
- # Note: this test assumes that avg() works
- d1 = audioop.bias(data[0], 1, 100)
- d2 = audioop.bias(data[1], 2, 100)
- d4 = audioop.bias(data[2], 4, 100)
- if audioop.avg(d1, 1) != 101 or \
- audioop.avg(d2, 2) != 101 or \
- audioop.avg(d4, 4) != 101:
- return 0
- return 1
-
-def testlin2lin(data):
- if verbose:
- print 'lin2lin'
- # too simple: we test only the size
- for d1 in data:
- for d2 in data:
- got = len(d1)//3
- wtd = len(d2)//3
- if len(audioop.lin2lin(d1, got, wtd)) != len(d2):
- return 0
- return 1
-
-def testadpcm2lin(data):
- # Very cursory test
- if audioop.adpcm2lin('\0\0', 1, None) != ('\0\0\0\0', (0,0)):
- return 0
- return 1
-
-def testlin2adpcm(data):
- if verbose:
- print 'lin2adpcm'
- # Very cursory test
- if audioop.lin2adpcm('\0\0\0\0', 1, None) != ('\0\0', (0,0)):
- return 0
- return 1
-
-def testlin2alaw(data):
- if verbose:
- print 'lin2alaw'
- if audioop.lin2alaw(data[0], 1) != '\xd5\xc5\xf5' or \
- audioop.lin2alaw(data[1], 2) != '\xd5\xd5\xd5' or \
- audioop.lin2alaw(data[2], 4) != '\xd5\xd5\xd5':
- return 0
- return 1
-
-def testalaw2lin(data):
- if verbose:
- print 'alaw2lin'
- # Cursory
- d = audioop.lin2alaw(data[0], 1)
- if audioop.alaw2lin(d, 1) != data[0]:
- return 0
- return 1
-
-def testlin2ulaw(data):
- if verbose:
- print 'lin2ulaw'
- if audioop.lin2ulaw(data[0], 1) != '\xff\xe7\xdb' or \
- audioop.lin2ulaw(data[1], 2) != '\xff\xff\xff' or \
- audioop.lin2ulaw(data[2], 4) != '\xff\xff\xff':
- return 0
- return 1
-
-def testulaw2lin(data):
- if verbose:
- print 'ulaw2lin'
- # Cursory
- d = audioop.lin2ulaw(data[0], 1)
- if audioop.ulaw2lin(d, 1) != data[0]:
- return 0
- return 1
-
-def testmul(data):
- if verbose:
- print 'mul'
- data2 = []
- for d in data:
- str = ''
- for s in d:
- str = str + chr(ord(s)*2)
- data2.append(str)
- if audioop.mul(data[0], 1, 2) != data2[0] or \
- audioop.mul(data[1],2, 2) != data2[1] or \
- audioop.mul(data[2], 4, 2) != data2[2]:
- return 0
- return 1
-
-def testratecv(data):
- if verbose:
- print 'ratecv'
- state = None
- d1, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state)
- d2, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state)
- if d1 + d2 != '\000\000\001\001\002\001\000\000\001\001\002':
- return 0
- return 1
-
-def testreverse(data):
- if verbose:
- print 'reverse'
- if audioop.reverse(data[0], 1) != '\2\1\0':
- return 0
- return 1
-
-def testtomono(data):
- if verbose:
- print 'tomono'
- data2 = ''
- for d in data[0]:
- data2 = data2 + d + d
- if audioop.tomono(data2, 1, 0.5, 0.5) != data[0]:
- return 0
- return 1
-
-def testtostereo(data):
- if verbose:
- print 'tostereo'
- data2 = ''
- for d in data[0]:
- data2 = data2 + d + d
- if audioop.tostereo(data[0], 1, 1, 1) != data2:
- return 0
- return 1
-
-def testfindfactor(data):
- if verbose:
- print 'findfactor'
- if audioop.findfactor(data[1], data[1]) != 1.0:
- return 0
- return 1
-
-def testfindfit(data):
- if verbose:
- print 'findfit'
- if audioop.findfit(data[1], data[1]) != (0, 1.0):
- return 0
- return 1
-
-def testfindmax(data):
- if verbose:
- print 'findmax'
- if audioop.findmax(data[1], 1) != 2:
- return 0
- return 1
-
-def testgetsample(data):
- if verbose:
- print 'getsample'
- for i in range(3):
- if audioop.getsample(data[0], 1, i) != i or \
- audioop.getsample(data[1], 2, i) != i or \
- audioop.getsample(data[2], 4, i) != i:
- return 0
- return 1
-
-def testone(name, data):
- try:
- func = eval('test'+name)
- except NameError:
- print 'No test found for audioop.'+name+'()'
- return
- try:
- rv = func(data)
- except 'xx':
- print 'Test FAILED for audioop.'+name+'() (with an exception)'
- return
- if not rv:
- print 'Test FAILED for audioop.'+name+'()'
+data = [gendata1(), gendata2(), gendata4()]
-def test_main():
- data = [gendata1(), gendata2(), gendata4()]
- names = dir(audioop)
- # We know there is a routine 'add'
- routines = []
- for n in names:
- if type(eval('audioop.'+n)) == type(audioop.add):
- routines.append(n)
- for n in routines:
- testone(n, data)
+class TestAudioop(unittest.TestCase):
+
+ def test_max(self):
+ self.assertEqual(audioop.max(data[0], 1), 2)
+ self.assertEqual(audioop.max(data[1], 2), 2)
+ self.assertEqual(audioop.max(data[2], 4), 2)
+
+ def test_minmax(self):
+ self.assertEqual(audioop.minmax(data[0], 1), (0, 2))
+ self.assertEqual(audioop.minmax(data[1], 2), (0, 2))
+ self.assertEqual(audioop.minmax(data[2], 4), (0, 2))
+
+ def test_maxpp(self):
+ self.assertEqual(audioop.maxpp(data[0], 1), 0)
+ self.assertEqual(audioop.maxpp(data[1], 2), 0)
+ self.assertEqual(audioop.maxpp(data[2], 4), 0)
+
+ def test_avg(self):
+ self.assertEqual(audioop.avg(data[0], 1), 1)
+ self.assertEqual(audioop.avg(data[1], 2), 1)
+ self.assertEqual(audioop.avg(data[2], 4), 1)
+
+ def test_avgpp(self):
+ self.assertEqual(audioop.avgpp(data[0], 1), 0)
+ self.assertEqual(audioop.avgpp(data[1], 2), 0)
+ self.assertEqual(audioop.avgpp(data[2], 4), 0)
+
+ def test_rms(self):
+ self.assertEqual(audioop.rms(data[0], 1), 1)
+ self.assertEqual(audioop.rms(data[1], 2), 1)
+ self.assertEqual(audioop.rms(data[2], 4), 1)
+
+ def test_cross(self):
+ self.assertEqual(audioop.cross(data[0], 1), 0)
+ self.assertEqual(audioop.cross(data[1], 2), 0)
+ self.assertEqual(audioop.cross(data[2], 4), 0)
+
+ def test_add(self):
+ data2 = []
+ for d in data:
+ str = ''
+ for s in d:
+ str = str + chr(ord(s)*2)
+ data2.append(str)
+ self.assertEqual(audioop.add(data[0], data[0], 1), data2[0])
+ self.assertEqual(audioop.add(data[1], data[1], 2), data2[1])
+ self.assertEqual(audioop.add(data[2], data[2], 4), data2[2])
+
+ def test_bias(self):
+ # Note: this test assumes that avg() works
+ d1 = audioop.bias(data[0], 1, 100)
+ d2 = audioop.bias(data[1], 2, 100)
+ d4 = audioop.bias(data[2], 4, 100)
+ self.assertEqual(audioop.avg(d1, 1), 101)
+ self.assertEqual(audioop.avg(d2, 2), 101)
+ self.assertEqual(audioop.avg(d4, 4), 101)
+
+ def test_lin2lin(self):
+ # too simple: we test only the size
+ for d1 in data:
+ for d2 in data:
+ got = len(d1)//3
+ wtd = len(d2)//3
+ self.assertEqual(len(audioop.lin2lin(d1, got, wtd)), len(d2))
+
+ def test_adpcm2lin(self):
+ # Very cursory test
+ self.assertEqual(audioop.adpcm2lin('\0\0', 1, None), ('\0\0\0\0', (0,0)))
+
+ def test_lin2adpcm(self):
+ # Very cursory test
+ self.assertEqual(audioop.lin2adpcm('\0\0\0\0', 1, None), ('\0\0', (0,0)))
+
+ def test_lin2alaw(self):
+ self.assertEqual(audioop.lin2alaw(data[0], 1), '\xd5\xc5\xf5')
+ self.assertEqual(audioop.lin2alaw(data[1], 2), '\xd5\xd5\xd5')
+ self.assertEqual(audioop.lin2alaw(data[2], 4), '\xd5\xd5\xd5')
+
+ def test_alaw2lin(self):
+ # Cursory
+ d = audioop.lin2alaw(data[0], 1)
+ self.assertEqual(audioop.alaw2lin(d, 1), data[0])
+
+ def test_lin2ulaw(self):
+ self.assertEqual(audioop.lin2ulaw(data[0], 1), '\xff\xe7\xdb')
+ self.assertEqual(audioop.lin2ulaw(data[1], 2), '\xff\xff\xff')
+ self.assertEqual(audioop.lin2ulaw(data[2], 4), '\xff\xff\xff')
+
+ def test_ulaw2lin(self):
+ # Cursory
+ d = audioop.lin2ulaw(data[0], 1)
+ self.assertEqual(audioop.ulaw2lin(d, 1), data[0])
+
+ def test_mul(self):
+ data2 = []
+ for d in data:
+ str = ''
+ for s in d:
+ str = str + chr(ord(s)*2)
+ data2.append(str)
+ self.assertEqual(audioop.mul(data[0], 1, 2), data2[0])
+ self.assertEqual(audioop.mul(data[1],2, 2), data2[1])
+ self.assertEqual(audioop.mul(data[2], 4, 2), data2[2])
+
+ def test_ratecv(self):
+ state = None
+ d1, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state)
+ d2, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state)
+ self.assertEqual(d1 + d2, '\000\000\001\001\002\001\000\000\001\001\002')
+
+ def test_reverse(self):
+ self.assertEqual(audioop.reverse(data[0], 1), '\2\1\0')
+
+ def test_tomono(self):
+ data2 = ''
+ for d in data[0]:
+ data2 = data2 + d + d
+ self.assertEqual(audioop.tomono(data2, 1, 0.5, 0.5), data[0])
+
+ def test_tostereo(self):
+ data2 = ''
+ for d in data[0]:
+ data2 = data2 + d + d
+ self.assertEqual(audioop.tostereo(data[0], 1, 1, 1), data2)
+
+ def test_findfactor(self):
+ self.assertEqual(audioop.findfactor(data[1], data[1]), 1.0)
+
+ def test_findfit(self):
+ self.assertEqual(audioop.findfit(data[1], data[1]), (0, 1.0))
+
+ def test_findmax(self):
+ self.assertEqual(audioop.findmax(data[1], 1), 2)
+
+ def test_getsample(self):
+ for i in range(3):
+ self.assertEqual(audioop.getsample(data[0], 1, i), i)
+ self.assertEqual(audioop.getsample(data[1], 2, i), i)
+ self.assertEqual(audioop.getsample(data[2], 4, i), i)
+def test_main():
+ run_unittest(TestAudioop)
+
if __name__ == '__main__':
test_main()
Modified: python/branches/tlee-ast-optimize/Lib/test/test_cpickle.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_cpickle.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_cpickle.py Tue Jul 1 14:28:00 2008
@@ -94,23 +94,19 @@
pass
class cPickleDeepRecursive(unittest.TestCase):
-# I commented out, because the patch that fixes this was reverted, as
-# it broke the next test case. Check the issues for full history.
-# def test_issue2702(self):
-# '''This should raise a RecursionLimit but in some
-# platforms (FreeBSD, win32) sometimes raises KeyError instead,
-# or just silently terminates the interpreter (=crashes).
-# '''
-# nodes = [Node() for i in range(500)]
-# for n in nodes:
-# n.connections = list(nodes)
-# n.connections.remove(n)
-# self.assertRaises(RuntimeError, cPickle.dumps, n)
+ def test_issue2702(self):
+ # This should raise a RecursionLimit but in some
+ # platforms (FreeBSD, win32) sometimes raises KeyError instead,
+ # or just silently terminates the interpreter (=crashes).
+ nodes = [Node() for i in range(500)]
+ for n in nodes:
+ n.connections = list(nodes)
+ n.connections.remove(n)
+ self.assertRaises(RuntimeError, cPickle.dumps, n)
def test_issue3179(self):
- '''Safe test, because of I broken this case when fixing the
- behaviour for the previous test.
- '''
+ # Safe test, because I broke this case when fixing the
+ # behaviour for the previous test.
res=[]
for x in range(1,2000):
res.append(dict(doc=x, similar=[]))
Modified: python/branches/tlee-ast-optimize/Lib/test/test_fractions.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_fractions.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_fractions.py Tue Jul 1 14:28:00 2008
@@ -351,6 +351,10 @@
def testStringification(self):
self.assertEquals("Fraction(7, 3)", repr(F(7, 3)))
+ self.assertEquals("Fraction(6283185307, 2000000000)",
+ repr(F('3.1415926535')))
+ self.assertEquals("Fraction(-1, 100000000000000000000)",
+ repr(F(1, -10**20)))
self.assertEquals("7/3", str(F(7, 3)))
self.assertEquals("7", str(F(7, 1)))
Modified: python/branches/tlee-ast-optimize/Lib/test/test_ssl.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_ssl.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_ssl.py Tue Jul 1 14:28:00 2008
@@ -3,7 +3,9 @@
import sys
import unittest
from test import test_support
+import asyncore
import socket
+import select
import errno
import subprocess
import time
@@ -97,8 +99,7 @@
if (d1 != d2):
raise test_support.TestFailed("PEM-to-DER or DER-to-PEM translation failed")
-
-class NetworkTests(unittest.TestCase):
+class NetworkedTests(unittest.TestCase):
def testConnect(self):
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
@@ -130,6 +131,31 @@
finally:
s.close()
+
+ def testNonBlockingHandshake(self):
+ s = socket.socket(socket.AF_INET)
+ s.connect(("svn.python.org", 443))
+ s.setblocking(False)
+ s = ssl.wrap_socket(s,
+ cert_reqs=ssl.CERT_NONE,
+ do_handshake_on_connect=False)
+ count = 0
+ while True:
+ try:
+ count += 1
+ s.do_handshake()
+ break
+ except ssl.SSLError, err:
+ if err.args[0] == ssl.SSL_ERROR_WANT_READ:
+ select.select([s], [], [])
+ elif err.args[0] == ssl.SSL_ERROR_WANT_WRITE:
+ select.select([], [s], [])
+ else:
+ raise
+ s.close()
+ if test_support.verbose:
+ sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)
+
def testFetchServerCert(self):
pem = ssl.get_server_certificate(("svn.python.org", 443))
@@ -176,6 +202,18 @@
threading.Thread.__init__(self)
self.setDaemon(True)
+ def show_conn_details(self):
+ if self.server.certreqs == ssl.CERT_REQUIRED:
+ cert = self.sslconn.getpeercert()
+ if test_support.verbose and self.server.chatty:
+ sys.stdout.write(" client cert is " + pprint.pformat(cert) + "\n")
+ cert_binary = self.sslconn.getpeercert(True)
+ if test_support.verbose and self.server.chatty:
+ sys.stdout.write(" cert binary is " + str(len(cert_binary)) + " bytes\n")
+ cipher = self.sslconn.cipher()
+ if test_support.verbose and self.server.chatty:
+ sys.stdout.write(" server: connection cipher is now " + str(cipher) + "\n")
+
def wrap_conn (self):
try:
self.sslconn = ssl.wrap_socket(self.sock, server_side=True,
@@ -187,6 +225,7 @@
if self.server.chatty:
handle_error("\n server: bad connection attempt from " +
str(self.sock.getpeername()) + ":\n")
+ self.close()
if not self.server.expect_bad_connects:
# here, we want to stop the server, because this shouldn't
# happen in the context of our test case
@@ -197,16 +236,6 @@
return False
else:
- if self.server.certreqs == ssl.CERT_REQUIRED:
- cert = self.sslconn.getpeercert()
- if test_support.verbose and self.server.chatty:
- sys.stdout.write(" client cert is " + pprint.pformat(cert) + "\n")
- cert_binary = self.sslconn.getpeercert(True)
- if test_support.verbose and self.server.chatty:
- sys.stdout.write(" cert binary is " + str(len(cert_binary)) + " bytes\n")
- cipher = self.sslconn.cipher()
- if test_support.verbose and self.server.chatty:
- sys.stdout.write(" server: connection cipher is now " + str(cipher) + "\n")
return True
def read(self):
@@ -225,13 +254,16 @@
if self.sslconn:
self.sslconn.close()
else:
- self.sock.close()
+ self.sock._sock.close()
def run (self):
self.running = True
if not self.server.starttls_server:
- if not self.wrap_conn():
+ if isinstance(self.sock, ssl.SSLSocket):
+ self.sslconn = self.sock
+ elif not self.wrap_conn():
return
+ self.show_conn_details()
while self.running:
try:
msg = self.read()
@@ -270,7 +302,9 @@
def __init__(self, certificate, ssl_version=None,
certreqs=None, cacerts=None, expect_bad_connects=False,
- chatty=True, connectionchatty=False, starttls_server=False):
+ chatty=True, connectionchatty=False, starttls_server=False,
+ wrap_accepting_socket=False):
+
if ssl_version is None:
ssl_version = ssl.PROTOCOL_TLSv1
if certreqs is None:
@@ -284,8 +318,16 @@
self.connectionchatty = connectionchatty
self.starttls_server = starttls_server
self.sock = socket.socket()
- self.port = test_support.bind_port(self.sock)
self.flag = None
+ if wrap_accepting_socket:
+ self.sock = ssl.wrap_socket(self.sock, server_side=True,
+ certfile=self.certificate,
+ cert_reqs = self.certreqs,
+ ca_certs = self.cacerts,
+ ssl_version = self.protocol)
+ if test_support.verbose and self.chatty:
+ sys.stdout.write(' server: wrapped server socket as %s\n' % str(self.sock))
+ self.port = test_support.bind_port(self.sock)
self.active = False
threading.Thread.__init__(self)
self.setDaemon(False)
@@ -316,13 +358,87 @@
except:
if self.chatty:
handle_error("Test server failure:\n")
+ self.sock.close()
def stop (self):
self.active = False
- self.sock.close()
+ class AsyncoreEchoServer(threading.Thread):
+
+ class EchoServer (asyncore.dispatcher):
+
+ class ConnectionHandler (asyncore.dispatcher_with_send):
+
+ def __init__(self, conn, certfile):
+ asyncore.dispatcher_with_send.__init__(self, conn)
+ self.socket = ssl.wrap_socket(conn, server_side=True,
+ certfile=certfile,
+ do_handshake_on_connect=True)
+
+ def readable(self):
+ if isinstance(self.socket, ssl.SSLSocket):
+ while self.socket.pending() > 0:
+ self.handle_read_event()
+ return True
+
+ def handle_read(self):
+ data = self.recv(1024)
+ self.send(data.lower())
+
+ def handle_close(self):
+ self.close()
+ if test_support.verbose:
+ sys.stdout.write(" server: closed connection %s\n" % self.socket)
+
+ def handle_error(self):
+ raise
+
+ def __init__(self, certfile):
+ self.certfile = certfile
+ asyncore.dispatcher.__init__(self)
+ self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.port = test_support.bind_port(self.socket)
+ self.listen(5)
+
+ def handle_accept(self):
+ sock_obj, addr = self.accept()
+ if test_support.verbose:
+ sys.stdout.write(" server: new connection from %s:%s\n" %addr)
+ self.ConnectionHandler(sock_obj, self.certfile)
- class AsyncoreHTTPSServer(threading.Thread):
+ def handle_error(self):
+ raise
+
+ def __init__(self, certfile):
+ self.flag = None
+ self.active = False
+ self.server = self.EchoServer(certfile)
+ self.port = self.server.port
+ threading.Thread.__init__(self)
+ self.setDaemon(True)
+
+ def __str__(self):
+ return "<%s %s>" % (self.__class__.__name__, self.server)
+
+ def start (self, flag=None):
+ self.flag = flag
+ threading.Thread.start(self)
+
+ def run (self):
+ self.active = True
+ if self.flag:
+ self.flag.set()
+ while self.active:
+ try:
+ asyncore.loop(1)
+ except:
+ pass
+
+ def stop (self):
+ self.active = False
+ self.server.close()
+
+ class SocketServerHTTPSServer(threading.Thread):
class HTTPSServer(HTTPServer):
@@ -335,6 +451,12 @@
self.active_lock = threading.Lock()
self.allow_reuse_address = True
+ def __str__(self):
+ return ('<%s %s:%s>' %
+ (self.__class__.__name__,
+ self.server_name,
+ self.server_port))
+
def get_request (self):
# override this to wrap socket with SSL
sock, addr = self.socket.accept()
@@ -421,8 +543,8 @@
# we override this to suppress logging unless "verbose"
if test_support.verbose:
- sys.stdout.write(" server (%s, %d, %s):\n [%s] %s\n" %
- (self.server.server_name,
+ sys.stdout.write(" server (%s:%d %s):\n [%s] %s\n" %
+ (self.server.server_address,
self.server.server_port,
self.request.cipher(),
self.log_date_time_string(),
@@ -440,9 +562,7 @@
self.setDaemon(True)
def __str__(self):
- return '<%s %s:%d>' % (self.__class__.__name__,
- self.server.server_name,
- self.server.server_port)
+ return "<%s %s>" % (self.__class__.__name__, self.server)
def start (self, flag=None):
self.flag = flag
@@ -487,14 +607,16 @@
def serverParamsTest (certfile, protocol, certreqs, cacertsfile,
client_certfile, client_protocol=None, indata="FOO\n",
- chatty=True, connectionchatty=False):
+ chatty=True, connectionchatty=False,
+ wrap_accepting_socket=False):
server = ThreadedEchoServer(certfile,
certreqs=certreqs,
ssl_version=protocol,
cacerts=cacertsfile,
chatty=chatty,
- connectionchatty=connectionchatty)
+ connectionchatty=connectionchatty,
+ wrap_accepting_socket=wrap_accepting_socket)
flag = threading.Event()
server.start(flag)
# wait for it to start
@@ -572,7 +694,7 @@
ssl.get_protocol_name(server_protocol)))
- class ConnectedTests(unittest.TestCase):
+ class ThreadedTests(unittest.TestCase):
def testRudeShutdown(self):
@@ -600,7 +722,7 @@
listener_gone.wait()
try:
ssl_sock = ssl.wrap_socket(s)
- except socket.sslerror:
+ except IOError:
pass
else:
raise test_support.TestFailed(
@@ -680,6 +802,9 @@
def testMalformedCert(self):
badCertTest(os.path.join(os.path.dirname(__file__) or os.curdir,
"badcert.pem"))
+ def testWrongCert(self):
+ badCertTest(os.path.join(os.path.dirname(__file__) or os.curdir,
+ "wrongcert.pem"))
def testMalformedKey(self):
badCertTest(os.path.join(os.path.dirname(__file__) or os.curdir,
"badkey.pem"))
@@ -796,9 +921,9 @@
server.stop()
server.join()
- def testAsyncore(self):
+ def testSocketServer(self):
- server = AsyncoreHTTPSServer(CERTFILE)
+ server = SocketServerHTTPSServer(CERTFILE)
flag = threading.Event()
server.start(flag)
# wait for it to start
@@ -810,8 +935,8 @@
d1 = open(CERTFILE, 'rb').read()
d2 = ''
# now fetch the same data from the HTTPS server
- url = 'https://%s:%d/%s' % (
- HOST, server.port, os.path.split(CERTFILE)[1])
+ url = 'https://127.0.0.1:%d/%s' % (
+ server.port, os.path.split(CERTFILE)[1])
f = urllib.urlopen(url)
dlen = f.info().getheader("content-length")
if dlen and (int(dlen) > 0):
@@ -834,6 +959,58 @@
server.stop()
server.join()
+ def testWrappedAccept (self):
+
+ if test_support.verbose:
+ sys.stdout.write("\n")
+ serverParamsTest(CERTFILE, ssl.PROTOCOL_SSLv23, ssl.CERT_REQUIRED,
+ CERTFILE, CERTFILE, ssl.PROTOCOL_SSLv23,
+ chatty=True, connectionchatty=True,
+ wrap_accepting_socket=True)
+
+
+ def testAsyncoreServer (self):
+
+ indata = "TEST MESSAGE of mixed case\n"
+
+ if test_support.verbose:
+ sys.stdout.write("\n")
+ server = AsyncoreEchoServer(CERTFILE)
+ flag = threading.Event()
+ server.start(flag)
+ # wait for it to start
+ flag.wait()
+ # try to connect
+ try:
+ try:
+ s = ssl.wrap_socket(socket.socket())
+ s.connect(('127.0.0.1', server.port))
+ except ssl.SSLError, x:
+ raise test_support.TestFailed("Unexpected SSL error: " + str(x))
+ except Exception, x:
+ raise test_support.TestFailed("Unexpected exception: " + str(x))
+ else:
+ if test_support.verbose:
+ sys.stdout.write(
+ " client: sending %s...\n" % (repr(indata)))
+ s.write(indata)
+ outdata = s.read()
+ if test_support.verbose:
+ sys.stdout.write(" client: read %s\n" % repr(outdata))
+ if outdata != indata.lower():
+ raise test_support.TestFailed(
+ "bad data <<%s>> (%d) received; expected <<%s>> (%d)\n"
+ % (outdata[:min(len(outdata),20)], len(outdata),
+ indata[:min(len(indata),20)].lower(), len(indata)))
+ s.write("over\n")
+ if test_support.verbose:
+ sys.stdout.write(" client: closing connection.\n")
+ s.close()
+ finally:
+ server.stop()
+ # wait for server thread to end
+ server.join()
+
def test_main(verbose=False):
if skip_expected:
@@ -850,15 +1027,19 @@
not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT)):
raise test_support.TestFailed("Can't read certificate files!")
+ TESTPORT = test_support.find_unused_port()
+ if not TESTPORT:
+ raise test_support.TestFailed("Can't find open port to test servers on!")
+
tests = [BasicTests]
if test_support.is_resource_enabled('network'):
- tests.append(NetworkTests)
+ tests.append(NetworkedTests)
if _have_threads:
thread_info = test_support.threading_setup()
if thread_info and test_support.is_resource_enabled('network'):
- tests.append(ConnectedTests)
+ tests.append(ThreadedTests)
test_support.run_unittest(*tests)
Modified: python/branches/tlee-ast-optimize/Lib/test/test_sys.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_sys.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_sys.py Tue Jul 1 14:28:00 2008
@@ -416,7 +416,7 @@
self.P = len(struct.pack('P', 0))
# due to missing size_t information from struct, it is assumed that
# sizeof(Py_ssize_t) = sizeof(void*)
- self.header = 'lP'
+ self.header = 'PP'
if hasattr(sys, "gettotalrefcount"):
self.header += '2P'
self.file = open(test.test_support.TESTFN, 'wb')
@@ -480,7 +480,7 @@
self.check_sizeof(float(0), size(h + 'd'))
# function
def func(): pass
- self.check_sizeof(func, size(h + '9l'))
+ self.check_sizeof(func, size(h + '9P'))
class c():
@staticmethod
def foo():
@@ -489,9 +489,9 @@
def bar(cls):
pass
# staticmethod
- self.check_sizeof(foo, size(h + 'l'))
+ self.check_sizeof(foo, size(h + 'P'))
# classmethod
- self.check_sizeof(bar, size(h + 'l'))
+ self.check_sizeof(bar, size(h + 'P'))
# generator
def get_gen(): yield 1
self.check_sizeof(get_gen(), size(h + 'Pi2P'))
@@ -502,11 +502,11 @@
# module
self.check_sizeof(unittest, size(h + 'P'))
# xrange
- self.check_sizeof(xrange(1), size(h + '3P'))
+ self.check_sizeof(xrange(1), size(h + '3l'))
# slice
self.check_sizeof(slice(0), size(h + '3P'))
- h += 'l'
+ h += 'P'
# new-style class
class class_newstyle(object):
def method():
@@ -520,12 +520,9 @@
h = self.header
size = self.calcsize
# dict
- self.check_sizeof({}, size(h + '3P3P') + 8*size('P2P'))
+ self.check_sizeof({}, size(h + '3P2P') + 8*size('P2P'))
longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8}
- self.check_sizeof(longdict, size(h + '3P3P') + (8+16)*size('P2P'))
- # list
- self.check_sizeof([], size(h + 'lPP'))
- self.check_sizeof([1, 2, 3], size(h + 'lPP') + 3*self.P)
+ self.check_sizeof(longdict, size(h + '3P2P') + (8+16)*size('P2P'))
# unicode
usize = len(u'\0'.encode('unicode-internal'))
samples = [u'', u'1'*100]
@@ -544,7 +541,10 @@
finally:
self.check_sizeof(s, basicsize + sys.getsizeof(str(s)))
- h += 'l'
+ h += 'P'
+ # list
+ self.check_sizeof([], size(h + 'PP'))
+ self.check_sizeof([1, 2, 3], size(h + 'PP') + 3*self.P)
# long
self.check_sizeof(0L, size(h + 'H'))
self.check_sizeof(1L, size(h + 'H'))
Modified: python/branches/tlee-ast-optimize/Lib/test/test_threading_local.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_threading_local.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_threading_local.py Tue Jul 1 14:28:00 2008
@@ -42,6 +42,32 @@
deadlist = [weak for weak in weaklist if weak() is None]
self.assert_(len(deadlist) in (n-1, n), (n, len(deadlist)))
+ def test_derived(self):
+ # Issue 3088: if there is a threads switch inside the __init__
+ # of a threading.local derived class, the per-thread dictionary
+ # is created but not correctly set on the object.
+ # The first member set may be bogus.
+ import time
+ class Local(threading.local):
+ def __init__(self):
+ time.sleep(0.01)
+ local = Local()
+
+ def f(i):
+ local.x = i
+ # Simply check that the variable is correctly set
+ self.assertEqual(local.x, i)
+
+ threads= []
+ for i in range(10):
+ t = threading.Thread(target=f, args=(i,))
+ t.start()
+ threads.append(t)
+
+ for t in threads:
+ t.join()
+
+
def test_main():
suite = unittest.TestSuite()
suite.addTest(DocTestSuite('_threading_local'))
Modified: python/branches/tlee-ast-optimize/Lib/test/test_warnings.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_warnings.py (original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_warnings.py Tue Jul 1 14:28:00 2008
@@ -301,6 +301,21 @@
warning_tests.__name__ = module_name
sys.argv = argv
+ def test_warn_explicit_type_errors(self):
+ # warn_explicit() shoud error out gracefully if it is given objects
+ # of the wrong types.
+ # lineno is expected to be an integer.
+ self.assertRaises(TypeError, self.module.warn_explicit,
+ None, UserWarning, None, None)
+ # Either 'message' needs to be an instance of Warning or 'category'
+ # needs to be a subclass.
+ self.assertRaises(TypeError, self.module.warn_explicit,
+ None, None, None, 1)
+ # 'registry' must be a dict or None.
+ self.assertRaises((TypeError, AttributeError),
+ self.module.warn_explicit,
+ None, Warning, None, 1, registry=42)
+
class CWarnTests(BaseTest, WarnTests):
Modified: python/branches/tlee-ast-optimize/Lib/warnings.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/warnings.py (original)
+++ python/branches/tlee-ast-optimize/Lib/warnings.py Tue Jul 1 14:28:00 2008
@@ -202,6 +202,7 @@
def warn_explicit(message, category, filename, lineno,
module=None, registry=None, module_globals=None):
+ lineno = int(lineno)
if module is None:
module = filename or "<unknown>"
if module[-3:].lower() == ".py":
Modified: python/branches/tlee-ast-optimize/Misc/ACKS
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/ACKS (original)
+++ python/branches/tlee-ast-optimize/Misc/ACKS Tue Jul 1 14:28:00 2008
@@ -88,6 +88,7 @@
Tom Bridgman
Richard Brodie
Daniel Brotsky
+Jean Brouwers
Gary S. Brown
Oleg Broytmann
Dave Brueck
Modified: python/branches/tlee-ast-optimize/Misc/NEWS
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/NEWS (original)
+++ python/branches/tlee-ast-optimize/Misc/NEWS Tue Jul 1 14:28:00 2008
@@ -10,6 +10,10 @@
Core and Builtins
-----------------
+- Issue #3088: Corrected a race condition in classes derived from
+ threading.local: the first member set by a thread could be saved in
+ another thread's dictionary.
+
- Issue #3004: Minor change to slice.indices(): the start and stop
arguments are now treated identically, making the behaviour easier
to describe and understand. For example, slice(None, -10,
@@ -17,6 +21,11 @@
slice(None, 10, -1).indices(10) returns (9, 9, -1) instead of (9,
10, -1).
+Build
+-----
+
+- Issue #3215: Build sqlite3 as sqlite3.dll, not sqlite3.pyd.
+
What's New in Python 2.6 beta 1?
================================
@@ -25,6 +34,11 @@
Core and Builtins
-----------------
+- Issue #3211: warnings.warn_explicit() did not guard against its 'registry'
+ argument being anything other than a dict or None. Also fixed a bug in error
+ handling when 'message' and 'category' were both set to None, triggering a
+ bus error.
+
- Issue #3100: Corrected a crash on deallocation of a subclassed weakref which
holds the last (strong) reference to its referent.
@@ -102,6 +116,9 @@
Library
-------
+- logging.config: Removed out-of-date comment in _install_handlers and
+ used issubclass in place of equality comparison of classes.
+
- Issue #2722: Now the os.getcwd() supports very long path names.
- Issue #2888: Fixed the behaviour of pprint when working with nested
Modified: python/branches/tlee-ast-optimize/Modules/_ssl.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_ssl.c (original)
+++ python/branches/tlee-ast-optimize/Modules/_ssl.c Tue Jul 1 14:28:00 2008
@@ -2,14 +2,15 @@
SSL support based on patches by Brian E Gallew and Laszlo Kovacs.
Re-worked a bit by Bill Janssen to add server-side support and
- certificate decoding.
+ certificate decoding. Chris Stawarz contributed some non-blocking
+ patches.
This module is imported by ssl.py. It should *not* be used
directly.
XXX should partial writes be enabled, SSL_MODE_ENABLE_PARTIAL_WRITE?
- XXX what about SSL_MODE_AUTO_RETRY
+ XXX what about SSL_MODE_AUTO_RETRY?
*/
#include "Python.h"
@@ -265,8 +266,6 @@
PySSLObject *self;
char *errstr = NULL;
int ret;
- int err;
- int sockstate;
int verification_mode;
self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new object */
@@ -388,57 +387,6 @@
SSL_set_accept_state(self->ssl);
PySSL_END_ALLOW_THREADS
- /* Actually negotiate SSL connection */
- /* XXX If SSL_connect() returns 0, it's also a failure. */
- sockstate = 0;
- do {
- PySSL_BEGIN_ALLOW_THREADS
- if (socket_type == PY_SSL_CLIENT)
- ret = SSL_connect(self->ssl);
- else
- ret = SSL_accept(self->ssl);
- err = SSL_get_error(self->ssl, ret);
- PySSL_END_ALLOW_THREADS
- if(PyErr_CheckSignals()) {
- goto fail;
- }
- if (err == SSL_ERROR_WANT_READ) {
- sockstate = check_socket_and_wait_for_timeout(Sock, 0);
- } else if (err == SSL_ERROR_WANT_WRITE) {
- sockstate = check_socket_and_wait_for_timeout(Sock, 1);
- } else {
- sockstate = SOCKET_OPERATION_OK;
- }
- if (sockstate == SOCKET_HAS_TIMED_OUT) {
- PyErr_SetString(PySSLErrorObject,
- ERRSTR("The connect operation timed out"));
- goto fail;
- } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) {
- PyErr_SetString(PySSLErrorObject,
- ERRSTR("Underlying socket has been closed."));
- goto fail;
- } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) {
- PyErr_SetString(PySSLErrorObject,
- ERRSTR("Underlying socket too large for select()."));
- goto fail;
- } else if (sockstate == SOCKET_IS_NONBLOCKING) {
- break;
- }
- } while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
- if (ret < 1) {
- PySSL_SetError(self, ret, __FILE__, __LINE__);
- goto fail;
- }
- self->ssl->debug = 1;
-
- PySSL_BEGIN_ALLOW_THREADS
- if ((self->peer_cert = SSL_get_peer_certificate(self->ssl))) {
- X509_NAME_oneline(X509_get_subject_name(self->peer_cert),
- self->server, X509_NAME_MAXLEN);
- X509_NAME_oneline(X509_get_issuer_name(self->peer_cert),
- self->issuer, X509_NAME_MAXLEN);
- }
- PySSL_END_ALLOW_THREADS
self->Socket = Sock;
Py_INCREF(self->Socket);
return self;
@@ -488,6 +436,65 @@
/* SSL object methods */
+static PyObject *PySSL_SSLdo_handshake(PySSLObject *self)
+{
+ int ret;
+ int err;
+ int sockstate;
+
+ /* Actually negotiate SSL connection */
+ /* XXX If SSL_do_handshake() returns 0, it's also a failure. */
+ sockstate = 0;
+ do {
+ PySSL_BEGIN_ALLOW_THREADS
+ ret = SSL_do_handshake(self->ssl);
+ err = SSL_get_error(self->ssl, ret);
+ PySSL_END_ALLOW_THREADS
+ if(PyErr_CheckSignals()) {
+ return NULL;
+ }
+ if (err == SSL_ERROR_WANT_READ) {
+ sockstate = check_socket_and_wait_for_timeout(self->Socket, 0);
+ } else if (err == SSL_ERROR_WANT_WRITE) {
+ sockstate = check_socket_and_wait_for_timeout(self->Socket, 1);
+ } else {
+ sockstate = SOCKET_OPERATION_OK;
+ }
+ if (sockstate == SOCKET_HAS_TIMED_OUT) {
+ PyErr_SetString(PySSLErrorObject,
+ ERRSTR("The handshake operation timed out"));
+ return NULL;
+ } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) {
+ PyErr_SetString(PySSLErrorObject,
+ ERRSTR("Underlying socket has been closed."));
+ return NULL;
+ } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) {
+ PyErr_SetString(PySSLErrorObject,
+ ERRSTR("Underlying socket too large for select()."));
+ return NULL;
+ } else if (sockstate == SOCKET_IS_NONBLOCKING) {
+ break;
+ }
+ } while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
+ if (ret < 1)
+ return PySSL_SetError(self, ret, __FILE__, __LINE__);
+ self->ssl->debug = 1;
+
+ if (self->peer_cert)
+ X509_free (self->peer_cert);
+ PySSL_BEGIN_ALLOW_THREADS
+ if ((self->peer_cert = SSL_get_peer_certificate(self->ssl))) {
+ X509_NAME_oneline(X509_get_subject_name(self->peer_cert),
+ self->server, X509_NAME_MAXLEN);
+ X509_NAME_oneline(X509_get_issuer_name(self->peer_cert),
+ self->issuer, X509_NAME_MAXLEN);
+ }
+ PySSL_END_ALLOW_THREADS
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
static PyObject *
PySSL_server(PySSLObject *self)
{
@@ -1127,7 +1134,9 @@
rc = select(s->sock_fd+1, &fds, NULL, NULL, &tv);
PySSL_END_ALLOW_THREADS
+#ifdef HAVE_POLL
normal_return:
+#endif
/* Return SOCKET_TIMED_OUT on timeout, SOCKET_OPERATION_OK otherwise
(when we are able to write or when there's something to read) */
return rc == 0 ? SOCKET_HAS_TIMED_OUT : SOCKET_OPERATION_OK;
@@ -1140,10 +1149,16 @@
int count;
int sockstate;
int err;
+ int nonblocking;
if (!PyArg_ParseTuple(args, "s#:write", &data, &count))
return NULL;
+ /* just in case the blocking state of the socket has been changed */
+ nonblocking = (self->Socket->sock_timeout >= 0.0);
+ BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
+ BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+
sockstate = check_socket_and_wait_for_timeout(self->Socket, 1);
if (sockstate == SOCKET_HAS_TIMED_OUT) {
PyErr_SetString(PySSLErrorObject,
@@ -1200,6 +1215,25 @@
Writes the string s into the SSL object. Returns the number\n\
of bytes written.");
+static PyObject *PySSL_SSLpending(PySSLObject *self)
+{
+ int count = 0;
+
+ PySSL_BEGIN_ALLOW_THREADS
+ count = SSL_pending(self->ssl);
+ PySSL_END_ALLOW_THREADS
+ if (count < 0)
+ return PySSL_SetError(self, count, __FILE__, __LINE__);
+ else
+ return PyInt_FromLong(count);
+}
+
+PyDoc_STRVAR(PySSL_SSLpending_doc,
+"pending() -> count\n\
+\n\
+Returns the number of already decrypted bytes available for read,\n\
+pending on the connection.\n");
+
static PyObject *PySSL_SSLread(PySSLObject *self, PyObject *args)
{
PyObject *buf;
@@ -1207,6 +1241,7 @@
int len = 1024;
int sockstate;
int err;
+ int nonblocking;
if (!PyArg_ParseTuple(args, "|i:read", &len))
return NULL;
@@ -1214,6 +1249,11 @@
if (!(buf = PyString_FromStringAndSize((char *) 0, len)))
return NULL;
+ /* just in case the blocking state of the socket has been changed */
+ nonblocking = (self->Socket->sock_timeout >= 0.0);
+ BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
+ BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+
/* first check if there are bytes ready to be read */
PySSL_BEGIN_ALLOW_THREADS
count = SSL_pending(self->ssl);
@@ -1232,9 +1272,18 @@
Py_DECREF(buf);
return NULL;
} else if (sockstate == SOCKET_HAS_BEEN_CLOSED) {
- /* should contain a zero-length string */
- _PyString_Resize(&buf, 0);
- return buf;
+ if (SSL_get_shutdown(self->ssl) !=
+ SSL_RECEIVED_SHUTDOWN)
+ {
+ Py_DECREF(buf);
+ PyErr_SetString(PySSLErrorObject,
+ "Socket closed without SSL shutdown handshake");
+ return NULL;
+ } else {
+ /* should contain a zero-length string */
+ _PyString_Resize(&buf, 0);
+ return buf;
+ }
}
}
do {
@@ -1285,16 +1334,54 @@
\n\
Read up to len bytes from the SSL socket.");
+static PyObject *PySSL_SSLshutdown(PySSLObject *self)
+{
+ int err;
+
+ /* Guard against closed socket */
+ if (self->Socket->sock_fd < 0) {
+ PyErr_SetString(PySSLErrorObject,
+ "Underlying socket has been closed.");
+ return NULL;
+ }
+
+ PySSL_BEGIN_ALLOW_THREADS
+ err = SSL_shutdown(self->ssl);
+ if (err == 0) {
+ /* we need to call it again to finish the shutdown */
+ err = SSL_shutdown(self->ssl);
+ }
+ PySSL_END_ALLOW_THREADS
+
+ if (err < 0)
+ return PySSL_SetError(self, err, __FILE__, __LINE__);
+ else {
+ Py_INCREF(self->Socket);
+ return (PyObject *) (self->Socket);
+ }
+}
+
+PyDoc_STRVAR(PySSL_SSLshutdown_doc,
+"shutdown(s) -> socket\n\
+\n\
+Does the SSL shutdown handshake with the remote end, and returns\n\
+the underlying socket object.");
+
static PyMethodDef PySSLMethods[] = {
+ {"do_handshake", (PyCFunction)PySSL_SSLdo_handshake, METH_NOARGS},
{"write", (PyCFunction)PySSL_SSLwrite, METH_VARARGS,
PySSL_SSLwrite_doc},
{"read", (PyCFunction)PySSL_SSLread, METH_VARARGS,
PySSL_SSLread_doc},
+ {"pending", (PyCFunction)PySSL_SSLpending, METH_NOARGS,
+ PySSL_SSLpending_doc},
{"server", (PyCFunction)PySSL_server, METH_NOARGS},
{"issuer", (PyCFunction)PySSL_issuer, METH_NOARGS},
{"peer_certificate", (PyCFunction)PySSL_peercert, METH_VARARGS,
PySSL_peercert_doc},
{"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS},
+ {"shutdown", (PyCFunction)PySSL_SSLshutdown, METH_NOARGS,
+ PySSL_SSLshutdown_doc},
{NULL, NULL}
};
Modified: python/branches/tlee-ast-optimize/Modules/cPickle.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/cPickle.c (original)
+++ python/branches/tlee-ast-optimize/Modules/cPickle.c Tue Jul 1 14:28:00 2008
@@ -339,7 +339,6 @@
int bin;
int fast; /* Fast mode doesn't save in memo, don't use if circ ref */
- int nesting;
int (*write_func)(struct Picklerobject *, const char *, Py_ssize_t);
char *write_buf;
int buf_size;
@@ -1630,7 +1629,12 @@
iter = PyObject_GetIter(args);
if (iter == NULL)
goto finally;
- res = batch_list(self, iter);
+
+ if (Py_EnterRecursiveCall(" while pickling an object") == 0)
+ {
+ res = batch_list(self, iter);
+ Py_LeaveRecursiveCall();
+ }
Py_DECREF(iter);
finally:
@@ -1786,7 +1790,11 @@
iter = PyObject_CallMethod(args, "iteritems", "()");
if (iter == NULL)
goto finally;
- res = batch_dict(self, iter);
+ if (Py_EnterRecursiveCall(" while pickling an object") == 0)
+ {
+ res = batch_dict(self, iter);
+ Py_LeaveRecursiveCall();
+ }
Py_DECREF(iter);
finally:
@@ -2306,11 +2314,8 @@
int res = -1;
int tmp, size;
- if (self->nesting++ > Py_GetRecursionLimit()){
- PyErr_SetString(PyExc_RuntimeError,
- "maximum recursion depth exceeded");
- goto finally;
- }
+ if (Py_EnterRecursiveCall(" while pickling an object"))
+ return -1;
if (!pers_save && self->pers_func) {
if ((tmp = save_pers(self, args, self->pers_func)) != 0) {
@@ -2559,7 +2564,7 @@
res = save_reduce(self, t, args);
finally:
- self->nesting--;
+ Py_LeaveRecursiveCall();
Py_XDECREF(py_ob_id);
Py_XDECREF(__reduce__);
Py_XDECREF(t);
@@ -2801,7 +2806,6 @@
self->inst_pers_func = NULL;
self->write_buf = NULL;
self->fast = 0;
- self->nesting = 0;
self->fast_container = 0;
self->fast_memo = NULL;
self->buf_size = 0;
Modified: python/branches/tlee-ast-optimize/Modules/threadmodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/threadmodule.c (original)
+++ python/branches/tlee-ast-optimize/Modules/threadmodule.c Tue Jul 1 14:28:00 2008
@@ -293,7 +293,10 @@
}
}
- else if (self->dict != ldict) {
+
+ /* The call to tp_init above may have caused another thread to run.
+ Install our ldict again. */
+ if (self->dict != ldict) {
Py_CLEAR(self->dict);
Py_INCREF(ldict);
self->dict = ldict;
Modified: python/branches/tlee-ast-optimize/Objects/dictobject.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/dictobject.c (original)
+++ python/branches/tlee-ast-optimize/Objects/dictobject.c Tue Jul 1 14:28:00 2008
@@ -1253,7 +1253,7 @@
PyObject *key;
long hash;
- if (dictresize(mp, PySet_GET_SIZE(seq)))
+ if (dictresize(mp, Py_SIZE(seq)))
return NULL;
while (_PyDict_Next(seq, &pos, &key, &oldvalue, &hash)) {
@@ -2037,7 +2037,7 @@
{
Py_ssize_t res;
- res = sizeof(PyDictObject) + sizeof(mp->ma_table);
+ res = sizeof(PyDictObject);
if (mp->ma_table != mp->ma_smalltable)
res = res + (mp->ma_mask + 1) * sizeof(PyDictEntry);
return PyInt_FromSsize_t(res);
Modified: python/branches/tlee-ast-optimize/PCbuild/_bsddb.vcproj
==============================================================================
--- python/branches/tlee-ast-optimize/PCbuild/_bsddb.vcproj (original)
+++ python/branches/tlee-ast-optimize/PCbuild/_bsddb.vcproj Tue Jul 1 14:28:00 2008
@@ -43,6 +43,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -55,6 +56,7 @@
/>
<Tool
Name="VCLinkerTool"
+ AdditionalDependencies="$(bsddbDepLibs)"
BaseAddress="0x1e180000"
/>
<Tool
@@ -104,6 +106,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -167,6 +170,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -230,6 +234,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -293,6 +298,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -356,6 +362,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -419,6 +426,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -482,6 +490,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -540,6 +549,914 @@
>
</File>
</Filter>
+ <Filter
+ Name="Berkeley DB 4.7.25 Source Files"
+ >
+ <File
+ RelativePath="$(bsddbDir)\..\crypto\aes_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_compact.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_compare.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_conv.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_curadj.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_cursor.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_delete.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_open.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_put.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_reclaim.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_recno.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_rsearch.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_search.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_split.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_upgrade.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\bt_verify.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\btree\btree_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\crdel_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\crdel_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\crypto\crypto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_am.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\db_byteorder.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_cam.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_cds.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_conv.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_dispatch.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_dup.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\db_err.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\db_getlong.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\db_idspace.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_iface.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_join.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\db_log2.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_meta.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_open.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_overflow.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_ovfl_vrfy.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_pr.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_reclaim.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_remove.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_rename.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_ret.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_setid.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_setlsn.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\db_shash.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_stati.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_truncate.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_upg.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_upg_opd.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_vrfy.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\db\db_vrfyutil.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\dbm\dbm.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\dbreg\dbreg.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\dbreg\dbreg_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\dbreg\dbreg_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\dbreg\dbreg_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\dbreg\dbreg_util.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\dbt.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_alloc.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_config.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_failchk.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_file.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_globals.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_name.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_open.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_recover.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_region.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_register.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_sig.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\env\env_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\fileops\fileops_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\fileops\fop_basic.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\fileops\fop_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\fileops\fop_util.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_conv.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_dup.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_func.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_meta.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_open.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_page.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_reclaim.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_upgrade.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hash\hash_verify.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hmac\hmac.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hsearch\hsearch.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_deadlock.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_failchk.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_id.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_list.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_region.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_timer.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\lock\lock_util.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_archive.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_compare.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_debug.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_get.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_put.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\log\log_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\mkpath.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_alloc.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_bh.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_fget.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_fmethod.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_fopen.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_fput.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_fset.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_mvcc.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_region.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_register.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_resize.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_sync.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mp\mp_trickle.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\crypto\mersenne\mt19937db.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mutex\mut_alloc.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mutex\mut_failchk.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mutex\mut_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mutex\mut_region.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mutex\mut_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\mutex\mut_win32.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\openflags.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_abort.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_abs.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_addrinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_alloc.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_clock.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_config.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_cpu.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_ctime.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_dir.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_errno.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_fid.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_flock.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_fsync.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_getenv.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_handle.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_map.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\os_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_mkdir.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_open.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_pid.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_rename.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_root.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_rpath.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_rw.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_seek.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_stack.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_tmpdir.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_truncate.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os\os_uid.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_unlink.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\os_windows\os_yield.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_conv.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_files.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_open.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_upgrade.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\qam\qam_verify.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_backup.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_elect.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_lease.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_log.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_record.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_region.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_util.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\rep\rep_verify.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_elect.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_msg.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_net.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_queue.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_sel.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_util.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\repmgr\repmgr_windows.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\crypto\rijndael\rijndael-alg-fst.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\crypto\rijndael\rijndael-api-fst.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\sequence\seq_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\sequence\sequence.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\hmac\sha1.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\clib\strsep.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_auto.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_chkpt.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_failchk.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_method.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_rec.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_recover.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_region.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_stat.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\txn\txn_util.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\util_cache.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\util_log.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\util_sig.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\xa\xa.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\xa\xa_db.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\xa\xa_map.c"
+ >
+ </File>
+ <File
+ RelativePath="$(bsddbDir)\..\common\zerofill.c"
+ >
+ </File>
+ </Filter>
</Files>
<Globals>
</Globals>
Deleted: python/branches/tlee-ast-optimize/PCbuild/_bsddb44.vcproj
==============================================================================
--- python/branches/tlee-ast-optimize/PCbuild/_bsddb44.vcproj Tue Jul 1 14:28:00 2008
+++ (empty file)
@@ -1,1252 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_bsddb44"
- ProjectGUID="{62172C7D-B39E-409A-B352-370FF5098C19}"
- RootNamespace="_bsddb44"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- PreprocessorDefinitions="DIAGNOSTIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="4"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bsddbDir);$(bsddbDir)\.."
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_compact.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_compare.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_conv.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_curadj.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_cursor.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_delete.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_open.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_put.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_reclaim.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_recno.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_rsearch.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_search.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_split.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_upgrade.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\bt_verify.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\btree\btree_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\crdel_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\crdel_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\crypto_stub.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_am.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\db_byteorder.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_cam.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\db_clock.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_conv.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_dispatch.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_dup.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\db_err.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\db_getlong.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\db_idspace.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_iface.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_join.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\db_log2.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_meta.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_open.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_overflow.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_ovfl_vrfy.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_pr.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_reclaim.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_remove.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_rename.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_ret.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\db_salloc.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_setid.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_setlsn.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\db_shash.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_stati.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_truncate.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_upg.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_upg_opd.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_vrfy.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\db\db_vrfyutil.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\dbm\dbm.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\dbreg\dbreg.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\dbreg\dbreg_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\dbreg\dbreg_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\dbreg\dbreg_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\dbreg\dbreg_util.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_failchk.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_file.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_open.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_recover.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_register.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\env\env_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\fileops\fileops_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\fileops\fop_basic.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\fileops\fop_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\fileops\fop_util.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_conv.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_dup.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_func.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_meta.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_open.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_page.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_reclaim.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_upgrade.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hash\hash_verify.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hmac\hmac.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hsearch\hsearch.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_deadlock.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_failchk.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_id.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_list.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_timer.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\lock\lock_util.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_archive.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_compare.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_debug.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_get.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_put.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\log\log_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_alloc.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_bh.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_fget.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_fmethod.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_fopen.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_fput.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_fset.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_register.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_sync.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mp\mp_trickle.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mutex\mut_alloc.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mutex\mut_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mutex\mut_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mutex\mut_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\mutex\mut_win32.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_abs.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_alloc.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_clock.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_config.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_dir.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_errno.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_fid.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_flock.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_fsync.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_handle.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_id.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_map.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_mkdir.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_oflags.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_open.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_rename.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_root.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_rpath.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_rw.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_seek.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_sleep.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_spin.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os\os_tmpdir.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_truncate.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\os_win32\os_unlink.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_conv.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_files.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_open.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_upgrade.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\qam\qam_verify.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_backup.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_elect.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_log.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_record.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_util.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\rep\rep_verify.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\sequence\seq_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\sequence\sequence.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\hmac\sha1.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\clib\strcasecmp.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_auto.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_chkpt.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_failchk.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_method.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_rec.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_recover.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_region.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_stat.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\txn\txn_util.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\util_cache.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\util_log.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\common\util_sig.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\xa\xa.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\xa\xa_db.c"
- >
- </File>
- <File
- RelativePath="$(bsddbDir)\..\xa\xa_map.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
Modified: python/branches/tlee-ast-optimize/PCbuild/pcbuild.sln
==============================================================================
--- python/branches/tlee-ast-optimize/PCbuild/pcbuild.sln (original)
+++ python/branches/tlee-ast-optimize/PCbuild/pcbuild.sln Tue Jul 1 14:28:00 2008
@@ -41,7 +41,6 @@
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}"
ProjectSection(ProjectDependencies) = postProject
{6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}
- {62172C7D-B39E-409A-B352-370FF5098C19} = {62172C7D-B39E-409A-B352-370FF5098C19}
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
EndProjectSection
EndProject
@@ -121,11 +120,6 @@
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb44", "_bsddb44.vcproj", "{62172C7D-B39E-409A-B352-370FF5098C19}"
- ProjectSection(ProjectDependencies) = postProject
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"
ProjectSection(ProjectDependencies) = postProject
{6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}
@@ -510,22 +504,6 @@
{447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32
{447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64
{447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.Debug|Win32.ActiveCfg = Debug|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.Debug|Win32.Build.0 = Debug|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.Debug|x64.ActiveCfg = Debug|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.Debug|x64.Build.0 = Debug|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.Release|Win32.ActiveCfg = Release|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.Release|Win32.Build.0 = Release|Win32
- {62172C7D-B39E-409A-B352-370FF5098C19}.Release|x64.ActiveCfg = Release|x64
- {62172C7D-B39E-409A-B352-370FF5098C19}.Release|x64.Build.0 = Release|x64
{A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32
{A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32
{A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64
Modified: python/branches/tlee-ast-optimize/PCbuild/pyproject.vsprops
==============================================================================
--- python/branches/tlee-ast-optimize/PCbuild/pyproject.vsprops (original)
+++ python/branches/tlee-ast-optimize/PCbuild/pyproject.vsprops Tue Jul 1 14:28:00 2008
@@ -50,11 +50,11 @@
/>
<UserMacro
Name="bsddbDir"
- Value="$(bsddb44Dir)"
+ Value="$(bsddb47Dir)"
/>
<UserMacro
Name="bsddbDepLibs"
- Value="$(bsddb44DepLibs)"
+ Value="$(bsddb47DepLibs)"
/>
<UserMacro
Name="bsddb44Dir"
@@ -65,11 +65,11 @@
Value=""
/>
<UserMacro
- Name="bsddb45Dir"
- Value="$(externalsDir)\db-4.5.20.x\build_windows"
+ Name="bsddb47Dir"
+ Value="$(externalsDir)\db-4.7.25.0\build_windows"
/>
<UserMacro
- Name="bsddb45DepLibs"
+ Name="bsddb47DepLibs"
Value="ws2_32.lib"
/>
<UserMacro
Modified: python/branches/tlee-ast-optimize/PCbuild/sqlite3.vcproj
==============================================================================
--- python/branches/tlee-ast-optimize/PCbuild/sqlite3.vcproj (original)
+++ python/branches/tlee-ast-optimize/PCbuild/sqlite3.vcproj Tue Jul 1 14:28:00 2008
@@ -305,6 +305,7 @@
/>
<Tool
Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
/>
<Tool
Name="VCALinkTool"
@@ -428,6 +429,7 @@
/>
<Tool
Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
/>
<Tool
Name="VCALinkTool"
Modified: python/branches/tlee-ast-optimize/Python/_warnings.c
==============================================================================
--- python/branches/tlee-ast-optimize/Python/_warnings.c (original)
+++ python/branches/tlee-ast-optimize/Python/_warnings.c Tue Jul 1 14:28:00 2008
@@ -280,6 +280,11 @@
PyObject *item = Py_None;
const char *action;
int rc;
+
+ if (registry && !PyDict_Check(registry) && (registry != Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'registry' must be a dict");
+ return NULL;
+ }
/* Normalize module. */
if (module == NULL) {
@@ -303,6 +308,8 @@
else {
text = message;
message = PyObject_CallFunction(category, "O", message);
+ if (message == NULL)
+ goto cleanup;
}
lineno_obj = PyInt_FromLong(lineno);
@@ -314,7 +321,7 @@
if (key == NULL)
goto cleanup;
- if (registry != NULL) {
+ if ((registry != NULL) && (registry != Py_None)) {
rc = already_warned(registry, key, 0);
if (rc == -1)
goto cleanup;
@@ -336,12 +343,13 @@
is "always". */
rc = 0;
if (strcmp(action, "always") != 0) {
- if (registry != NULL && PyDict_SetItem(registry, key, Py_True) < 0)
+ if (registry != NULL && registry != Py_None &&
+ PyDict_SetItem(registry, key, Py_True) < 0)
goto cleanup;
else if (strcmp(action, "ignore") == 0)
goto return_none;
else if (strcmp(action, "once") == 0) {
- if (registry == NULL) {
+ if (registry == NULL || registry == Py_None) {
registry = get_once_registry();
if (registry == NULL)
goto cleanup;
@@ -351,7 +359,7 @@
}
else if (strcmp(action, "module") == 0) {
/* registry[(text, category, 0)] = 1 */
- if (registry != NULL)
+ if (registry != NULL && registry != Py_None)
rc = update_registry(registry, text, category, 0);
}
else if (strcmp(action, "default") != 0) {
@@ -435,7 +443,7 @@
Py_XDECREF(text);
Py_XDECREF(lineno_obj);
Py_DECREF(module);
- Py_DECREF(message);
+ Py_XDECREF(message);
return result; /* Py_None or NULL. */
}
Modified: python/branches/tlee-ast-optimize/Tools/buildbot/external-common.bat
==============================================================================
--- python/branches/tlee-ast-optimize/Tools/buildbot/external-common.bat (original)
+++ python/branches/tlee-ast-optimize/Tools/buildbot/external-common.bat Tue Jul 1 14:28:00 2008
@@ -14,6 +14,7 @@
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
+ at rem if exist db-4.7.25.0 rd /s/q db-4.7.25.0
@rem if exist openssl-0.9.8g rd /s/q openssl-0.9.8g
@rem if exist sqlite-3.5.9 rd /s/q sqlite-3.5.9
@@ -23,8 +24,9 @@
svn export http://svn.python.org/projects/external/bzip2-1.0.5
)
- at rem Sleepycat db
-if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20-vs9 db-4.4.20
+ at rem Berkeley DB
+if exist db-4.4.20 rd /s/q db-4.4.20
+if not exist db-4.7.25.0 svn export http://svn.python.org/projects/external/db-4.7.25.0
@rem OpenSSL
if not exist openssl-0.9.8g svn export http://svn.python.org/projects/external/openssl-0.9.8g
Modified: python/branches/tlee-ast-optimize/Tools/msi/msi.py
==============================================================================
--- python/branches/tlee-ast-optimize/Tools/msi/msi.py (original)
+++ python/branches/tlee-ast-optimize/Tools/msi/msi.py Tue Jul 1 14:28:00 2008
@@ -92,7 +92,8 @@
'_ctypes.pyd',
'_ctypes_test.pyd',
'_sqlite3.pyd',
- '_hashlib.pyd'
+ '_hashlib.pyd',
+ '_multiprocessing.pyd'
]
# Well-known component UUIDs
Modified: python/branches/tlee-ast-optimize/configure
==============================================================================
--- python/branches/tlee-ast-optimize/configure (original)
+++ python/branches/tlee-ast-optimize/configure Tue Jul 1 14:28:00 2008
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 63955 .
+# From configure.in Revision: 64002 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.6.
#
@@ -11150,6 +11150,467 @@
fi
+{ echo "$as_me:$LINENO: checking for long double support" >&5
+echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
+have_long_double=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+long double x; x = (long double)0.;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_DOUBLE 1
+_ACEOF
+
+ have_long_double=yes
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $have_long_double" >&5
+echo "${ECHO_T}$have_long_double" >&6; }
+if test "$have_long_double" = yes ; then
+{ echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
+if test "${ac_cv_type_long_double+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+typedef long double ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_long_double=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_long_double=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
+echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of long double" >&5
+echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_long_double+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef long double ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef long double ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef long double ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef long double ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef long double ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_double=$ac_lo;;
+'') if test "$ac_cv_type_long_double" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long double)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_long_double=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ typedef long double ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (ac__type_sizeof_))))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_double=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_long_double" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long double)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+ else
+ ac_cv_sizeof_long_double=0
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
+_ACEOF
+
+
+fi
+
{ echo "$as_me:$LINENO: checking for _Bool support" >&5
echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
have_c99_bool=no
Modified: python/branches/tlee-ast-optimize/configure.in
==============================================================================
--- python/branches/tlee-ast-optimize/configure.in (original)
+++ python/branches/tlee-ast-optimize/configure.in Tue Jul 1 14:28:00 2008
@@ -1328,7 +1328,7 @@
have_long_double=yes
])
AC_MSG_RESULT($have_long_double)
-if test "$have_long_long" = yes ; then
+if test "$have_long_double" = yes ; then
AC_CHECK_SIZEOF(long double, 12)
fi
Modified: python/branches/tlee-ast-optimize/pyconfig.h.in
==============================================================================
--- python/branches/tlee-ast-optimize/pyconfig.h.in (original)
+++ python/branches/tlee-ast-optimize/pyconfig.h.in Tue Jul 1 14:28:00 2008
@@ -384,6 +384,9 @@
/* Define to 1 if you have the `log1p' function. */
#undef HAVE_LOG1P
+/* Define this if you have the type long double. */
+#undef HAVE_LONG_DOUBLE
+
/* Define this if you have the type long long. */
#undef HAVE_LONG_LONG
@@ -887,6 +890,9 @@
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
+/* The size of `long double', as computed by sizeof. */
+#undef SIZEOF_LONG_DOUBLE
+
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
Modified: python/branches/tlee-ast-optimize/setup.py
==============================================================================
--- python/branches/tlee-ast-optimize/setup.py (original)
+++ python/branches/tlee-ast-optimize/setup.py Tue Jul 1 14:28:00 2008
@@ -1258,6 +1258,17 @@
HAVE_BROKEN_SEM_UNLINK=1
)
libraries = []
+
+ elif platform in ('freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
+ # FreeBSD's P1003.1b semaphore support is very experimental
+ # and has many known problems. (as of June 2008)
+ macros = dict( # FreeBSD
+ HAVE_SEM_OPEN=0,
+ HAVE_SEM_TIMEDWAIT=0,
+ HAVE_FD_TRANSFER=1,
+ )
+ libraries = []
+
else: # Linux and other unices
macros = dict(
HAVE_SEM_OPEN=1,
More information about the Python-checkins
mailing list