From 292d351fc1a7dc9feccd412843832808680a631f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 3 Feb 2008 16:51:08 +0000 Subject: Merged revisions 60481,60485,60489-60520,60523-60527,60530-60533,60535-60538,60540-60551 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk NOTE: I blocked the following revisions: svnmerge.py block -r 60521,60522,60528,60529,60534,60539 The new tests must be merged with lots of manual work. ........ r60493 | georg.brandl | 2008-02-01 12:59:08 +0100 (Fri, 01 Feb 2008) | 2 lines Update IPv6 RFC number. ........ r60497 | georg.brandl | 2008-02-01 16:50:15 +0100 (Fri, 01 Feb 2008) | 2 lines Add link checker builder, written for GHOP by Thomas Lamb. ........ r60500 | georg.brandl | 2008-02-01 19:08:09 +0100 (Fri, 01 Feb 2008) | 2 lines Rename batch file. ........ r60504 | christian.heimes | 2008-02-01 19:49:26 +0100 (Fri, 01 Feb 2008) | 1 line More int -> pid_t. ........ r60507 | georg.brandl | 2008-02-01 20:24:01 +0100 (Fri, 01 Feb 2008) | 2 lines Wording nit. ........ r60510 | georg.brandl | 2008-02-01 21:45:33 +0100 (Fri, 01 Feb 2008) | 2 lines Update for latest sphinx latex writer. ........ r60511 | raymond.hettinger | 2008-02-01 22:30:23 +0100 (Fri, 01 Feb 2008) | 1 line Issue #1996: float.as_integer_ratio() should return fraction in lowest terms. ........ r60512 | raymond.hettinger | 2008-02-01 23:15:52 +0100 (Fri, 01 Feb 2008) | 1 line Integer ratio should return ints instead of longs whereever possible. ........ r60513 | raymond.hettinger | 2008-02-01 23:22:50 +0100 (Fri, 01 Feb 2008) | 1 line labs() takes a long for an input. ........ r60514 | raymond.hettinger | 2008-02-01 23:42:59 +0100 (Fri, 01 Feb 2008) | 1 line Test round-trip on float.as_integer_ratio() and float.__truediv__(). ........ r60515 | marc-andre.lemburg | 2008-02-01 23:58:17 +0100 (Fri, 01 Feb 2008) | 3 lines Bump distutils version number to match Python version. ........ r60516 | raymond.hettinger | 2008-02-02 00:12:19 +0100 (Sat, 02 Feb 2008) | 1 line Fix int/long typecase. Add check for non-binary floating point. ........ r60517 | raymond.hettinger | 2008-02-02 00:45:44 +0100 (Sat, 02 Feb 2008) | 1 line Add protection from weirdness while scaling the mantissa to an integer. ........ r60518 | raymond.hettinger | 2008-02-02 06:11:40 +0100 (Sat, 02 Feb 2008) | 1 line Simpler solution to handling non-IEEE 754 environments. ........ r60519 | raymond.hettinger | 2008-02-02 06:24:44 +0100 (Sat, 02 Feb 2008) | 1 line Neaten-up a bit. ........ r60520 | georg.brandl | 2008-02-02 10:56:20 +0100 (Sat, 02 Feb 2008) | 2 lines Amendments to the urllib2 docs, written for GHOP by Thomas Lamb. ........ r60525 | georg.brandl | 2008-02-02 11:49:58 +0100 (Sat, 02 Feb 2008) | 3 lines Add email example how to send a multipart message. Written for GHOP by Martin Matejek. ........ r60526 | georg.brandl | 2008-02-02 12:05:00 +0100 (Sat, 02 Feb 2008) | 2 lines Rewrite test_socketserver as unittest, written for GHOP by Benjamin Petersen. ........ r60527 | georg.brandl | 2008-02-02 12:05:34 +0100 (Sat, 02 Feb 2008) | 2 lines Add GHOP contributor. ........ r60530 | mark.dickinson | 2008-02-02 18:16:13 +0100 (Sat, 02 Feb 2008) | 2 lines Make the Rational constructor accept '3.' and '.2' as well as '3.2'. ........ r60531 | neal.norwitz | 2008-02-02 19:52:51 +0100 (Sat, 02 Feb 2008) | 1 line Update the leaky tests (ie, ignore these tests if they report leaks). This version has been running for a while. ........ r60533 | skip.montanaro | 2008-02-02 20:11:57 +0100 (Sat, 02 Feb 2008) | 7 lines Split the refleak mail body into two parts, the first being those failing tests which are deemed more important issues, the second those which are known to have difficult to solve problems and are generally expected to leak. Hopefully this doesn't break the script... ........ r60535 | georg.brandl | 2008-02-03 01:04:50 +0100 (Sun, 03 Feb 2008) | 3 lines Wait for a delay before reaping children -- this should fix the test_socketserver failures on several platforms. ........ r60536 | brett.cannon | 2008-02-03 03:07:55 +0100 (Sun, 03 Feb 2008) | 2 lines Fix a minor typo. ........ r60537 | brett.cannon | 2008-02-03 03:08:45 +0100 (Sun, 03 Feb 2008) | 3 lines Directories from CPPFLAGS and LDFLAGS were being added in the reverse order for searches as to how they were listed in the environment variable. ........ r60538 | brett.cannon | 2008-02-03 03:34:14 +0100 (Sun, 03 Feb 2008) | 2 lines Remove extra tick marks and add a missing closing parenthesis. ........ r60540 | andrew.macintyre | 2008-02-03 07:58:06 +0100 (Sun, 03 Feb 2008) | 2 lines Update OS/2 EMX build bits for 2.6. ........ r60541 | andrew.macintyre | 2008-02-03 08:01:11 +0100 (Sun, 03 Feb 2008) | 2 lines Rename module definition file to reflect v2.6. ........ r60542 | andrew.macintyre | 2008-02-03 08:07:31 +0100 (Sun, 03 Feb 2008) | 6 lines The wrapper function is supposed to be for spawnvpe() so that's what we should call [this wrapper only available on OS/2]. Backport candidate to 2.5. ........ r60544 | gregory.p.smith | 2008-02-03 08:20:53 +0100 (Sun, 03 Feb 2008) | 6 lines Merge this fix from the pybsddb tree: r293 | jcea | 2008-01-31 01:08:19 -0800 (Thu, 31 Jan 2008) | 4 lines Solved memory leak when using cursors with databases without environment. ........ r60546 | gregory.p.smith | 2008-02-03 09:01:46 +0100 (Sun, 03 Feb 2008) | 2 lines remove a repeated occurance of a hardcoded berkeleydb library version number ........ r60549 | brett.cannon | 2008-02-03 10:59:21 +0100 (Sun, 03 Feb 2008) | 2 lines Add an entry for r60537. ........ r60550 | georg.brandl | 2008-02-03 13:29:00 +0100 (Sun, 03 Feb 2008) | 2 lines #2003: fix sentence. ........ r60551 | christian.heimes | 2008-02-03 15:34:18 +0100 (Sun, 03 Feb 2008) | 2 lines Fixed paths to Windows build directories in build_ext.py Use vsbuild instead of devenv in build.bat and _bsddb.vcproj ........ --- Doc/Makefile | 16 +- Doc/README.txt | 4 + Doc/builddoc.bat | 52 -- Doc/conf.py | 24 +- Doc/includes/email-alternative.py | 48 ++ Doc/library/email-examples.rst | 11 +- Doc/library/queue.rst | 2 +- Doc/library/socket.rst | 2 +- Doc/library/urllib2.rst | 39 +- Doc/make.bat | 52 ++ Doc/reference/datamodel.rst | 2 +- Lib/distutils/__init__.py | 2 +- Lib/distutils/command/build_ext.py | 6 +- Lib/rational.py | 15 +- Lib/test/test_builtin.py | 14 + Lib/test/test_rational.py | 6 + Lib/test/test_socketserver.py | 290 ++++---- Misc/ACKS | 1 + Misc/build.sh | 19 +- Modules/_bsddb.c | 8 +- Modules/mathmodule.c | 3 +- Modules/posixmodule.c | 26 +- Objects/floatobject.c | 117 +--- PC/os2emx/Makefile | 14 +- PC/os2emx/README.os2emx | 48 +- PC/os2emx/python25.def | 1263 ---------------------------------- PC/os2emx/python26.def | 1314 ++++++++++++++++++++++++++++++++++++ PCbuild/_bsddb.vcproj | 16 +- PCbuild/build.bat | 2 +- PCbuild/readme.txt | 10 +- configure | 4 +- configure.in | 2 +- setup.py | 6 +- 33 files changed, 1811 insertions(+), 1627 deletions(-) delete mode 100644 Doc/builddoc.bat create mode 100644 Doc/includes/email-alternative.py create mode 100644 Doc/make.bat delete mode 100644 PC/os2emx/python25.def create mode 100644 PC/os2emx/python26.def diff --git a/Doc/Makefile b/Doc/Makefile index 189a2f7..95718d7 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -16,11 +16,12 @@ ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \ help: @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " web to make file usable by Sphinx.web" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " changes to make an overview over all changed/added/deprecated items" + @echo " html to make standalone HTML files" + @echo " web to make file usable by Sphinx.web" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview over all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" checkout: @if [ ! -d tools/sphinx ]; then \ @@ -71,6 +72,11 @@ changes: BUILDER = changes changes: build @echo "The overview file is in build/changes." +linkcheck: BUILDER = linkcheck +linkcheck: build + @echo "Link check complete; look for any errors in the above output "\ + "or in build/$(BUILDER)/output.txt" + clean: -rm -rf build/* -rm -rf tools/sphinx diff --git a/Doc/README.txt b/Doc/README.txt index c6f685c..a93542f 100644 --- a/Doc/README.txt +++ b/Doc/README.txt @@ -55,6 +55,10 @@ Available make targets are: * "latex", which builds LaTeX source files that can be run with "pdflatex" to produce PDF documents. + + * "linkcheck", which checks all external references to see whether they are + broken, redirected or malformed, and outputs this information to stdout + as well as a plain-text (.txt) file. * "changes", which builds an overview over all versionadded/versionchanged/ deprecated items in the current version. This is meant as a help for the diff --git a/Doc/builddoc.bat b/Doc/builddoc.bat deleted file mode 100644 index a26851f..0000000 --- a/Doc/builddoc.bat +++ /dev/null @@ -1,52 +0,0 @@ -@echo off -setlocal - -set SVNROOT=http://svn.python.org/projects -if "%PYTHON%" EQU "" set PYTHON=python25 - -if "%1" EQU "" goto help -if "%1" EQU "html" goto build -if "%1" EQU "htmlhelp" goto build -if "%1" EQU "web" goto build -if "%1" EQU "webrun" goto webrun -if "%1" EQU "checkout" goto checkout -if "%1" EQU "update" goto update - -:help -echo HELP -echo. -echo builddoc checkout -echo builddoc update -echo builddoc html -echo builddoc htmlhelp -echo builddoc web -echo builddoc webrun -echo. -goto end - -:checkout -svn co %SVNROOT%/doctools/trunk/sphinx tools/sphinx -svn co %SVNROOT%/external/docutils-0.4/docutils tools/docutils -svn co %SVNROOT%/external/Pygments-0.9/pygments tools/pygments -goto end - -:update -svn update tools/sphinx -svn update tools/docutils -svn update tools/pygments -goto end - -:build -if not exist build mkdir build -if not exist build\%1 mkdir build\%1 -if not exist build\doctrees mkdir build\doctrees -cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%1 -if "%1" EQU "htmlhelp" "%ProgramFiles%\HTML Help Workshop\hhc.exe" build\htmlhelp\pydoc.hhp -goto end - -:webrun -set PYTHONPATH=tools -%PYTHON% -m sphinx.web build\web -goto end - -:end diff --git a/Doc/conf.py b/Doc/conf.py index 3c33f98..273c76c 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -103,29 +103,29 @@ latex_font_size = '10pt' # (source start file, target name, title, author, document class [howto/manual]). _stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor' latex_documents = [ - ('c-api/index.rst', 'c-api.tex', + ('c-api/index', 'c-api.tex', 'The Python/C API', _stdauthor, 'manual'), - ('distutils/index.rst', 'distutils.tex', + ('distutils/index', 'distutils.tex', 'Distributing Python Modules', _stdauthor, 'manual'), - ('documenting/index.rst', 'documenting.tex', + ('documenting/index', 'documenting.tex', 'Documenting Python', 'Georg Brandl', 'manual'), - ('extending/index.rst', 'extending.tex', + ('extending/index', 'extending.tex', 'Extending and Embedding Python', _stdauthor, 'manual'), - ('install/index.rst', 'install.tex', + ('install/index', 'install.tex', 'Installing Python Modules', _stdauthor, 'manual'), - ('library/index.rst', 'library.tex', + ('library/index', 'library.tex', 'The Python Library Reference', _stdauthor, 'manual'), - ('reference/index.rst', 'reference.tex', + ('reference/index', 'reference.tex', 'The Python Language Reference', _stdauthor, 'manual'), - ('tutorial/index.rst', 'tutorial.tex', + ('tutorial/index', 'tutorial.tex', 'Python Tutorial', _stdauthor, 'manual'), - ('using/index.rst', 'using.tex', + ('using/index', 'using.tex', 'Using Python', _stdauthor, 'manual'), - ('whatsnew/' + version + '.rst', 'whatsnew.tex', + ('whatsnew/' + version, 'whatsnew.tex', 'What\'s New in Python', 'A. M. Kuchling', 'howto'), ] # Collect all HOWTOs individually -latex_documents.extend(('howto/' + fn, 'howto-' + fn[:-4] + '.tex', +latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex', 'HOWTO', _stdauthor, 'howto') for fn in os.listdir('howto') if fn.endswith('.rst') and fn != 'index.rst') @@ -139,4 +139,4 @@ latex_preamble = r''' ''' # Documents to append as an appendix to all manuals. -latex_appendices = ['glossary.rst', 'about.rst', 'license.rst', 'copyright.rst'] +latex_appendices = ['glossary', 'about', 'license', 'copyright'] diff --git a/Doc/includes/email-alternative.py b/Doc/includes/email-alternative.py new file mode 100644 index 0000000..d941323 --- /dev/null +++ b/Doc/includes/email-alternative.py @@ -0,0 +1,48 @@ +#! /usr/bin/python + +import smtplib + +from email.mime.multipart import MIMEMultipart +from email.mime.text import MIMEText + +# me == my email address +# you == recipient's email address +me = "my@email.com" +you = "your@email.com" + +# Create message container - the correct MIME type is multipart/alternative. +msg = MIMEMultipart('alternative') +msg['Subject'] = "Link" +msg['From'] = me +msg['To'] = you + +# Create the body of the message (a plain-text and an HTML version). +text = "Hi!\nHow are you?\nHere is the link you wanted:\nhttp://www.python.org" +html = """\ + + + +

Hi!
+ How are you?
+ Here is the link you wanted. +

+ + +""" + +# Record the MIME types of both parts - text/plain and text/html. +part1 = MIMEText(text, 'plain') +part2 = MIMEText(html, 'html') + +# Attach parts into message container. +# According to RFC 2046, the last part of a multipart message, in this case +# the HTML message, is best and preferred. +msg.attach(part1) +msg.attach(part2) + +# Send the message via local SMTP server. +s = smtplib.SMTP('localhost') +# sendmail function takes 3 arguments: sender's address, recipient's address +# and message to send - here it is sent as one string. +s.sendmail(me, you, msg.as_string()) +s.close() diff --git a/Doc/library/email-examples.rst b/Doc/library/email-examples.rst index 64a9944..f606f9b 100644 --- a/Doc/library/email-examples.rst +++ b/Doc/library/email-examples.rst @@ -16,18 +16,23 @@ pictures that may be residing in a directory: Here's an example of how to send the entire contents of a directory as an email -message: [1]_ +message: [1]_ .. literalinclude:: ../includes/email-dir.py -And finally, here's an example of how to unpack a MIME message like the one +Here's an example of how to unpack a MIME message like the one above, into a directory of files: .. literalinclude:: ../includes/email-unpack.py +Here's an example of how to create an HTML message with an alternative plain +text version: [2]_ + +.. literalinclude:: ../includes/email-alternative.py + .. rubric:: Footnotes .. [1] Thanks to Matthew Dixon Cowles for the original inspiration and examples. - +.. [2] Contributed by Martin Matejek. diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index 582f2cd..b5ba24d 100644 --- a/Doc/library/queue.rst +++ b/Doc/library/queue.rst @@ -71,7 +71,7 @@ The :mod:`Queue` module defines the following classes and exceptions: Queue Objects ------------- -Queue objects (:class:``Queue``, :class:``LifoQueue``, or :class:``PriorityQueue`` +Queue objects (:class:`Queue`, :class:`LifoQueue`, or :class:`PriorityQueue`) provide the public methods described below. diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 7d2dea0..cb1b87c 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -23,7 +23,7 @@ PS1:7 and PS1:8). The platform-specific reference material for the various socket-related system calls are also a valuable source of information on the details of socket semantics. For Unix, refer to the manual pages; for Windows, see the WinSock (or Winsock 2) specification. For IPv6-ready APIs, readers may -want to refer to :rfc:`2553` titled Basic Socket Interface Extensions for IPv6. +want to refer to :rfc:`3493` titled Basic Socket Interface Extensions for IPv6. .. index:: object: socket diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index b3e5485..d77712f 100644 --- a/Doc/library/urllib2.rst +++ b/Doc/library/urllib2.rst @@ -33,10 +33,12 @@ The :mod:`urllib2` module defines the following functions: This function returns a file-like object with two additional methods: - * :meth:`geturl` --- return the URL of the resource retrieved + * :meth:`geturl` --- return the URL of the resource retrieved, commonly used to + determine if a redirect was followed - * :meth:`info` --- return the meta-information of the page, as a dictionary-like - object + * :meth:`info` --- return the meta-information of the page, such as headers, in + the form of an ``httplib.HTTPMessage`` instance + (see `Quick Reference to HTTP Headers `_) Raises :exc:`URLError` on errors. @@ -81,18 +83,32 @@ The following exceptions are raised as appropriate: The handlers raise this exception (or derived exceptions) when they run into a problem. It is a subclass of :exc:`IOError`. + .. attribute:: reason + + The reason for this error. It can be a message string or another exception + instance (:exc:`socket.error` for remote URLs, :exc:`OSError` for local + URLs). + .. exception:: HTTPError - A subclass of :exc:`URLError`, it can also function as a non-exceptional - file-like return value (the same thing that :func:`urlopen` returns). This - is useful when handling exotic HTTP errors, such as requests for - authentication. + Though being an exception (a subclass of :exc:`URLError`), an :exc:`HTTPError` + can also function as a non-exceptional file-like return value (the same thing + that :func:`urlopen` returns). This is useful when handling exotic HTTP + errors, such as requests for authentication. + + .. attribute:: code + + An HTTP status code as defined in `RFC 2616 `_. + This numeric value corresponds to a value found in the dictionary of + codes as found in :attr:`BaseHTTPServer.BaseHTTPRequestHandler.responses`. + + The following classes are provided: -.. class:: Request(url[, data][, headers] [, origin_req_host][, unverifiable]) +.. class:: Request(url[, data][, headers][, origin_req_host][, unverifiable]) This class is an abstraction of a URL request. @@ -107,7 +123,12 @@ The following classes are provided: returns a string in this format. *headers* should be a dictionary, and will be treated as if :meth:`add_header` - was called with each key and value as arguments. + was called with each key and value as arguments. This is often used to "spoof" + the ``User-Agent`` header, which is used by a browser to identify itself -- + some HTTP servers only allow requests coming from common browsers as opposed + to scripts. For example, Mozilla Firefox may identify itself as ``"Mozilla/5.0 + (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11"``, while :mod:`urllib2`'s + default user agent string is ``"Python-urllib/2.6"`` (on Python 2.6). The final two arguments are only of interest for correct handling of third-party HTTP cookies: diff --git a/Doc/make.bat b/Doc/make.bat new file mode 100644 index 0000000..a26851f --- /dev/null +++ b/Doc/make.bat @@ -0,0 +1,52 @@ +@echo off +setlocal + +set SVNROOT=http://svn.python.org/projects +if "%PYTHON%" EQU "" set PYTHON=python25 + +if "%1" EQU "" goto help +if "%1" EQU "html" goto build +if "%1" EQU "htmlhelp" goto build +if "%1" EQU "web" goto build +if "%1" EQU "webrun" goto webrun +if "%1" EQU "checkout" goto checkout +if "%1" EQU "update" goto update + +:help +echo HELP +echo. +echo builddoc checkout +echo builddoc update +echo builddoc html +echo builddoc htmlhelp +echo builddoc web +echo builddoc webrun +echo. +goto end + +:checkout +svn co %SVNROOT%/doctools/trunk/sphinx tools/sphinx +svn co %SVNROOT%/external/docutils-0.4/docutils tools/docutils +svn co %SVNROOT%/external/Pygments-0.9/pygments tools/pygments +goto end + +:update +svn update tools/sphinx +svn update tools/docutils +svn update tools/pygments +goto end + +:build +if not exist build mkdir build +if not exist build\%1 mkdir build\%1 +if not exist build\doctrees mkdir build\doctrees +cmd /C %PYTHON% tools\sphinx-build.py -b%1 -dbuild\doctrees . build\%1 +if "%1" EQU "htmlhelp" "%ProgramFiles%\HTML Help Workshop\hhc.exe" build\htmlhelp\pydoc.hhp +goto end + +:webrun +set PYTHONPATH=tools +%PYTHON% -m sphinx.web build\web +goto end + +:end diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 3a6b527..0ab5f11 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -991,7 +991,7 @@ that all old-style instances, independently of their class, are implemented with a single built-in type, called ``instance``. New-style classes were introduced in Python 2.2 to unify classes and types. A -new-style class neither more nor less than a user-defined type. If *x* is an +new-style class is neither more nor less than a user-defined type. If *x* is an instance of a new-style class, then ``type(x)`` is the same as ``x.__class__``. The major motivation for introducing new-style classes is to provide a unified diff --git a/Lib/distutils/__init__.py b/Lib/distutils/__init__.py index f71c3ad..0c3d939 100644 --- a/Lib/distutils/__init__.py +++ b/Lib/distutils/__init__.py @@ -18,4 +18,4 @@ __revision__ = "$Id$" # In general, major and minor version should loosely follow the Python # version number the distutils code was shipped with. # -__version__ = "2.5.1" +__version__ = "2.6.0" diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 6d42278..ff84bca 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -178,13 +178,13 @@ class build_ext(Command): self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) if MSVC_VERSION == 9: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild9')) + 'PCbuild')) elif MSVC_VERSION == 8: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild8', 'win32release')) + 'PC', 'VS8.0', 'win32release')) else: self.library_dirs.append(os.path.join(sys.exec_prefix, - 'PCBuild')) + 'PC', 'VS7.1')) # OS/2 (EMX) doesn't support Debug vs Release builds, but has the # import libraries in its "Config" subdirectory diff --git a/Lib/rational.py b/Lib/rational.py index 55d4a41..e2fed23 100755 --- a/Lib/rational.py +++ b/Lib/rational.py @@ -24,9 +24,18 @@ def gcd(a, b): return a -_RATIONAL_FORMAT = re.compile( - r'^\s*(?P[-+]?)(?P\d+)' - r'(?:/(?P\d+)|\.(?P\d+))?\s*$') +_RATIONAL_FORMAT = re.compile(r""" + \A\s* # optional whitespace at the start, then + (?P[-+]?) # an optional sign, then + (?=\d|\.\d) # lookahead for digit or .digit + (?P\d*) # numerator (possibly empty) + (?: # followed by an optional + /(?P\d+) # / and denominator + | # or + \.(?P\d*) # decimal point and fractional part + )? + \s*\Z # and optional whitespace to finish +""", re.VERBOSE) class Rational(RationalAbc): diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 35cdcd4..cc31e93 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -593,6 +593,20 @@ class BuiltinTest(unittest.TestCase): self.assertEqual(format(0, C('10')), ' 0') def test_floatasratio(self): + for f, ratio in [ + (0.875, (7, 8)), + (-0.875, (-7, 8)), + (0.0, (0, 1)), + (11.5, (23, 2)), + ]: + self.assertEqual(f.as_integer_ratio(), ratio) + + for i in range(10000): + f = random.random() + f *= 10 ** random.randint(-100, 100) + n, d = f.as_integer_ratio() + self.assertEqual(float(n).__truediv__(d), f) + R = rational.Rational self.assertEqual(R(0, 1), R(*float(0.0).as_integer_ratio())) diff --git a/Lib/test/test_rational.py b/Lib/test/test_rational.py index c9a129f..4f248be 100644 --- a/Lib/test/test_rational.py +++ b/Lib/test/test_rational.py @@ -77,6 +77,8 @@ class RationalTest(unittest.TestCase): self.assertEquals((3, 2), _components(R(" 03/02 \n "))) self.assertEquals((16, 5), _components(R(" 3.2 "))) self.assertEquals((-16, 5), _components(R(" -3.2 "))) + self.assertEquals((-3, 1), _components(R(" -3. "))) + self.assertEquals((3, 5), _components(R(" .6 "))) self.assertRaisesMessage( ZeroDivisionError, "Rational(3, 0)", @@ -111,6 +113,10 @@ class RationalTest(unittest.TestCase): # Don't accept combinations of decimals and rationals. ValueError, "Invalid literal for Rational: 3.2/7", R, "3.2/7") + self.assertRaisesMessage( + # Allow 3. and .3, but not . + ValueError, "Invalid literal for Rational: .", + R, ".") def testImmutable(self): r = R(7, 3) diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 3e0c7a4..5ae8e6d 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -1,20 +1,32 @@ -# Test suite for SocketServer.py +""" +Test suite for SocketServer.py. +""" -from test import test_support -from test.test_support import (verbose, verify, TESTFN, TestSkipped, - reap_children) -test_support.requires('network') - -from SocketServer import * +import os import socket import errno +import imp import select import time import threading -import os +from functools import wraps +import unittest +import SocketServer + +import test.test_support +from test.test_support import reap_children, verbose, TestSkipped +from test.test_support import TESTFN as TEST_FILE + +test.test_support.requires("network") NREQ = 3 DELAY = 0.5 +TEST_STR = b"hello world\n" +HOST = "localhost" + +HAVE_UNIX_SOCKETS = hasattr(socket, "AF_UNIX") +HAVE_FORKING = hasattr(os, "fork") and os.name != "os2" + class MyMixinHandler: def handle(self): @@ -23,23 +35,41 @@ class MyMixinHandler: time.sleep(DELAY) self.wfile.write(line) -class MyStreamHandler(MyMixinHandler, StreamRequestHandler): + +def receive(sock, n, timeout=20): + r, w, x = select.select([sock], [], [], timeout) + if sock in r: + return sock.recv(n) + else: + raise RuntimeError("timed out on %r" % (sock,)) + + +class MyStreamHandler(MyMixinHandler, SocketServer.StreamRequestHandler): pass -class MyDatagramHandler(MyMixinHandler, DatagramRequestHandler): +class MyDatagramHandler(MyMixinHandler, + SocketServer.DatagramRequestHandler): pass +class ForkingUnixStreamServer(SocketServer.ForkingMixIn, + SocketServer.UnixStreamServer): + pass + +class ForkingUnixDatagramServer(SocketServer.ForkingMixIn, + SocketServer.UnixDatagramServer): + pass + + class MyMixinServer: def serve_a_few(self): for i in range(NREQ): self.handle_request() + def handle_error(self, request, client_address): self.close_request(request) self.server_close() raise -teststring = b"hello world\n" - def receive(sock, n, timeout=20): r, w, x = select.select([sock], [], [], timeout) if sock in r: @@ -75,6 +105,7 @@ class ServerThread(threading.Thread): self.__svrcls = svrcls self.__hdlrcls = hdlrcls self.ready = threading.Event() + def run(self): class svrcls(MyMixinServer, self.__svrcls): pass @@ -93,64 +124,8 @@ class ServerThread(threading.Thread): svr.serve_a_few() if verbose: print("thread: done") -seed = 0 -def pickport(): - global seed - seed += 1 - return 10000 + (os.getpid() % 1000)*10 + seed - -host = "localhost" -testfiles = [] -def pickaddr(proto): - if proto == socket.AF_INET: - return (host, pickport()) - else: - fn = TESTFN + str(pickport()) - if os.name == 'os2': - # AF_UNIX socket names on OS/2 require a specific prefix - # which can't include a drive letter and must also use - # backslashes as directory separators - if fn[1] == ':': - fn = fn[2:] - if fn[0] in (os.sep, os.altsep): - fn = fn[1:] - fn = os.path.join('\socket', fn) - if os.sep == '/': - fn = fn.replace(os.sep, os.altsep) - else: - fn = fn.replace(os.altsep, os.sep) - testfiles.append(fn) - return fn - -def cleanup(): - for fn in testfiles: - try: - os.remove(fn) - except os.error: - pass - testfiles[:] = [] - -def testloop(proto, servers, hdlrcls, testfunc): - for svrcls in servers: - addr = pickaddr(proto) - if verbose: - print("ADDR =", addr) - print("CLASS =", svrcls) - t = ServerThread(addr, svrcls, hdlrcls) - if verbose: print("server created") - t.start() - if verbose: print("server running") - for i in range(NREQ): - t.ready.wait(10*DELAY) - if not t.ready.isSet(): - raise RuntimeError("Server not ready within a reasonable time") - if verbose: print("test client", i) - testfunc(proto, addr) - if verbose: print("waiting for server") - t.join() - if verbose: print("done") - -class ForgivingTCPServer(TCPServer): + +class ForgivingTCPServer(SocketServer.TCPServer): # prevent errors if another process is using the port we want def server_bind(self): host, default_port = self.server_address @@ -160,7 +135,7 @@ class ForgivingTCPServer(TCPServer): for port in [default_port, 3434, 8798, 23833]: try: self.server_address = host, port - TCPServer.server_bind(self) + SocketServer.TCPServer.server_bind(self) break except socket.error as e: (err, msg) = e @@ -168,56 +143,139 @@ class ForgivingTCPServer(TCPServer): raise print(' WARNING: failed to listen on port %d, trying another' % port, file=sys.__stderr__) -tcpservers = [ForgivingTCPServer, ThreadingTCPServer] -if hasattr(os, 'fork') and os.name not in ('os2',): - tcpservers.append(ForkingTCPServer) -udpservers = [UDPServer, ThreadingUDPServer] -if hasattr(os, 'fork') and os.name not in ('os2',): - udpservers.append(ForkingUDPServer) - -if not hasattr(socket, 'AF_UNIX'): - streamservers = [] - dgramservers = [] -else: - class ForkingUnixStreamServer(ForkingMixIn, UnixStreamServer): pass - streamservers = [UnixStreamServer, ThreadingUnixStreamServer] - if hasattr(os, 'fork') and os.name not in ('os2',): - streamservers.append(ForkingUnixStreamServer) - class ForkingUnixDatagramServer(ForkingMixIn, UnixDatagramServer): pass - dgramservers = [UnixDatagramServer, ThreadingUnixDatagramServer] - if hasattr(os, 'fork') and os.name not in ('os2',): - dgramservers.append(ForkingUnixDatagramServer) - -def sloppy_cleanup(): - # See http://python.org/sf/1540386 - # We need to reap children here otherwise a child from one server - # can be left running for the next server and cause a test failure. - time.sleep(DELAY) - reap_children() - -def testall(): - testloop(socket.AF_INET, tcpservers, MyStreamHandler, teststream) - sloppy_cleanup() - testloop(socket.AF_INET, udpservers, MyDatagramHandler, testdgram) - if hasattr(socket, 'AF_UNIX'): - sloppy_cleanup() - testloop(socket.AF_UNIX, streamservers, MyStreamHandler, teststream) - # Alas, on Linux (at least) recvfrom() doesn't return a meaningful - # client address so this cannot work: - ##testloop(socket.AF_UNIX, dgramservers, MyDatagramHandler, testdgram) +class SocketServerTest(unittest.TestCase): + """Test all socket servers.""" + + def setUp(self): + self.port_seed = 0 + self.test_files = [] + + def tearDown(self): + time.sleep(DELAY) + reap_children() + + for fn in self.test_files: + try: + os.remove(fn) + except os.error: + pass + self.test_files[:] = [] + + def pickport(self): + self.port_seed += 1 + return 10000 + (os.getpid() % 1000)*10 + self.port_seed + + def pickaddr(self, proto): + if proto == socket.AF_INET: + return (HOST, self.pickport()) + else: + fn = TEST_FILE + str(self.pickport()) + if os.name == 'os2': + # AF_UNIX socket names on OS/2 require a specific prefix + # which can't include a drive letter and must also use + # backslashes as directory separators + if fn[1] == ':': + fn = fn[2:] + if fn[0] in (os.sep, os.altsep): + fn = fn[1:] + fn = os.path.join('\socket', fn) + if os.sep == '/': + fn = fn.replace(os.sep, os.altsep) + else: + fn = fn.replace(os.altsep, os.sep) + self.test_files.append(fn) + return fn + + def run_servers(self, proto, servers, hdlrcls, testfunc): + for svrcls in servers: + addr = self.pickaddr(proto) + if verbose: + print "ADDR =", addr + print "CLASS =", svrcls + t = ServerThread(addr, svrcls, hdlrcls) + if verbose: print "server created" + t.start() + if verbose: print "server running" + for i in range(NREQ): + t.ready.wait(10*DELAY) + self.assert_(t.ready.isSet(), + "Server not ready within a reasonable time") + if verbose: print "test client", i + testfunc(proto, addr) + if verbose: print "waiting for server" + t.join() + if verbose: print "done" + + def stream_examine(self, proto, addr): + s = socket.socket(proto, socket.SOCK_STREAM) + s.connect(addr) + s.sendall(TEST_STR) + buf = data = receive(s, 100) + while data and '\n' not in buf: + data = receive(s, 100) + buf += data + self.assertEquals(buf, TEST_STR) + s.close() + + def dgram_examine(self, proto, addr): + s = socket.socket(proto, socket.SOCK_DGRAM) + s.sendto(TEST_STR, addr) + buf = data = receive(s, 100) + while data and '\n' not in buf: + data = receive(s, 100) + buf += data + self.assertEquals(buf, TEST_STR) + s.close() + + def test_TCPServers(self): + # Test SocketServer.TCPServer + servers = [ForgivingTCPServer, SocketServer.ThreadingTCPServer] + if HAVE_FORKING: + servers.append(SocketServer.ForkingTCPServer) + self.run_servers(socket.AF_INET, servers, + MyStreamHandler, self.stream_examine) + + def test_UDPServers(self): + # Test SocketServer.UDPServer + servers = [SocketServer.UDPServer, + SocketServer.ThreadingUDPServer] + if HAVE_FORKING: + servers.append(SocketServer.ForkingUDPServer) + self.run_servers(socket.AF_INET, servers, MyDatagramHandler, + self.dgram_examine) + + def test_stream_servers(self): + # Test SocketServer's stream servers + if not HAVE_UNIX_SOCKETS: + return + servers = [SocketServer.UnixStreamServer, + SocketServer.ThreadingUnixStreamServer] + if HAVE_FORKING: + servers.append(ForkingUnixStreamServer) + self.run_servers(socket.AF_UNIX, servers, MyStreamHandler, + self.stream_examine) + + # Alas, on Linux (at least) recvfrom() doesn't return a meaningful + # client address so this cannot work: + + # def test_dgram_servers(self): + # # Test SocketServer.UnixDatagramServer + # if not HAVE_UNIX_SOCKETS: + # return + # servers = [SocketServer.UnixDatagramServer, + # SocketServer.ThreadingUnixDatagramServer] + # if HAVE_FORKING: + # servers.append(ForkingUnixDatagramServer) + # self.run_servers(socket.AF_UNIX, servers, MyDatagramHandler, + # self.dgram_examine) + def test_main(): - import imp if imp.lock_held(): - # If the import lock is held, the threads will hang. + # If the import lock is held, the threads will hang raise TestSkipped("can't run when import lock is held") - reap_children() - try: - testall() - finally: - cleanup() - reap_children() + test.test_support.run_unittest(SocketServerTest) if __name__ == "__main__": test_main() diff --git a/Misc/ACKS b/Misc/ACKS index 34d2762..fae67a1 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -512,6 +512,7 @@ Fernando P Mark Perrego Trevor Perrin Tim Peters +Benjamin Peterson Chris Petrilli Bjorn Pettersen Geoff Philbrick diff --git a/Misc/build.sh b/Misc/build.sh index 94b496d..8eca6ba 100755 --- a/Misc/build.sh +++ b/Misc/build.sh @@ -67,7 +67,7 @@ REFLOG="build/reflog.txt.out" # Note: test_XXX (none currently) really leak, but are disabled # so we don't send spam. Any test which really leaks should only # be listed here if there are also test cases under Lib/test/leakers. -LEAKY_TESTS="test_(cmd_line|popen2|socket|threading_local|urllib2_localnet)" +LEAKY_TESTS="test_(cmd_line|popen2|socket|sys|threadsignals|urllib2_localnet)" # These tests always fail, so skip them so we don't get false positives. _ALWAYS_SKIP="" @@ -99,7 +99,17 @@ mail_on_failure() { if [ "$FAILURE_CC" != "" ]; then dest="$dest -c $FAILURE_CC" fi - mutt -s "$FAILURE_SUBJECT $1 ($NUM_FAILURES)" $dest < $2 + if [ "x$3" != "x" ] ; then + (echo "More important issues:" + echo "----------------------" + egrep -v "$3" < $2 + echo "" + echo "Less important issues:" + echo "----------------------" + egrep "$3" < $2) + else + cat $2 + fi | mutt -s "$FAILURE_SUBJECT $1 ($NUM_FAILURES)" $dest fi } @@ -194,9 +204,10 @@ if [ $err = 0 -a "$BUILD_DISABLED" != "yes" ]; then ## ensure that the reflog exists so the grep doesn't fail touch $REFLOG $PYTHON $REGRTEST_ARGS -R 4:3:$REFLOG -u network $LEAKY_SKIPS >& build/$F - NUM_FAILURES=`egrep -vc "($LEAKY_TESTS|sum=0)" $REFLOG` + LEAK_PAT="($LEAKY_TESTS|sum=0)" + NUM_FAILURES=`egrep -vc "$LEAK_PAT" $REFLOG` update_status "Testing refleaks ($NUM_FAILURES failures)" "$F" $start - mail_on_failure "refleak" $REFLOG + mail_on_failure "refleak" $REFLOG "$LEAK_PAT" ## now try to run all the tests F=make-testall.out diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index fb71161..52d83ec 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -904,7 +904,6 @@ DBCursor_dealloc(DBCursorObject* self) } if (self->dbc != NULL) { - MYDB_BEGIN_ALLOW_THREADS; /* If the underlying database has been closed, we don't need to do anything. If the environment has been closed we need to leak, as BerkeleyDB will crash trying to access @@ -913,9 +912,14 @@ DBCursor_dealloc(DBCursorObject* self) a database open. */ if (self->mydb->db && self->mydb->myenvobj && !self->mydb->myenvobj->closed) + /* test for: open db + no environment or non-closed environment */ + if (self->mydb->db && (!self->mydb->myenvobj || (self->mydb->myenvobj && + !self->mydb->myenvobj->closed))) { + MYDB_BEGIN_ALLOW_THREADS; err = self->dbc->c_close(self->dbc); + MYDB_END_ALLOW_THREADS; + } self->dbc = NULL; - MYDB_END_ALLOW_THREADS; } Py_XDECREF( self->mydb ); PyObject_Del(self); diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index f50a4bb..cf2bf64 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -235,8 +235,7 @@ math_trunc(PyObject *self, PyObject *number) PyDoc_STRVAR(math_trunc_doc, "trunc(x:Real) -> Integral\n" "\n" -"Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic" -"method."); +"Truncates x to the nearest Integral toward 0. Uses the __trunc__ magic method."); static PyObject * math_frexp(PyObject *self, PyObject *arg) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 842f971..fc989fe 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3579,9 +3579,9 @@ posix_spawnvpe(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS #if defined(PYCC_GCC) - spawnval = spawnve(mode, path, argvlist, envlist); + spawnval = spawnvpe(mode, path, argvlist, envlist); #else - spawnval = _spawnve(mode, path, argvlist, envlist); + spawnval = _spawnvpe(mode, path, argvlist, envlist); #endif Py_END_ALLOW_THREADS @@ -3964,7 +3964,8 @@ Kill a process with a signal."); static PyObject * posix_kill(PyObject *self, PyObject *args) { - int pid, sig; + pid_t pid; + int sig; if (!PyArg_ParseTuple(args, "ii:kill", &pid, &sig)) return NULL; #if defined(PYOS_OS2) && !defined(PYCC_GCC) @@ -4209,7 +4210,7 @@ posix_setgroups(PyObject *self, PyObject *groups) #if defined(HAVE_WAIT3) || defined(HAVE_WAIT4) static PyObject * -wait_helper(int pid, int status, struct rusage *ru) +wait_helper(pid_t pid, int status, struct rusage *ru) { PyObject *result; static PyObject *struct_rusage; @@ -4275,7 +4276,8 @@ Wait for completion of a child process."); static PyObject * posix_wait3(PyObject *self, PyObject *args) { - int pid, options; + pid_t pid; + int options; struct rusage ru; WAIT_TYPE status; WAIT_STATUS_INT(status) = 0; @@ -4299,7 +4301,8 @@ Wait for completion of a given child process."); static PyObject * posix_wait4(PyObject *self, PyObject *args) { - int pid, options; + pid_t pid; + int options; struct rusage ru; WAIT_TYPE status; WAIT_STATUS_INT(status) = 0; @@ -4323,7 +4326,8 @@ Wait for completion of a given child process."); static PyObject * posix_waitpid(PyObject *self, PyObject *args) { - int pid, options; + pid_t pid; + int options; WAIT_TYPE status; WAIT_STATUS_INT(status) = 0; @@ -4372,7 +4376,7 @@ Wait for completion of a child process."); static PyObject * posix_wait(PyObject *self, PyObject *noargs) { - int pid; + pid_t pid; WAIT_TYPE status; WAIT_STATUS_INT(status) = 0; @@ -4567,7 +4571,8 @@ Call the system call getsid()."); static PyObject * posix_getsid(PyObject *self, PyObject *args) { - int pid, sid; + pid_t pid; + int sid; if (!PyArg_ParseTuple(args, "i:getsid", &pid)) return NULL; sid = getsid(pid); @@ -4601,7 +4606,8 @@ Call the system call setpgid()."); static PyObject * posix_setpgid(PyObject *self, PyObject *args) { - int pid, pgrp; + pid_t pid; + int pgrp; if (!PyArg_ParseTuple(args, "ii:setpgid", &pid, &pgrp)) return NULL; if (setpgid(pid, pgrp) < 0) diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 5cb3201..9b499ba 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -1066,20 +1066,19 @@ float_float(PyObject *v) } static PyObject * -float_as_integer_ratio(PyObject *v) +float_as_integer_ratio(PyObject *v, PyObject *unused) { double self; double float_part; int exponent; - int is_negative; - const int chunk_size = 28; + int i; + PyObject *prev; - PyObject *py_chunk = NULL; PyObject *py_exponent = NULL; PyObject *numerator = NULL; PyObject *denominator = NULL; PyObject *result_pair = NULL; - PyNumberMethods *long_methods; + PyNumberMethods *long_methods = PyLong_Type.tp_as_number; #define INPLACE_UPDATE(obj, call) \ prev = obj; \ @@ -1101,93 +1100,31 @@ float_as_integer_ratio(PyObject *v) } #endif - if (self == 0) { - numerator = PyLong_FromLong(0); - if (numerator == NULL) goto error; - denominator = PyLong_FromLong(1); - if (denominator == NULL) goto error; - result_pair = PyTuple_Pack(2, numerator, denominator); - /* Hand ownership over to the tuple. If the tuple - wasn't created successfully, we want to delete the - ints anyway. */ - Py_DECREF(numerator); - Py_DECREF(denominator); - return result_pair; - } - - /* XXX: Could perhaps handle FLT_RADIX!=2 by using ilogb and - scalbn, but those may not be in C89. */ PyFPE_START_PROTECT("as_integer_ratio", goto error); - float_part = frexp(self, &exponent); - is_negative = 0; - if (float_part < 0) { - float_part = -float_part; - is_negative = 1; - /* 0.5 <= float_part < 1.0 */ - } + float_part = frexp(self, &exponent); /* self == float_part * 2**exponent exactly */ PyFPE_END_PROTECT(float_part); - /* abs(self) == float_part * 2**exponent exactly */ - - /* Suck up chunk_size bits at a time; 28 is enough so that we - suck up all bits in 2 iterations for all known binary - double-precision formats, and small enough to fit in a - long. */ - numerator = PyLong_FromLong(0); + + for (i=0; i<300 && float_part != floor(float_part) ; i++) { + float_part *= 2.0; + exponent--; + } + /* self == float_part * 2**exponent exactly and float_part is integral. + If FLT_RADIX != 2, the 300 steps may leave a tiny fractional part + to be truncated by PyLong_FromDouble(). */ + + numerator = PyLong_FromDouble(float_part); if (numerator == NULL) goto error; - long_methods = PyLong_Type.tp_as_number; - - py_chunk = PyLong_FromLong(chunk_size); - if (py_chunk == NULL) goto error; - - while (float_part != 0) { - /* invariant: abs(self) == - (numerator + float_part) * 2**exponent exactly */ - long digit; - PyObject *py_digit; - - PyFPE_START_PROTECT("as_integer_ratio", goto error); - /* Pull chunk_size bits out of float_part, into digits. */ - float_part = ldexp(float_part, chunk_size); - digit = (long)float_part; - float_part -= digit; - /* 0 <= float_part < 1 */ - exponent -= chunk_size; - PyFPE_END_PROTECT(float_part); - - /* Shift digits into numerator. */ - // numerator <<= chunk_size - INPLACE_UPDATE(numerator, - long_methods->nb_lshift(numerator, py_chunk)); - if (numerator == NULL) goto error; - - // numerator |= digit - py_digit = PyLong_FromLong(digit); - if (py_digit == NULL) goto error; - INPLACE_UPDATE(numerator, - long_methods->nb_or(numerator, py_digit)); - Py_DECREF(py_digit); - if (numerator == NULL) goto error; - } - - /* Add in the sign bit. */ - if (is_negative) { - INPLACE_UPDATE(numerator, - long_methods->nb_negative(numerator)); - if (numerator == NULL) goto error; - } - - /* now self = numerator * 2**exponent exactly; fold in 2**exponent */ + /* fold in 2**exponent */ denominator = PyLong_FromLong(1); - py_exponent = PyLong_FromLong(labs(exponent)); + py_exponent = PyLong_FromLong(labs((long)exponent)); if (py_exponent == NULL) goto error; INPLACE_UPDATE(py_exponent, long_methods->nb_lshift(denominator, py_exponent)); if (py_exponent == NULL) goto error; if (exponent > 0) { INPLACE_UPDATE(numerator, - long_methods->nb_multiply(numerator, - py_exponent)); + long_methods->nb_multiply(numerator, py_exponent)); if (numerator == NULL) goto error; } else { @@ -1196,12 +1133,17 @@ float_as_integer_ratio(PyObject *v) py_exponent = NULL; } + /* Returns ints instead of longs where possible */ + INPLACE_UPDATE(numerator, PyNumber_Int(numerator)); + if (numerator == NULL) goto error; + INPLACE_UPDATE(denominator, PyNumber_Int(denominator)); + if (denominator == NULL) goto error; + result_pair = PyTuple_Pack(2, numerator, denominator); #undef INPLACE_UPDATE error: Py_XDECREF(py_exponent); - Py_XDECREF(py_chunk); Py_XDECREF(denominator); Py_XDECREF(numerator); return result_pair; @@ -1210,17 +1152,16 @@ error: PyDoc_STRVAR(float_as_integer_ratio_doc, "float.as_integer_ratio() -> (int, int)\n" "\n" -"Returns a pair of integers, not necessarily in lowest terms, whose\n" -"ratio is exactly equal to the original float. This method raises an\n" -"OverflowError on infinities and a ValueError on nans. The resulting\n" -"denominator will be positive.\n" +"Returns a pair of integers, whose ratio is exactly equal to the original\n" +"float and with a positive denominator.\n" +"Raises OverflowError on infinities and a ValueError on nans.\n" "\n" ">>> (10.0).as_integer_ratio()\n" -"(167772160L, 16777216L)\n" +"(10, 1)\n" ">>> (0.0).as_integer_ratio()\n" "(0, 1)\n" ">>> (-.25).as_integer_ratio()\n" -"(-134217728L, 536870912L)"); +"(-1, 4)"); static PyObject * diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile index c0c9807..d3ef12b 100644 --- a/PC/os2emx/Makefile +++ b/PC/os2emx/Makefile @@ -1,16 +1,16 @@ #####################==================---------------- # -# Top-Level Makefile for Building Python 2.4 for OS/2 using GCC/EMX +# Top-Level Makefile for Building Python 2.6 for OS/2 using GCC/EMX # Originally written by Andrew Zabolotny, for Python 1.5.2 -# Modified by Andrew MacIntyre, for Python 2.5 +# Modified by Andrew MacIntyre, for Python 2.6 # # This makefile was developed for use with [P]GCC/EMX compiler any # version and GNU Make. # -# The output of the build is a largish Python25.DLL containing the +# The output of the build is a largish Python26.DLL containing the # essential modules of Python and a small Python.exe program to start # the interpreter. When embedding Python within another program, only -# Python25.DLL is needed. We also build python_s.a static library (which +# Python26.DLL is needed. We also build python_s.a static library (which # can be converted into OMF (.lib) format using emxomf tool) and both # python.a and python.lib import libraries. Then the optional # extension modules, which are OS/2 DLLs renamed with a PYD file extension. @@ -64,7 +64,7 @@ HAVE_OPENSSL= no # === install locations === # default value of PYTHONHOME -LIB_DIR=C:/Python25 +LIB_DIR=C:/Python26 # default is to have everything in or under PYTHONHOME EXE_DIR=$(LIB_DIR) DLL_DIR=$(EXE_DIR) @@ -236,8 +236,8 @@ $(OUT)%$O: %.c @echo STACKSIZE 2097152 >>$@ # Output file names -PYTHON_VER= 2.5 -PYTHON_LIB= python25 +PYTHON_VER= 2.6 +PYTHON_LIB= python26 PYTHON.LIB= $(PYTHON_LIB)_s$A PYTHON.IMPLIB= $(PYTHON_LIB)$A ifeq ($(EXEOMF),yes) diff --git a/PC/os2emx/README.os2emx b/PC/os2emx/README.os2emx index 4fe5c53..e186790 100644 --- a/PC/os2emx/README.os2emx +++ b/PC/os2emx/README.os2emx @@ -1,4 +1,4 @@ -This is a port of Python 2.5 to OS/2 using the EMX development tools +This is a port of Python 2.6 to OS/2 using the EMX development tools ========================================================================= What's new since the previous release @@ -10,11 +10,11 @@ Another day, another version... Licenses and info about Python and EMX -------------------------------------- -Please read the file README.Python-2.5 included in this package for -information about Python 2.5. This file is the README file from the -Python 2.5 source distribution available via http://www.python.org/ -and its mirrors. The file LICENCE.Python-2.5 is the text of the Licence -from the Python 2.5 source distribution. +Please read the file README.Python-2.6 included in this package for +information about Python 2.6. This file is the README file from the +Python 2.6 source distribution available via http://www.python.org/ +and its mirrors. The file LICENCE.Python-2.6 is the text of the Licence +from the Python 2.6 source distribution. Note that the EMX package that this package depends on is released under the GNU General Public Licence. Please refer to the documentation @@ -46,7 +46,7 @@ There have been ports of previous versions of Python to OS/2. The best known would be that by Jeff Rush, most recently of version 1.5.2. Jeff used IBM's Visual Age C++ (v3) for his ports, and his -patches have been included in the Python 2.5 source distribution. +patches have been included in the Python 2.6 source distribution. Andy Zabolotny implemented a port of Python v1.5.2 using the EMX development tools. His patches against the Python v1.5.2 source @@ -92,7 +92,7 @@ Python.exe is linked as an a.out executable, ie using EMX method E1 to compile & link the executable. This is so that fork() works (see "YOU HAVE BEEN WARNED" item 1). -Python25.dll is created as a normal OMF DLL, with an OMF import +Python26.dll is created as a normal OMF DLL, with an OMF import library and module definition file. There is also an a.out (.a) import library to support linking the DLL to a.out executables. The DLL requires the EMX runtime DLLs. @@ -148,7 +148,7 @@ WARNED" item 13. Upstream source patches: -No updates to the Python 2.5 release have become available. +No updates to the Python 2.6 release have become available. Eberhard Mattes' EMXFIX04 update to his EMX 0.9d tools suite includes bug fixes for the BSD DB library. The bsddb module included in this @@ -157,7 +157,7 @@ port incorporates these fixes. Library and other distributed Python code: The Python standard library lives in the Lib directory. All the standard -library code included with the Python 2.5 source distribution is included +library code included with the Python 2.6 source distribution is included in the binary archive, with the exception of the dos-8x3 and tkinter subdirectories which have been omitted to reduce the size of the binary archive - the dos-8x3 components are unnecessary duplicates and Tkinter @@ -172,7 +172,7 @@ omitted as not being supported by this port. The Misc directory has also been omitted. All subdirectories omitted from the binary archive can be reconstituted -from the Python 2.5 source distribution, if desired. +from the Python 2.6 source distribution, if desired. Support for building Python extensions: @@ -190,15 +190,15 @@ Packaging --------- This port is packaged as follows: -- python-2.5-os2emx-bin-03????.zip (binaries, library modules) -- python-2.5-os2emx-src-03???? (patches+makefiles for non-Python code) +- python-2.6-os2emx-bin-03????.zip (binaries, library modules) +- python-2.6-os2emx-src-03???? (patches+makefiles for non-Python code) As all the Python specific patches for the port are now part of the Python release tarball, only the patches and makefiles involved in building external libraries for optional extensions are included in the source archive. -Documentation for the Python language, as well as the Python 2.5 +Documentation for the Python language, as well as the Python 2.6 source distibution, can be obtained from the Python website (http://www.python.org/) or the Python project pages at Sourceforge (http://sf.net/projects/python/). @@ -213,7 +213,7 @@ package. Unpack this archive, preserving the subdirectories, in the root directory of the drive where you want Python to live. -Add the Python directory (eg C:\Python25) to the PATH and LIBPATH +Add the Python directory (eg C:\Python26) to the PATH and LIBPATH variables in CONFIG.SYS. You should then set the PYTHONHOME and PYTHONPATH environment variables @@ -223,9 +223,9 @@ PYTHONHOME should be set to Python's top level directory. PYTHONPATH should be set to the semicolon separated list of principal Python library directories. I use: - SET PYTHONHOME=F:/Python25 - SET PYTHONPATH=F:/Python25/Lib;F:/Python25/Lib/plat-os2emx; - F:/Python25/Lib/lib-dynload;F:/Python25/Lib/site-packages + SET PYTHONHOME=F:/Python26 + SET PYTHONPATH=F:/Python26/Lib;F:/Python26/Lib/plat-os2emx; + F:/Python26/Lib/lib-dynload;F:/Python26/Lib/site-packages NOTE!: the PYTHONPATH setting above is linewrapped for this document - it should all be on one line in CONFIG.SYS! @@ -238,7 +238,7 @@ EMX subset of the Terminfo database included with the ncurses-5.2 source distribution. This can be used by setting the TERMINFO environment variable to the path of the Terminfo subdirectory below the Python home directory. On my system this looks like: - SET TERMINFO=F:/Python25/Terminfo + SET TERMINFO=F:/Python26/Terminfo For the TERM environment variable, I would try one of the following: SET TERM=ansi @@ -252,8 +252,8 @@ If you wish to compile all the included Python library modules to bytecode, you can change into the Python home directory and run the COMPILEALL.CMD batch file. -You can execute the regression tests included with the Python 2.5 source -distribution by changing to the Python 2.5 home directory and executing the +You can execute the regression tests included with the Python 2.6 source +distribution by changing to the Python 2.6 home directory and executing the REGRTEST.CMD batch file. The following tests are known to fail at this time: - test_mhlib (I don't know of any port of MH to OS/2); @@ -299,7 +299,7 @@ Procedure 1. decide if you need to change the location of the Python installation. If you wish to do this, set the value of the Makefile variable LIB_DIR to the directory you wish to use for PYTHONHOME - (eg /usr/local/lib/python2.5). + (eg /usr/local/lib/python2.6). If you want Python to find its library without the PYTHONHOME environment variable set, set the value of the Makefile variable @@ -309,7 +309,7 @@ Procedure to be installed in a directory other than the PYTHONHOME directory, set the value of the Makefile variable EXE_DIR to the appropriate directory. -3. If you wish the Python core DLL (python25.dll) to be installed in a +3. If you wish the Python core DLL (python26.dll) to be installed in a directory other than the directory in which the Python executables are installed (by default, the PYTHONHOME directory), set the value of the Makefile variable DLL_DIR to the appropriate directory. This DLL must @@ -698,4 +698,4 @@ Andrew MacIntyre E-mail: andymac@bullseye.apana.org.au, or andymac@pcug.org.au Web: http://www.andymac.org/ -23 July, 2006. +28 January, 2008. diff --git a/PC/os2emx/python25.def b/PC/os2emx/python25.def deleted file mode 100644 index 55242ea..0000000 --- a/PC/os2emx/python25.def +++ /dev/null @@ -1,1263 +0,0 @@ -LIBRARY python25 INITINSTANCE TERMINSTANCE -DESCRIPTION "Python 2.5 Core DLL" -PROTMODE -DATA MULTIPLE NONSHARED -EXPORTS - -; From python25_s.lib(config) - "_PyImport_Inittab" - -; From python25_s.lib(dlfcn) -; "dlopen" -; "dlsym" -; "dlclose" -; "dlerror" - -; From python25_s.lib(getpathp) - "Py_GetProgramFullPath" - "Py_GetPrefix" - "Py_GetExecPrefix" - "Py_GetPath" - -; From python25_s.lib(getbuildinfo) - "Py_GetBuildInfo" - "_Py_svnversion" - -; From python25_s.lib(main) - "Py_Main" - "Py_GetArgcArgv" - -; From python25_s.lib(acceler) - "PyGrammar_AddAccelerators" - "PyGrammar_RemoveAccelerators" - -; From python25_s.lib(grammar1) - "PyGrammar_FindDFA" - "PyGrammar_LabelRepr" - -; From python25_s.lib(listnode) - "PyNode_ListTree" - -; From python25_s.lib(node) - "PyNode_New" - "PyNode_AddChild" - "PyNode_Free" - -; From python25_s.lib(parser) - "PyParser_AddToken" - "PyParser_New" - "PyParser_Delete" - -; From python25_s.lib(parsetok) - "Py_TabcheckFlag" - "PyParser_ParseString" - "PyParser_ParseStringFlagsFilename" - "PyParser_ParseFile" - "PyParser_ParseFileFlags" - "PyParser_ParseStringFlags" - -; From python25_s.lib(bitset) - "_Py_newbitset" - "_Py_delbitset" - "_Py_addbit" - "_Py_samebitset" - "_Py_mergebitset" - -; From python25_s.lib(metagrammar) - "_Py_meta_grammar" - "Py_meta_grammar" - -; From python25_s.lib(tokenizer) - "PyToken_OneChar" - "PyToken_TwoChars" - "PyToken_ThreeChars" - "PyTokenizer_FromString" - "PyTokenizer_Free" - "PyTokenizer_FromFile" - "PyTokenizer_Get" - "_PyParser_TokenNames" - -; From python25_s.lib(myreadline) - "_PyOS_ReadlineTState" - "PyOS_ReadlineFunctionPointer" - "PyOS_StdioReadline" - "PyOS_Readline" - "PyOS_InputHook" - -; From python25_s.lib(abstract) - "_PyObject_LengthHint" - "PyMapping_Size" - "PyObject_CallMethod" - "PyObject_GetItem" - "PySequence_GetItem" - "PyObject_SetItem" - "PySequence_SetItem" - "PyObject_DelItem" - "PySequence_DelItem" - "PyNumber_Multiply" - "PyNumber_InPlaceAdd" - "PyNumber_InPlaceMultiply" - "PyNumber_Int" - "PyNumber_Long" - "PyNumber_Float" - "PySequence_Concat" - "PySequence_Repeat" - "PySequence_InPlaceConcat" - "PySequence_InPlaceRepeat" - "PySequence_GetSlice" - "PySequence_SetSlice" - "PySequence_Tuple" - "PyObject_GetIter" - "PyIter_Next" - "PySequence_Fast" - "_PySequence_IterSearch" - "PyObject_CallFunction" - "_PyObject_CallFunction_SizeT" - "_PyObject_CallMethod_SizeT" - "PyObject_CallMethodObjArgs" - "PyObject_CallFunctionObjArgs" - "PyObject_Cmp" - "PyObject_Call" - "PyObject_CallObject" - "PyObject_Type" - "PyObject_Size" - "PyObject_Length" - "PyObject_DelItemString" - "PyObject_AsCharBuffer" - "PyObject_CheckReadBuffer" - "PyObject_AsReadBuffer" - "PyObject_AsWriteBuffer" - "PyNumber_Check" - "PyNumber_Add" - "PyNumber_Subtract" - "PyNumber_Divide" - "PyNumber_FloorDivide" - "PyNumber_TrueDivide" - "PyNumber_Remainder" - "PyNumber_Divmod" - "PyNumber_Power" - "PyNumber_Negative" - "PyNumber_Positive" - "PyNumber_Absolute" - "PyNumber_Invert" - "PyNumber_Lshift" - "PyNumber_Rshift" - "PyNumber_And" - "PyNumber_Xor" - "PyNumber_Or" - "PyNumber_Index" - "PyNumber_InPlaceSubtract" - "PyNumber_InPlaceDivide" - "PyNumber_InPlaceFloorDivide" - "PyNumber_InPlaceTrueDivide" - "PyNumber_InPlaceRemainder" - "PyNumber_InPlacePower" - "PyNumber_InPlaceLshift" - "PyNumber_InPlaceRshift" - "PyNumber_InPlaceAnd" - "PyNumber_InPlaceXor" - "PyNumber_InPlaceOr" - "PySequence_Check" - "PySequence_Size" - "PySequence_Length" - "PySequence_DelSlice" - "PySequence_List" - "PySequence_Count" - "PySequence_Contains" - "PySequence_In" - "PySequence_Index" - "PyMapping_Check" - "PyMapping_Length" - "PyMapping_HasKeyString" - "PyMapping_HasKey" - "PyMapping_GetItemString" - "PyMapping_SetItemString" - "PyObject_IsInstance" - "PyObject_IsSubclass" - -; From python25_s.lib(boolobject) - "PyBool_FromLong" - "PyBool_Type" - "_Py_ZeroStruct" - "_Py_TrueStruct" - -; From python25_s.lib(cellobject) - "PyCell_New" - "PyCell_Get" - "PyCell_Set" - "PyCell_Type" - -; From python25_s.lib(classobject) - "PyClass_New" - "PyClass_IsSubclass" - "PyInstance_New" - "PyInstance_NewRaw" - "PyMethod_New" - "PyMethod_Function" - "PyMethod_Self" - "PyMethod_Class" - "_PyInstance_Lookup" - "PyMethod_Fini" - "PyClass_Type" - "PyInstance_Type" - "PyMethod_Type" - -; From python25_s.lib(cobject) - "PyCObject_FromVoidPtr" - "PyCObject_FromVoidPtrAndDesc" - "PyCObject_AsVoidPtr" - "PyCObject_GetDesc" - "PyCObject_Import" - "PyCObject_SetVoidPtr" - "PyCObject_Type" - -; From python25_s.lib(codeobject) - "PyCode_New" - "PyCode_Addr2Line" - "PyCode_CheckLineNumber" - "PyCode_Type" - -; From python25_s.lib(complexobject) - "_Py_c_pow" - "_Py_c_sum" - "_Py_c_diff" - "_Py_c_neg" - "_Py_c_prod" - "_Py_c_quot" - "PyComplex_FromCComplex" - "PyComplex_FromDoubles" - "PyComplex_RealAsDouble" - "PyComplex_ImagAsDouble" - "PyComplex_AsCComplex" - "PyComplex_Type" - -; From python25_s.lib(descrobject) - "PyWrapper_New" - "PyDescr_NewMethod" - "PyDescr_NewClassMethod" - "PyDescr_NewMember" - "PyDescr_NewGetSet" - "PyDescr_NewWrapper" - "PyDictProxy_New" - "PyWrapperDescr_Type" - "PyProperty_Type" - -; From python25_s.lib(dictobject) - "PyDict_New" - "PyDict_GetItem" - "PyDict_SetItem" - "PyDict_DelItem" - "PyDict_Clear" - "PyDict_MergeFromSeq2" - "PyDict_Merge" - "PyDict_Keys" - "PyDict_Values" - "PyDict_Contains" - "PyDict_Next" - "PyDict_Items" - "PyDict_Size" - "PyDict_Copy" - "PyDict_Update" - "PyDict_GetItemString" - "PyDict_SetItemString" - "PyDict_DelItemString" - "PyDict_Type" - "PyDictIterKey_Type" - "PyDictIterValue_Type" - "PyDictIterItem_Type" - -; From python25_s.lib(enumobject) - "PyEnum_Type" - "PyReversed_Type" - -; From python25_s.lib(fileobject) - "PyFile_FromString" - "Py_UniversalNewlineFread" - "PyFile_GetLine" - "PyFile_SoftSpace" - "PyFile_WriteObject" - "PyFile_WriteString" - "PyObject_AsFileDescriptor" - "Py_UniversalNewlineFgets" - "PyFile_SetBufSize" - "PyFile_SetEncoding" - "PyFile_FromFile" - "PyFile_AsFile" - "PyFile_Name" - "PyFile_Type" - -; From python25_s.lib(floatobject) - "PyFloat_FromString" - "PyFloat_AsDouble" - "PyFloat_Fini" - "_PyFloat_Pack4" - "_PyFloat_Pack8" - "_PyFloat_Unpack4" - "_PyFloat_Unpack8" - "PyFloat_FromDouble" - "PyFloat_AsReprString" - "PyFloat_AsString" - "_PyFloat_Init" - "PyFloat_AsStringEx" - "PyFloat_Type" - -; From python25_s.lib(frameobject) - "PyFrame_New" - "PyFrame_FastToLocals" - "PyFrame_LocalsToFast" - "_PyFrame_Init" - "PyFrame_Fini" - "PyFrame_BlockSetup" - "PyFrame_BlockPop" - "PyFrame_Type" - -; From python25_s.lib(funcobject) - "PyFunction_New" - "PyFunction_GetCode" - "PyFunction_GetGlobals" - "PyFunction_GetModule" - "PyFunction_GetDefaults" - "PyFunction_SetDefaults" - "PyFunction_GetClosure" - "PyFunction_SetClosure" - "PyClassMethod_New" - "PyStaticMethod_New" - "PyFunction_Type" - "PyClassMethod_Type" - "PyStaticMethod_Type" - -; From python25_s.lib(genobject) - "PyGen_New" - "PyGen_NeedsFinalizing" - "PyGen_Type" - -; From python25_s.lib(iterobject) - "PySeqIter_New" - "PyCallIter_New" - "PySeqIter_Type" - "PyCallIter_Type" - -; From python25_s.lib(listobject) - "PyList_New" - "PyList_Append" - "PyList_Size" - "PyList_GetItem" - "PyList_SetItem" - "PyList_Insert" - "PyList_GetSlice" - "PyList_SetSlice" - "PyList_Sort" - "PyList_Reverse" - "PyList_AsTuple" - "_PyList_Extend" - "PyList_Fini" - "PyList_Type" - "PyListIter_Type" - "PyListRevIter_Type" - -; From python25_s.lib(longobject) - "PyLong_FromDouble" - "PyLong_AsLong" - "_PyLong_AsSsize_t" - "PyLong_AsUnsignedLong" - "_PyLong_FromByteArray" - "_PyLong_AsByteArray" - "PyLong_AsDouble" - "PyLong_FromLongLong" - "PyLong_AsLongLong" - "PyLong_FromString" - "PyLong_FromLong" - "PyLong_FromUnsignedLong" - "PyLong_AsUnsignedLongMask" - "_PyLong_FromSize_t" - "_PyLong_FromSsize_t" - "_PyLong_AsScaledDouble" - "PyLong_FromVoidPtr" - "PyLong_AsVoidPtr" - "PyLong_FromUnsignedLongLong" - "PyLong_AsUnsignedLongLong" - "PyLong_AsUnsignedLongLongMask" - "PyLong_FromUnicode" - "_PyLong_Sign" - "_PyLong_NumBits" - "_PyLong_New" - "_PyLong_Copy" - "PyLong_Type" - "_PyLong_DigitValue" - -; From python25_s.lib(methodobject) - "PyCFunction_Call" - "Py_FindMethodInChain" - "PyCFunction_GetFunction" - "PyCFunction_GetSelf" - "PyCFunction_GetFlags" - "Py_FindMethod" - "PyCFunction_NewEx" - "PyCFunction_Fini" - "PyCFunction_New" - "PyCFunction_Type" - -; From python25_s.lib(moduleobject) - "PyModule_New" - "_PyModule_Clear" - "PyModule_GetDict" - "PyModule_GetName" - "PyModule_GetFilename" - "PyModule_Type" - -; From python25_s.lib(object) - "Py_DivisionWarningFlag" - "PyObject_Str" - "PyObject_Repr" - "_PyObject_Str" - "PyObject_Unicode" - "PyObject_GetAttr" - "PyObject_IsTrue" - "PyNumber_CoerceEx" - "PyObject_Compare" - "PyObject_RichCompare" - "_Py_HashDouble" - "PyObject_Hash" - "PyObject_SetAttr" - "PyObject_GenericGetAttr" - "PyObject_GenericSetAttr" - "PyCallable_Check" - "PyObject_Dir" - "PyMem_Malloc" - "PyMem_Realloc" - "PyMem_Free" - "PyObject_Print" - "_PyObject_Dump" - "PyObject_RichCompareBool" - "PyObject_GetAttrString" - "PyObject_SetAttrString" - "PyObject_HasAttrString" - "PyObject_HasAttr" - "_PyObject_GetDictPtr" - "PyObject_SelfIter" - "PyObject_Not" - "PyNumber_Coerce" - "Py_ReprEnter" - "Py_ReprLeave" - "_Py_HashPointer" - "Py_IncRef" - "Py_DecRef" - "_PyTrash_deposit_object" - "_PyTrash_destroy_chain" - "PyObject_Init" - "PyObject_InitVar" - "_PyObject_New" - "_PyObject_NewVar" - "_Py_ReadyTypes" - "_Py_SwappedOp" - "_Py_NotImplementedStruct" - "_Py_NoneStruct" - "_Py_cobject_hack" - "_Py_abstract_hack" - "_PyTrash_delete_nesting" - "_PyTrash_delete_later" - -; From python25_s.lib(obmalloc) - "PyObject_Malloc" - "PyObject_Free" - "PyObject_Realloc" - -; From python25_s.lib(rangeobject) - "PyRange_Type" - -; From python25_s.lib(setobject) - "PySet_Pop" - "PySet_New" - "PyFrozenSet_New" - "PySet_Size" - "PySet_Clear" - "PySet_Contains" - "PySet_Discard" - "PySet_Add" - "_PySet_Next" - "_PySet_Update" - "PySet_Fini" - "PySet_Type" - "PyFrozenSet_Type" - -; From python25_s.lib(sliceobject) - "_PySlice_FromIndices" - "PySlice_GetIndices" - "PySlice_GetIndicesEx" - "PySlice_New" - "_Py_EllipsisObject" - "PySlice_Type" - -; From python25_s.lib(stringobject) - "PyString_FromStringAndSize" - "PyString_InternInPlace" - "PyString_FromString" - "PyString_FromFormatV" - "PyString_AsString" - "_PyString_Resize" - "PyString_FromFormat" - "PyString_AsDecodedString" - "PyString_AsEncodedString" - "PyString_DecodeEscape" - "PyString_Repr" - "PyString_AsStringAndSize" - "_PyString_FormatLong" - "PyString_Format" - "_Py_ReleaseInternedStrings" - "PyString_Size" - "PyString_Concat" - "PyString_ConcatAndDel" - "_PyString_Eq" - "PyString_InternImmortal" - "PyString_InternFromString" - "_PyString_Join" - "PyString_Decode" - "PyString_Encode" - "PyString_AsEncodedObject" - "PyString_AsDecodedObject" - "PyString_Fini" - "PyString_Type" - "PyBaseString_Type" - -; From python25_s.lib(structseq) - "PyStructSequence_InitType" - "PyStructSequence_New" - "PyStructSequence_UnnamedField" - -; From python25_s.lib(tupleobject) - "PyTuple_New" - "PyTuple_Pack" - "_PyTuple_Resize" - "PyTuple_Size" - "PyTuple_GetItem" - "PyTuple_SetItem" - "PyTuple_GetSlice" - "PyTuple_Fini" - "PyTuple_Type" - "PyTupleIter_Type" - -; From python25_s.lib(typeobject) - "PyType_IsSubtype" - "_PyType_Lookup" - "PyType_Ready" - "PyType_GenericAlloc" - "_PyObject_SlotCompare" - "PyType_GenericNew" - "PyType_Type" - "PyBaseObject_Type" - "PySuper_Type" - -; From python25_s.lib(unicodeobject) - "PyUnicodeUCS2_Resize" - "PyUnicodeUCS2_FromOrdinal" - "PyUnicodeUCS2_FromObject" - "PyUnicodeUCS2_FromEncodedObject" - "PyUnicodeUCS2_Decode" - "PyUnicodeUCS2_GetDefaultEncoding" - "PyUnicodeUCS2_DecodeUTF8" - "PyUnicodeUCS2_DecodeLatin1" - "PyUnicodeUCS2_DecodeASCII" - "PyUnicodeUCS2_AsEncodedString" - "PyUnicodeUCS2_AsUTF8String" - "PyUnicodeUCS2_AsLatin1String" - "PyUnicodeUCS2_AsASCIIString" - "PyUnicode_DecodeUTF7" - "PyUnicode_EncodeUTF7" - "PyUnicodeUCS2_DecodeUTF8Stateful" - "PyUnicodeUCS2_EncodeUTF8" - "PyUnicodeUCS2_DecodeUTF16Stateful" - "PyUnicodeUCS2_AsUTF16String" - "PyUnicodeUCS2_DecodeUnicodeEscape" - "PyUnicodeUCS2_DecodeRawUnicodeEscape" - "PyUnicodeUCS2_EncodeRawUnicodeEscape" - "_PyUnicode_DecodeUnicodeInternal" - "PyUnicodeUCS2_DecodeCharmap" - "PyUnicode_BuildEncodingMap" - "PyUnicodeUCS2_EncodeCharmap" - "PyUnicodeUCS2_TranslateCharmap" - "PyUnicodeUCS2_EncodeDecimal" - "PyUnicodeUCS2_Count" - "PyUnicodeUCS2_Find" - "PyUnicodeUCS2_Join" - "PyUnicodeUCS2_Splitlines" - "PyUnicodeUCS2_Compare" - "PyUnicodeUCS2_Contains" - "PyUnicodeUCS2_Concat" - "_PyUnicode_XStrip" - "PyUnicodeUCS2_Replace" - "PyUnicodeUCS2_Split" - "PyUnicodeUCS2_RSplit" - "PyUnicodeUCS2_Format" - "_PyUnicodeUCS2_Init" - "_PyUnicodeUCS2_Fini" - "PyUnicodeUCS2_FromUnicode" - "PyUnicodeUCS2_AsUnicode" - "PyUnicodeUCS2_GetSize" - "PyUnicodeUCS2_GetMax" - "_PyUnicodeUCS2_AsDefaultEncodedString" - "PyUnicodeUCS2_SetDefaultEncoding" - "PyUnicodeUCS2_Encode" - "PyUnicodeUCS2_AsEncodedObject" - "PyUnicodeUCS2_DecodeUTF16" - "PyUnicodeUCS2_EncodeUTF16" - "PyUnicodeUCS2_AsUnicodeEscapeString" - "PyUnicodeUCS2_EncodeUnicodeEscape" - "PyUnicodeUCS2_AsRawUnicodeEscapeString" - "PyUnicodeUCS2_EncodeLatin1" - "PyUnicodeUCS2_EncodeASCII" - "PyUnicodeUCS2_AsCharmapString" - "PyUnicodeUCS2_Partition" - "PyUnicodeUCS2_RPartition" - "PyUnicodeUCS2_Translate" - "PyUnicodeUCS2_Tailmatch" - "PyUnicode_AsDecodedObject" - "PyUnicode_Type" - -; From python25_s.lib(unicodectype) - "_PyUnicode_TypeRecords" - "_PyUnicodeUCS2_ToNumeric" - "_PyUnicodeUCS2_IsLowercase" - "_PyUnicodeUCS2_IsUppercase" - "_PyUnicodeUCS2_IsTitlecase" - "_PyUnicodeUCS2_IsWhitespace" - "_PyUnicodeUCS2_IsLinebreak" - "_PyUnicodeUCS2_ToLowercase" - "_PyUnicodeUCS2_ToUppercase" - "_PyUnicodeUCS2_ToTitlecase" - "_PyUnicodeUCS2_ToDecimalDigit" - "_PyUnicodeUCS2_ToDigit" - "_PyUnicodeUCS2_IsDecimalDigit" - "_PyUnicodeUCS2_IsDigit" - "_PyUnicodeUCS2_IsNumeric" - "_PyUnicodeUCS2_IsAlpha" - -; From python25_s.lib(weakrefobject) - "PyWeakref_NewRef" - "PyWeakref_NewProxy" - "PyObject_ClearWeakRefs" - "PyWeakref_GetObject" - "_PyWeakref_GetWeakrefCount" - "_PyWeakref_ClearRef" - "_PyWeakref_RefType" - "_PyWeakref_ProxyType" - "_PyWeakref_CallableProxyType" - -; From python25_s.lib(Python-ast) -; "init_ast" - "Module" - "Interactive" - "Expression" - "Suite" - "FunctionDef" - "ClassDef" - "Return" - "Delete" - "Assign" - "AugAssign" - "Print" - "For" - "While" - "If" - "With" - "Raise" - "TryExcept" - "TryFinally" - "Assert" - "Import" - "ImportFrom" - "Exec" - "Global" - "Expr" - "Pass" - "Break" - "Continue" - "BoolOp" - "BinOp" - "UnaryOp" - "Lambda" - "IfExp" - "Dict" - "ListComp" - "GeneratorExp" - "Yield" - "Compare" - "Call" - "Repr" - "Num" - "Str" - "Attribute" - "Subscript" - "Name" - "List" - "Tuple" - "Ellipsis" - "Slice" - "ExtSlice" - "Index" - "comprehension" - "excepthandler" - "arguments" - "keyword" - "alias" - "PyAST_mod2obj" - -; From python25_s.lib(asdl) - "asdl_seq_new" - "asdl_int_seq_new" - -; From python25_s.lib(ast) - "PyAST_FromNode" - -; From python25_s.lib(bltinmodule) - "_PyBuiltin_Init" - "Py_FileSystemDefaultEncoding" - -; From python25_s.lib(exceptions) - "PyUnicodeEncodeError_GetStart" - "PyUnicodeDecodeError_GetStart" - "PyUnicodeEncodeError_GetEnd" - "PyUnicodeDecodeError_GetEnd" - "_PyExc_Init" - "PyUnicodeDecodeError_Create" - "PyUnicodeEncodeError_Create" - "PyUnicodeTranslateError_Create" - "PyUnicodeEncodeError_GetEncoding" - "PyUnicodeDecodeError_GetEncoding" - "PyUnicodeEncodeError_GetObject" - "PyUnicodeDecodeError_GetObject" - "PyUnicodeTranslateError_GetObject" - "PyUnicodeTranslateError_GetStart" - "PyUnicodeEncodeError_SetStart" - "PyUnicodeDecodeError_SetStart" - "PyUnicodeTranslateError_SetStart" - "PyUnicodeTranslateError_GetEnd" - "PyUnicodeEncodeError_SetEnd" - "PyUnicodeDecodeError_SetEnd" - "PyUnicodeTranslateError_SetEnd" - "PyUnicodeEncodeError_GetReason" - "PyUnicodeDecodeError_GetReason" - "PyUnicodeTranslateError_GetReason" - "PyUnicodeEncodeError_SetReason" - "PyUnicodeDecodeError_SetReason" - "PyUnicodeTranslateError_SetReason" - "_PyExc_Fini" - "PyExc_BaseException" - "PyExc_Exception" - "PyExc_TypeError" - "PyExc_StopIteration" - "PyExc_GeneratorExit" - "PyExc_SystemExit" - "PyExc_KeyboardInterrupt" - "PyExc_ImportError" - "PyExc_EnvironmentError" - "PyExc_IOError" - "PyExc_OSError" - "PyExc_EOFError" - "PyExc_RuntimeError" - "PyExc_NotImplementedError" - "PyExc_NameError" - "PyExc_UnboundLocalError" - "PyExc_AttributeError" - "PyExc_IndexError" - "PyExc_SyntaxError" - "PyExc_IndentationError" - "PyExc_TabError" - "PyExc_LookupError" - "PyExc_KeyError" - "PyExc_ValueError" - "PyExc_UnicodeError" - "PyExc_UnicodeEncodeError" - "PyExc_UnicodeDecodeError" - "PyExc_UnicodeTranslateError" - "PyExc_AssertionError" - "PyExc_ArithmeticError" - "PyExc_FloatingPointError" - "PyExc_OverflowError" - "PyExc_ZeroDivisionError" - "PyExc_SystemError" - "PyExc_ReferenceError" - "PyExc_MemoryError" - "PyExc_Warning" - "PyExc_UserWarning" - "PyExc_DeprecationWarning" - "PyExc_PendingDeprecationWarning" - "PyExc_SyntaxWarning" - "PyExc_RuntimeWarning" - "PyExc_FutureWarning" - "PyExc_ImportWarning" - "PyExc_MemoryErrorInst" - -; From python25_s.lib(ceval) - "PyEval_EvalFrameEx" - "PyEval_CallObjectWithKeywords" - "PyEval_EvalCodeEx" - "PyEval_GetFrame" - "PyEval_CallObject" - "PyEval_SetProfile" - "PyEval_SetTrace" - "PyEval_GetBuiltins" - "PyEval_GetGlobals" - "PyEval_GetLocals" - "PyEval_GetRestricted" - "PyEval_MergeCompilerFlags" - "Py_FlushLine" - "Py_AddPendingCall" - "Py_MakePendingCalls" - "Py_SetRecursionLimit" - "Py_GetRecursionLimit" - "_Py_CheckRecursiveCall" - "PyEval_GetFuncName" - "PyEval_GetFuncDesc" - "PyEval_GetCallStats" - "PyEval_EvalFrame" - "PyEval_SaveThread" - "PyEval_RestoreThread" - "PyEval_ThreadsInitialized" - "PyEval_InitThreads" - "PyEval_AcquireLock" - "PyEval_ReleaseLock" - "PyEval_AcquireThread" - "PyEval_ReleaseThread" - "PyEval_ReInitThreads" - "_PyEval_SliceIndex" - "PyEval_EvalCode" - "_PyEval_CallTracing" - "_Py_CheckRecursionLimit" - "_Py_CheckInterval" - "_Py_Ticker" - -; From python25_s.lib(compile) - "_Py_Mangle" - "PyAST_Compile" - "PyNode_Compile" - "Py_OptimizeFlag" - -; From python25_s.lib(codecs) - "_PyCodec_Lookup" - "PyCodec_Encode" - "PyCodec_Decode" - "PyCodec_IgnoreErrors" - "PyCodec_ReplaceErrors" - "PyCodec_XMLCharRefReplaceErrors" - "PyCodec_BackslashReplaceErrors" - "PyCodec_Register" - "PyCodec_Encoder" - "PyCodec_Decoder" - "PyCodec_IncrementalEncoder" - "PyCodec_IncrementalDecoder" - "PyCodec_StreamReader" - "PyCodec_StreamWriter" - "PyCodec_RegisterError" - "PyCodec_LookupError" - "PyCodec_StrictErrors" - -; From python25_s.lib(errors) - "PyErr_SetNone" - "PyErr_SetString" - "PyErr_GivenExceptionMatches" - "PyErr_NormalizeException" - "PyErr_Fetch" - "PyErr_Clear" - "PyErr_NoMemory" - "PyErr_SetFromErrnoWithFilenameObject" - "PyErr_Format" - "PyErr_NewException" - "PyErr_WriteUnraisable" - "PyErr_SyntaxLocation" - "PyErr_ProgramText" - "PyErr_SetObject" - "PyErr_Occurred" - "PyErr_Restore" - "PyErr_ExceptionMatches" - "PyErr_BadArgument" - "PyErr_SetFromErrno" - "PyErr_SetFromErrnoWithFilename" - "PyErr_BadInternalCall" - "_PyErr_BadInternalCall" - "PyErr_Warn" - "PyErr_WarnExplicit" - -; From python25_s.lib(frozen) - "PyImport_FrozenModules" - -; From python25_s.lib(frozenmain) - "Py_FrozenMain" - -; From python25_s.lib(future) - "PyFuture_FromAST" - -; From python25_s.lib(getargs) - "PyArg_Parse" - "_PyArg_Parse_SizeT" - "PyArg_ParseTuple" - "_PyArg_ParseTuple_SizeT" - "PyArg_ParseTupleAndKeywords" - "_PyArg_ParseTupleAndKeywords_SizeT" - "PyArg_UnpackTuple" - "_PyArg_NoKeywords" - "PyArg_VaParse" - "PyArg_VaParseTupleAndKeywords" - "_PyArg_VaParse_SizeT" - "_PyArg_VaParseTupleAndKeywords_SizeT" - -; From python25_s.lib(getcompiler) - "Py_GetCompiler" - -; From python25_s.lib(getcopyright) - "Py_GetCopyright" - -; From python25_s.lib(getmtime) - "PyOS_GetLastModificationTime" - -; From python25_s.lib(getplatform) - "Py_GetPlatform" - -; From python25_s.lib(getversion) - "Py_GetVersion" - -; From python25_s.lib(graminit) - "_PyParser_Grammar" - -; From python25_s.lib(import) - "_PyImport_Init" - "_PyImportHooks_Init" - "PyImport_ImportModule" - "PyImport_Cleanup" - "_PyImport_FixupExtension" - "PyImport_AddModule" - "PyImport_ExecCodeModuleEx" - "PyImport_ImportFrozenModule" - "PyImport_ImportModuleEx" - "PyImport_ImportModuleLevel" - "PyImport_ReloadModule" - "PyImport_Import" -; "initimp" - "_PyImport_Fini" - "PyImport_GetMagicNumber" - "PyImport_ExecCodeModule" - "PyImport_GetModuleDict" - "_PyImport_FindModule" - "_PyImport_IsScript" - "_PyImport_ReInitLock" - "_PyImport_FindExtension" - "PyImport_AppendInittab" - "PyImport_ExtendInittab" - "PyImport_Inittab" - "_PyImport_Filetab" - -; From python25_s.lib(importdl) - "_PyImport_LoadDynamicModule" - -; From python25_s.lib(marshal) - "PyMarshal_ReadLongFromFile" - "PyMarshal_WriteObjectToString" - "PyMarshal_WriteLongToFile" - "PyMarshal_WriteObjectToFile" - "PyMarshal_ReadShortFromFile" - "PyMarshal_ReadObjectFromFile" - "PyMarshal_ReadLastObjectFromFile" - "PyMarshal_ReadObjectFromString" - "PyMarshal_Init" - -; From python25_s.lib(modsupport) - "Py_InitModule4" - "Py_BuildValue" - "_Py_BuildValue_SizeT" - "PyEval_CallFunction" - "PyEval_CallMethod" - "_Py_VaBuildValue_SizeT" - "Py_VaBuildValue" - "PyModule_AddObject" - "PyModule_AddIntConstant" - "PyModule_AddStringConstant" - "_Py_PackageContext" - -; From python25_s.lib(mysnprintf) - "PyOS_snprintf" - "PyOS_vsnprintf" - -; From python25_s.lib(mystrtoul) - "PyOS_strtoul" - "PyOS_strtol" - -; From python25_s.lib(pyarena) - "PyArena_New" - "PyArena_Free" - "PyArena_Malloc" - "PyArena_AddPyObject" - -; From python25_s.lib(pyfpe) - "PyFPE_dummy" - -; From python25_s.lib(pystate) - "PyInterpreterState_Clear" - "PyThreadState_Clear" - "_PyThread_CurrentFrames" - "PyGILState_Ensure" - "PyGILState_Release" - "PyInterpreterState_New" - "PyInterpreterState_Delete" - "PyThreadState_Delete" - "PyThreadState_New" - "PyThreadState_DeleteCurrent" - "PyThreadState_Get" - "PyThreadState_Swap" - "PyThreadState_GetDict" - "PyThreadState_SetAsyncExc" - "PyGILState_GetThisThreadState" - "PyInterpreterState_Head" - "PyInterpreterState_Next" - "PyInterpreterState_ThreadHead" - "PyThreadState_Next" - "_PyGILState_Init" - "_PyGILState_Fini" - "_PyThreadState_Current" - "_PyThreadState_GetFrame" - -; From python25_s.lib(pystrtod) - "PyOS_ascii_strtod" - "PyOS_ascii_formatd" - "PyOS_ascii_atof" - -; From python25_s.lib(pythonrun) - "Py_IgnoreEnvironmentFlag" - "Py_DebugFlag" - "Py_VerboseFlag" - "Py_NoSiteFlag" - "Py_InteractiveFlag" - "Py_FrozenFlag" - "Py_InitializeEx" - "Py_FatalError" - "Py_NewInterpreter" - "PyErr_Print" - "PyRun_InteractiveOneFlags" - "PyParser_ASTFromFile" - "PyRun_SimpleFileExFlags" - "PyRun_FileExFlags" - "Py_Exit" - "PyErr_PrintEx" - "PyErr_Display" - "Py_SetProgramName" - "Py_GetProgramName" - "Py_SetPythonHome" - "Py_GetPythonHome" - "Py_Initialize" - "Py_Finalize" - "Py_IsInitialized" - "Py_EndInterpreter" - "PyRun_AnyFileFlags" - "Py_FdIsInteractive" - "PyRun_InteractiveLoopFlags" - "PyRun_AnyFileExFlags" - "PyRun_SimpleStringFlags" - "PyRun_StringFlags" - "PyParser_ASTFromString" - "PyParser_SimpleParseStringFlags" - "PyParser_SimpleParseFileFlags" - "Py_CompileStringFlags" - "Py_SymtableString" - "Py_AtExit" - "PyOS_getsig" - "PyOS_setsig" - "PyParser_SetError" - "PyModule_GetWarningsModule" - "PyParser_SimpleParseStringFlagsFilename" - "PyParser_SimpleParseStringFilename" - "PyParser_SimpleParseFile" - "PyParser_SimpleParseString" - "PyRun_AnyFile" - "PyRun_AnyFileEx" - "PyRun_File" - "PyRun_FileEx" - "PyRun_FileFlags" - "PyRun_SimpleFile" - "PyRun_SimpleFileEx" - "PyRun_String" - "PyRun_SimpleString" - "Py_CompileString" - "PyRun_InteractiveOne" - "PyRun_InteractiveLoop" - "Py_UseClassExceptionsFlag" - "Py_UnicodeFlag" - "_Py_QnewFlag" - -; From python25_s.lib(structmember) - "PyMember_GetOne" - "PyMember_SetOne" - -; From python25_s.lib(symtable) - "PySymtable_Build" - "PySymtable_Free" - "PyST_GetScope" - "PySymtable_Lookup" - "PySTEntry_Type" - -; From python25_s.lib(sysmodule) - "_PySys_Init" - "PySys_WriteStderr" - "PySys_SetPath" - "PySys_SetArgv" - "PySys_WriteStdout" - "Py_SubversionRevision" - "Py_SubversionShortBranch" - "PySys_GetObject" - "PySys_SetObject" - "PySys_GetFile" - "PySys_ResetWarnOptions" - "PySys_AddWarnOption" - -; From python25_s.lib(traceback) - "PyTraceBack_Here" - "PyTraceBack_Print" - "PyTraceBack_Type" - -; From python25_s.lib(getopt) - "_PyOS_GetOpt" - "_PyOS_opterr" - "_PyOS_optind" - "_PyOS_optarg" - -; From python25_s.lib(dynload_shlib) - "_PyImport_DynLoadFiletab" - "_PyImport_GetDynLoadFunc" - -; From python25_s.lib(thread) - "PyThread_delete_key_value" - "PyThread_init_thread" - "PyThread_start_new_thread" - "PyThread_exit_thread" - "PyThread_get_thread_ident" - "PyThread_allocate_lock" - "PyThread_free_lock" - "PyThread_acquire_lock" - "PyThread_release_lock" - "PyThread_get_stacksize" - "PyThread_set_stacksize" - "PyThread_create_key" - "PyThread_delete_key" - "PyThread_set_key_value" - "PyThread_get_key_value" - "PyThread__exit_thread" - -; From python25_s.lib(gcmodule) -; "initgc" - "_PyObject_GC_New" - "_PyObject_GC_NewVar" - "PyGC_Collect" - "_PyObject_GC_Resize" - "_PyObject_GC_Malloc" - "PyObject_GC_Track" - "PyObject_GC_UnTrack" - "PyObject_GC_Del" - "_PyGC_Dump" - "_PyObject_GC_Track" - "_PyObject_GC_UnTrack" - "_PyObject_GC_Del" - "_PyGC_generation0" - -; From python25_s.lib(signalmodule) -; "initsignal" - "PyErr_CheckSignals" - "PyErr_SetInterrupt" - "PyOS_FiniInterrupts" - "PyOS_InterruptOccurred" - "PyOS_InitInterrupts" - "PyOS_AfterFork" - -; From python25_s.lib(posixmodule) -; "initos2" - -; From python25_s.lib(threadmodule) -; "initthread" - -; From python25_s.lib(arraymodule) -; "initarray" -; "array_methods" - -; From python25_s.lib(binascii) -; "initbinascii" - -; From python25_s.lib(cmathmodule) -; "initcmath" - -; From python25_s.lib(_codecsmodule) -; "init_codecs" - -; From python25_s.lib(collectionsmodule) -; "initcollections" - "dequeiter_type" - "dequereviter_type" - -; From python25_s.lib(cStringIO) -; "initcStringIO" - -; From python25_s.lib(_csv) -; "init_csv" - -; From python25_s.lib(datetimemodule) -; "initdatetime" - -; From python25_s.lib(dlmodule) -; "initdl" - -; From python25_s.lib(errnomodule) -; "initerrno" - -; From python25_s.lib(fcntlmodule) -; "initfcntl" - -; From python25_s.lib(_functoolsmodule) -; "init_functools" - -; From python25_s.lib(_heapqmodule) -; "init_heapq" - -; From python25_s.lib(imageop) -; "initimageop" - -; From python25_s.lib(itertoolsmodule) -; "inititertools" - -; From python25_s.lib(_localemodule) -; "init_locale" - -; From python25_s.lib(mathmodule) -; "initmath" - -; From python25_s.lib(operator) -; "initoperator" - -; From python25_s.lib(_randommodule) -; "init_random" - -; From python25_s.lib(sha256module) -; "init_sha256" - -; From python25_s.lib(sha512module) -; "init_sha512" - -; From python25_s.lib(_sre) -; "init_sre" - -; From python25_s.lib(_struct) -; "init_struct" - -; From python25_s.lib(symtablemodule) -; "init_symtable" - -; From python25_s.lib(termios) -; "inittermios" - -; From python25_s.lib(timemodule) -; "inittime" - "_PyTime_DoubleToTimet" -; "inittimezone" - -; From python25_s.lib(_weakref) -; "init_weakref" - -; From python25_s.lib(xxsubtype) -; "initxxsubtype" - -; From python25_s.lib(zipimport) -; "initzipimport" diff --git a/PC/os2emx/python26.def b/PC/os2emx/python26.def new file mode 100644 index 0000000..2795050 --- /dev/null +++ b/PC/os2emx/python26.def @@ -0,0 +1,1314 @@ +LIBRARY python26 INITINSTANCE TERMINSTANCE +DESCRIPTION "Python 2.6 Core DLL" +PROTMODE +DATA MULTIPLE NONSHARED +EXPORTS + +; From python26_s.lib(config) + "_PyImport_Inittab" + +; From python26_s.lib(dlfcn) +; "dlopen" +; "dlsym" +; "dlclose" +; "dlerror" + +; From python26_s.lib(getpathp) + "Py_GetProgramFullPath" + "Py_GetPrefix" + "Py_GetExecPrefix" + "Py_GetPath" + +; From python26_s.lib(getbuildinfo) + "Py_GetBuildInfo" + "_Py_svnversion" + +; From python26_s.lib(main) + "Py_Main" + "Py_GetArgcArgv" + +; From python26_s.lib(acceler) + "PyGrammar_AddAccelerators" + "PyGrammar_RemoveAccelerators" + +; From python26_s.lib(grammar1) + "PyGrammar_FindDFA" + "PyGrammar_LabelRepr" + +; From python26_s.lib(listnode) + "PyNode_ListTree" + +; From python26_s.lib(node) + "PyNode_New" + "PyNode_AddChild" + "PyNode_Free" + +; From python26_s.lib(parser) + "PyParser_AddToken" + "PyParser_New" + "PyParser_Delete" + +; From python26_s.lib(parsetok) + "Py_TabcheckFlag" + "PyParser_ParseString" + "PyParser_ParseStringFlagsFilename" + "PyParser_ParseFile" + "PyParser_ParseFileFlags" + "PyParser_ParseStringFlags" + +; From python26_s.lib(bitset) + "_Py_newbitset" + "_Py_delbitset" + "_Py_addbit" + "_Py_samebitset" + "_Py_mergebitset" + +; From python26_s.lib(metagrammar) + "_Py_meta_grammar" + "Py_meta_grammar" + +; From python26_s.lib(tokenizer) + "PyToken_OneChar" + "PyToken_TwoChars" + "PyToken_ThreeChars" + "PyTokenizer_FromString" + "PyTokenizer_Free" + "PyTokenizer_FromFile" + "PyTokenizer_Get" + "_PyParser_TokenNames" + +; From python26_s.lib(myreadline) + "_PyOS_ReadlineTState" + "PyOS_ReadlineFunctionPointer" + "PyOS_StdioReadline" + "PyOS_Readline" + "PyOS_InputHook" + +; From python26_s.lib(abstract) + "_PyObject_LengthHint" + "PyMapping_Size" + "PyObject_CallMethod" + "PyObject_GetItem" + "PySequence_GetItem" + "PyObject_SetItem" + "PySequence_SetItem" + "PyObject_DelItem" + "PySequence_DelItem" + "PyNumber_Multiply" + "PyNumber_InPlaceAdd" + "PyNumber_InPlaceMultiply" + "PyNumber_Int" + "PyNumber_Long" + "PyNumber_Float" + "PySequence_Concat" + "PySequence_Repeat" + "PySequence_InPlaceConcat" + "PySequence_InPlaceRepeat" + "PySequence_GetSlice" + "PySequence_SetSlice" + "PySequence_Tuple" + "PyObject_GetIter" + "PyIter_Next" + "PySequence_Fast" + "_PySequence_IterSearch" + "PyObject_CallFunction" + "_PyObject_CallFunction_SizeT" + "_PyObject_CallMethod_SizeT" + "PyObject_CallMethodObjArgs" + "PyObject_CallFunctionObjArgs" + "PyObject_Cmp" + "PyObject_Call" + "PyObject_CallObject" + "PyObject_Type" + "PyObject_Size" + "PyObject_Length" + "PyObject_DelItemString" + "PyObject_AsCharBuffer" + "PyObject_CheckReadBuffer" + "PyObject_AsReadBuffer" + "PyObject_AsWriteBuffer" + "PyNumber_Check" + "PyNumber_Add" + "PyNumber_Subtract" + "PyNumber_Divide" + "PyNumber_FloorDivide" + "PyNumber_TrueDivide" + "PyNumber_Remainder" + "PyNumber_Divmod" + "PyNumber_Power" + "PyNumber_Negative" + "PyNumber_Positive" + "PyNumber_Absolute" + "PyNumber_Invert" + "PyNumber_Lshift" + "PyNumber_Rshift" + "PyNumber_And" + "PyNumber_Xor" + "PyNumber_Or" + "PyNumber_Index" + "PyNumber_InPlaceSubtract" + "PyNumber_InPlaceDivide" + "PyNumber_InPlaceFloorDivide" + "PyNumber_InPlaceTrueDivide" + "PyNumber_InPlaceRemainder" + "PyNumber_InPlacePower" + "PyNumber_InPlaceLshift" + "PyNumber_InPlaceRshift" + "PyNumber_InPlaceAnd" + "PyNumber_InPlaceXor" + "PyNumber_InPlaceOr" + "PySequence_Check" + "PySequence_Size" + "PySequence_Length" + "PySequence_DelSlice" + "PySequence_List" + "PySequence_Count" + "PySequence_Contains" + "PySequence_In" + "PySequence_Index" + "PyMapping_Check" + "PyMapping_Length" + "PyMapping_HasKeyString" + "PyMapping_HasKey" + "PyMapping_GetItemString" + "PyMapping_SetItemString" + "PyObject_IsInstance" + "PyObject_IsSubclass" + +; From python26_s.lib(boolobject) + "PyBool_FromLong" + "PyBool_Type" + "_Py_ZeroStruct" + "_Py_TrueStruct" + +; From python26_s.lib(bufferobject) + "PyBuffer_FromObject" + "PyBuffer_FromReadWriteObject" + "PyBuffer_FromMemory" + "PyBuffer_FromReadWriteMemory" + "PyBuffer_New" + "PyBuffer_Type" + +; From python26_s.lib(cellobject) + "PyCell_New" + "PyCell_Get" + "PyCell_Set" + "PyCell_Type" + +; From python26_s.lib(classobject) + "PyClass_New" + "PyClass_IsSubclass" + "PyInstance_New" + "PyInstance_NewRaw" + "PyMethod_New" + "PyMethod_Function" + "PyMethod_Self" + "PyMethod_Class" + "_PyInstance_Lookup" + "PyMethod_Fini" + "PyClass_Type" + "PyInstance_Type" + "PyMethod_Type" + +; From python26_s.lib(cobject) + "PyCObject_FromVoidPtr" + "PyCObject_FromVoidPtrAndDesc" + "PyCObject_AsVoidPtr" + "PyCObject_GetDesc" + "PyCObject_Import" + "PyCObject_SetVoidPtr" + "PyCObject_Type" + +; From python26_s.lib(codeobject) + "PyCode_New" + "PyCode_Addr2Line" + "PyCode_CheckLineNumber" + "PyCode_Type" + +; From python26_s.lib(complexobject) + "_Py_c_pow" + "_Py_c_sum" + "_Py_c_diff" + "_Py_c_neg" + "_Py_c_prod" + "_Py_c_quot" + "PyComplex_FromCComplex" + "PyComplex_FromDoubles" + "PyComplex_RealAsDouble" + "PyComplex_ImagAsDouble" + "PyComplex_AsCComplex" + "PyComplex_Type" + +; From python26_s.lib(descrobject) + "PyWrapper_New" + "PyDescr_NewMethod" + "PyDescr_NewClassMethod" + "PyDescr_NewMember" + "PyDescr_NewGetSet" + "PyDescr_NewWrapper" + "PyDictProxy_New" + "PyWrapperDescr_Type" + "PyProperty_Type" + +; From python26_s.lib(dictobject) + "PyDict_New" + "PyDict_GetItem" + "PyDict_SetItem" + "PyDict_DelItem" + "PyDict_Clear" + "PyDict_MergeFromSeq2" + "PyDict_Merge" + "PyDict_Keys" + "PyDict_Values" + "PyDict_Contains" + "PyDict_Next" + "PyDict_Items" + "PyDict_Size" + "PyDict_Copy" + "PyDict_Update" + "PyDict_GetItemString" + "PyDict_SetItemString" + "PyDict_DelItemString" + "PyDict_Type" + "PyDictIterKey_Type" + "PyDictIterValue_Type" + "PyDictIterItem_Type" + +; From python26_s.lib(enumobject) + "PyEnum_Type" + "PyReversed_Type" + +; From python26_s.lib(fileobject) + "PyFile_FromString" + "Py_UniversalNewlineFread" + "PyFile_GetLine" + "PyFile_SoftSpace" + "PyFile_WriteObject" + "PyFile_WriteString" + "PyObject_AsFileDescriptor" + "Py_UniversalNewlineFgets" + "PyFile_SetBufSize" + "PyFile_SetEncoding" + "PyFile_FromFile" + "PyFile_AsFile" + "PyFile_Name" + "PyFile_Type" + +; From python26_s.lib(floatobject) + "PyFloat_FromString" + "PyFloat_AsDouble" + "PyFloat_Fini" + "_PyFloat_Pack4" + "_PyFloat_Pack8" + "_PyFloat_Unpack4" + "_PyFloat_Unpack8" + "PyFloat_FromDouble" + "PyFloat_AsReprString" + "PyFloat_AsString" + "_PyFloat_Init" + "PyFloat_AsStringEx" + "PyFloat_Type" + +; From python26_s.lib(frameobject) + "PyFrame_New" + "PyFrame_FastToLocals" + "PyFrame_LocalsToFast" + "_PyFrame_Init" + "PyFrame_Fini" + "PyFrame_BlockSetup" + "PyFrame_BlockPop" + "PyFrame_Type" + +; From python26_s.lib(funcobject) + "PyFunction_New" + "PyFunction_GetCode" + "PyFunction_GetGlobals" + "PyFunction_GetModule" + "PyFunction_GetDefaults" + "PyFunction_SetDefaults" + "PyFunction_GetClosure" + "PyFunction_SetClosure" + "PyClassMethod_New" + "PyStaticMethod_New" + "PyFunction_Type" + "PyClassMethod_Type" + "PyStaticMethod_Type" + +; From python26_s.lib(genobject) + "PyGen_New" + "PyGen_NeedsFinalizing" + "PyGen_Type" + +; From python26_s.lib(intobject) + "PyInt_AsLong" + "PyInt_AsUnsignedLongMask" + "PyInt_AsUnsignedLongLongMask" + "PyInt_FromString" + "PyInt_AsSsize_t" + "PyInt_Fini" + "PyInt_FromUnicode" + "PyInt_FromLong" + "PyInt_FromSize_t" + "PyInt_FromSsize_t" + "PyInt_GetMax" + "_PyInt_Init" + "PyInt_Type" + +; From python26_s.lib(iterobject) + "PySeqIter_New" + "PyCallIter_New" + "PySeqIter_Type" + "PyCallIter_Type" + +; From python26_s.lib(listobject) + "PyList_New" + "PyList_Append" + "PyList_Size" + "PyList_GetItem" + "PyList_SetItem" + "PyList_Insert" + "PyList_GetSlice" + "PyList_SetSlice" + "PyList_Sort" + "PyList_Reverse" + "PyList_AsTuple" + "_PyList_Extend" + "PyList_Fini" + "PyList_Type" + "PyListIter_Type" + "PyListRevIter_Type" + +; From python26_s.lib(longobject) + "PyLong_FromDouble" + "PyLong_AsLong" + "_PyLong_AsSsize_t" + "PyLong_AsUnsignedLong" + "_PyLong_FromByteArray" + "_PyLong_AsByteArray" + "PyLong_AsDouble" + "PyLong_FromLongLong" + "PyLong_AsLongLong" + "PyLong_FromString" + "PyLong_FromLong" + "PyLong_FromUnsignedLong" + "PyLong_AsUnsignedLongMask" + "_PyLong_FromSize_t" + "_PyLong_FromSsize_t" + "_PyLong_AsScaledDouble" + "PyLong_FromVoidPtr" + "PyLong_AsVoidPtr" + "PyLong_FromUnsignedLongLong" + "PyLong_AsUnsignedLongLong" + "PyLong_AsUnsignedLongLongMask" + "PyLong_FromUnicode" + "_PyLong_Sign" + "_PyLong_NumBits" + "_PyLong_New" + "_PyLong_Copy" + "PyLong_Type" + "_PyLong_DigitValue" + +; From python26_s.lib(methodobject) + "PyCFunction_Call" + "Py_FindMethodInChain" + "PyCFunction_GetFunction" + "PyCFunction_GetSelf" + "PyCFunction_GetFlags" + "Py_FindMethod" + "PyCFunction_NewEx" + "PyCFunction_Fini" + "PyCFunction_New" + "PyCFunction_Type" + +; From python26_s.lib(moduleobject) + "PyModule_New" + "_PyModule_Clear" + "PyModule_GetDict" + "PyModule_GetName" + "PyModule_GetFilename" + "PyModule_Type" + +; From python26_s.lib(object) + "Py_DivisionWarningFlag" + "PyObject_Str" + "PyObject_Repr" + "_PyObject_Str" + "PyObject_Unicode" + "PyObject_GetAttr" + "PyObject_IsTrue" + "PyNumber_CoerceEx" + "PyObject_Compare" + "PyObject_RichCompare" + "_Py_HashDouble" + "PyObject_Hash" + "PyObject_SetAttr" + "PyObject_GenericGetAttr" + "PyObject_GenericSetAttr" + "PyCallable_Check" + "PyObject_Dir" + "PyMem_Malloc" + "PyMem_Realloc" + "PyMem_Free" + "PyObject_Print" + "_PyObject_Dump" + "PyObject_RichCompareBool" + "PyObject_GetAttrString" + "PyObject_SetAttrString" + "PyObject_HasAttrString" + "PyObject_HasAttr" + "_PyObject_GetDictPtr" + "PyObject_SelfIter" + "PyObject_Not" + "PyNumber_Coerce" + "Py_ReprEnter" + "Py_ReprLeave" + "_Py_HashPointer" + "Py_IncRef" + "Py_DecRef" + "_PyTrash_deposit_object" + "_PyTrash_destroy_chain" + "PyObject_Init" + "PyObject_InitVar" + "_PyObject_New" + "_PyObject_NewVar" + "_PyObject_Del" + "_Py_ReadyTypes" + "_Py_SwappedOp" + "_Py_NotImplementedStruct" + "_Py_NoneStruct" + "_Py_cobject_hack" + "_Py_abstract_hack" + "_PyTrash_delete_nesting" + "_PyTrash_delete_later" + +; From python26_s.lib(obmalloc) + "PyObject_Malloc" + "PyObject_Free" + "PyObject_Realloc" + +; From python26_s.lib(rangeobject) + "PyRange_Type" + +; From python26_s.lib(setobject) + "PySet_Pop" + "PySet_New" + "PyFrozenSet_New" + "PySet_Size" + "PySet_Clear" + "PySet_Contains" + "PySet_Discard" + "PySet_Add" + "_PySet_Next" + "_PySet_Update" + "PySet_Fini" + "PySet_Type" + "PyFrozenSet_Type" + +; From python26_s.lib(sliceobject) + "_PySlice_FromIndices" + "PySlice_GetIndices" + "PySlice_GetIndicesEx" + "PySlice_New" + "_Py_EllipsisObject" + "PySlice_Type" + +; From python26_s.lib(stringobject) + "PyString_FromStringAndSize" + "PyString_InternInPlace" + "PyString_FromString" + "PyString_FromFormatV" + "PyString_AsString" + "_PyString_Resize" + "PyString_FromFormat" + "PyString_AsDecodedString" + "PyString_AsEncodedString" + "PyString_DecodeEscape" + "PyString_Repr" + "PyString_AsStringAndSize" + "_PyString_FormatLong" + "PyString_Format" + "_Py_ReleaseInternedStrings" + "PyString_Size" + "PyString_Concat" + "PyString_ConcatAndDel" + "_PyString_Eq" + "PyString_InternImmortal" + "PyString_InternFromString" + "_PyString_Join" + "PyString_Decode" + "PyString_Encode" + "PyString_AsEncodedObject" + "PyString_AsDecodedObject" + "PyString_Fini" + "PyString_Type" + "PyBaseString_Type" + +; From python26_s.lib(structseq) + "PyStructSequence_InitType" + "PyStructSequence_New" + "PyStructSequence_UnnamedField" + +; From python26_s.lib(tupleobject) + "PyTuple_New" + "PyTuple_Pack" + "_PyTuple_Resize" + "PyTuple_Size" + "PyTuple_GetItem" + "PyTuple_SetItem" + "PyTuple_GetSlice" + "PyTuple_Fini" + "PyTuple_Type" + "PyTupleIter_Type" + +; From python26_s.lib(typeobject) + "PyType_IsSubtype" + "_PyType_Lookup" + "PyType_Ready" + "PyType_GenericAlloc" + "_PyObject_SlotCompare" + "PyType_GenericNew" + "PyType_Type" + "PyBaseObject_Type" + "PySuper_Type" + +; From python26_s.lib(unicodeobject) + "PyUnicodeUCS2_Resize" + "PyUnicodeUCS2_FromOrdinal" + "PyUnicodeUCS2_FromObject" + "PyUnicodeUCS2_FromEncodedObject" + "PyUnicodeUCS2_Decode" + "PyUnicodeUCS2_GetDefaultEncoding" + "PyUnicodeUCS2_DecodeUTF8" + "PyUnicodeUCS2_DecodeLatin1" + "PyUnicodeUCS2_DecodeASCII" + "PyUnicodeUCS2_AsEncodedString" + "PyUnicodeUCS2_AsUTF8String" + "PyUnicodeUCS2_AsLatin1String" + "PyUnicodeUCS2_AsASCIIString" + "PyUnicode_DecodeUTF7" + "PyUnicode_EncodeUTF7" + "PyUnicodeUCS2_DecodeUTF8Stateful" + "PyUnicodeUCS2_EncodeUTF8" + "PyUnicodeUCS2_DecodeUTF16Stateful" + "PyUnicodeUCS2_AsUTF16String" + "PyUnicodeUCS2_DecodeUnicodeEscape" + "PyUnicodeUCS2_DecodeRawUnicodeEscape" + "PyUnicodeUCS2_EncodeRawUnicodeEscape" + "_PyUnicode_DecodeUnicodeInternal" + "PyUnicodeUCS2_DecodeCharmap" + "PyUnicode_BuildEncodingMap" + "PyUnicodeUCS2_EncodeCharmap" + "PyUnicodeUCS2_TranslateCharmap" + "PyUnicodeUCS2_EncodeDecimal" + "PyUnicodeUCS2_Count" + "PyUnicodeUCS2_Find" + "PyUnicodeUCS2_Join" + "PyUnicodeUCS2_Splitlines" + "PyUnicodeUCS2_Compare" + "PyUnicodeUCS2_Contains" + "PyUnicodeUCS2_Concat" + "_PyUnicode_XStrip" + "PyUnicodeUCS2_Replace" + "PyUnicodeUCS2_Split" + "PyUnicodeUCS2_RSplit" + "PyUnicodeUCS2_Format" + "_PyUnicodeUCS2_Init" + "_PyUnicodeUCS2_Fini" + "PyUnicodeUCS2_FromUnicode" + "PyUnicodeUCS2_AsUnicode" + "PyUnicodeUCS2_GetSize" + "PyUnicodeUCS2_GetMax" + "_PyUnicodeUCS2_AsDefaultEncodedString" + "PyUnicodeUCS2_SetDefaultEncoding" + "PyUnicodeUCS2_Encode" + "PyUnicodeUCS2_AsEncodedObject" + "PyUnicodeUCS2_DecodeUTF16" + "PyUnicodeUCS2_EncodeUTF16" + "PyUnicodeUCS2_AsUnicodeEscapeString" + "PyUnicodeUCS2_EncodeUnicodeEscape" + "PyUnicodeUCS2_AsRawUnicodeEscapeString" + "PyUnicodeUCS2_EncodeLatin1" + "PyUnicodeUCS2_EncodeASCII" + "PyUnicodeUCS2_AsCharmapString" + "PyUnicodeUCS2_Partition" + "PyUnicodeUCS2_RPartition" + "PyUnicodeUCS2_Translate" + "PyUnicodeUCS2_Tailmatch" + "PyUnicode_AsDecodedObject" + "PyUnicode_Type" + +; From python26_s.lib(unicodectype) + "_PyUnicode_TypeRecords" + "_PyUnicodeUCS2_ToNumeric" + "_PyUnicodeUCS2_IsLowercase" + "_PyUnicodeUCS2_IsUppercase" + "_PyUnicodeUCS2_IsTitlecase" + "_PyUnicodeUCS2_IsWhitespace" + "_PyUnicodeUCS2_IsLinebreak" + "_PyUnicodeUCS2_ToLowercase" + "_PyUnicodeUCS2_ToUppercase" + "_PyUnicodeUCS2_ToTitlecase" + "_PyUnicodeUCS2_ToDecimalDigit" + "_PyUnicodeUCS2_ToDigit" + "_PyUnicodeUCS2_IsDecimalDigit" + "_PyUnicodeUCS2_IsDigit" + "_PyUnicodeUCS2_IsNumeric" + "_PyUnicodeUCS2_IsAlpha" + +; From python26_s.lib(weakrefobject) + "PyWeakref_NewRef" + "PyWeakref_NewProxy" + "PyObject_ClearWeakRefs" + "PyWeakref_GetObject" + "_PyWeakref_GetWeakrefCount" + "_PyWeakref_ClearRef" + "_PyWeakref_RefType" + "_PyWeakref_ProxyType" + "_PyWeakref_CallableProxyType" + +; From python26_s.lib(Python-ast) +; "init_ast" + "Module" + "Interactive" + "Expression" + "Suite" + "FunctionDef" + "ClassDef" + "Return" + "Delete" + "Assign" + "AugAssign" + "Print" + "For" + "While" + "If" + "With" + "Raise" + "TryExcept" + "TryFinally" + "Assert" + "Import" + "ImportFrom" + "Exec" + "Global" + "Expr" + "Pass" + "Break" + "Continue" + "BoolOp" + "BinOp" + "UnaryOp" + "Lambda" + "IfExp" + "Dict" + "ListComp" + "GeneratorExp" + "Yield" + "Compare" + "Call" + "Repr" + "Num" + "Str" + "Attribute" + "Subscript" + "Name" + "List" + "Tuple" + "Ellipsis" + "Slice" + "ExtSlice" + "Index" + "comprehension" + "excepthandler" + "arguments" + "keyword" + "alias" + "PyAST_mod2obj" + +; From python26_s.lib(asdl) + "asdl_seq_new" + "asdl_int_seq_new" + +; From python26_s.lib(ast) + "PyAST_FromNode" + +; From python26_s.lib(bltinmodule) + "_PyBuiltin_Init" + "Py_FileSystemDefaultEncoding" + +; From python26_s.lib(exceptions) + "PyUnicodeEncodeError_GetStart" + "PyUnicodeDecodeError_GetStart" + "PyUnicodeEncodeError_GetEnd" + "PyUnicodeDecodeError_GetEnd" + "_PyExc_Init" + "PyUnicodeDecodeError_Create" + "PyUnicodeEncodeError_Create" + "PyUnicodeTranslateError_Create" + "PyUnicodeEncodeError_GetEncoding" + "PyUnicodeDecodeError_GetEncoding" + "PyUnicodeEncodeError_GetObject" + "PyUnicodeDecodeError_GetObject" + "PyUnicodeTranslateError_GetObject" + "PyUnicodeTranslateError_GetStart" + "PyUnicodeEncodeError_SetStart" + "PyUnicodeDecodeError_SetStart" + "PyUnicodeTranslateError_SetStart" + "PyUnicodeTranslateError_GetEnd" + "PyUnicodeEncodeError_SetEnd" + "PyUnicodeDecodeError_SetEnd" + "PyUnicodeTranslateError_SetEnd" + "PyUnicodeEncodeError_GetReason" + "PyUnicodeDecodeError_GetReason" + "PyUnicodeTranslateError_GetReason" + "PyUnicodeEncodeError_SetReason" + "PyUnicodeDecodeError_SetReason" + "PyUnicodeTranslateError_SetReason" + "_PyExc_Fini" + "PyExc_BaseException" + "PyExc_Exception" + "PyExc_StandardError" + "PyExc_TypeError" + "PyExc_StopIteration" + "PyExc_GeneratorExit" + "PyExc_SystemExit" + "PyExc_KeyboardInterrupt" + "PyExc_ImportError" + "PyExc_EnvironmentError" + "PyExc_IOError" + "PyExc_OSError" + "PyExc_EOFError" + "PyExc_RuntimeError" + "PyExc_NotImplementedError" + "PyExc_NameError" + "PyExc_UnboundLocalError" + "PyExc_AttributeError" + "PyExc_IndexError" + "PyExc_SyntaxError" + "PyExc_IndentationError" + "PyExc_TabError" + "PyExc_LookupError" + "PyExc_KeyError" + "PyExc_ValueError" + "PyExc_UnicodeError" + "PyExc_UnicodeEncodeError" + "PyExc_UnicodeDecodeError" + "PyExc_UnicodeTranslateError" + "PyExc_AssertionError" + "PyExc_ArithmeticError" + "PyExc_FloatingPointError" + "PyExc_OverflowError" + "PyExc_ZeroDivisionError" + "PyExc_SystemError" + "PyExc_ReferenceError" + "PyExc_MemoryError" + "PyExc_Warning" + "PyExc_UserWarning" + "PyExc_DeprecationWarning" + "PyExc_PendingDeprecationWarning" + "PyExc_SyntaxWarning" + "PyExc_RuntimeWarning" + "PyExc_FutureWarning" + "PyExc_ImportWarning" + "PyExc_MemoryErrorInst" + +; From python26_s.lib(ceval) + "PyEval_EvalFrameEx" + "PyEval_CallObjectWithKeywords" + "PyEval_EvalCodeEx" + "PyEval_GetFrame" + "PyEval_CallObject" + "PyEval_SetProfile" + "PyEval_SetTrace" + "PyEval_GetBuiltins" + "PyEval_GetGlobals" + "PyEval_GetLocals" + "PyEval_GetRestricted" + "PyEval_MergeCompilerFlags" + "Py_FlushLine" + "Py_AddPendingCall" + "Py_MakePendingCalls" + "Py_SetRecursionLimit" + "Py_GetRecursionLimit" + "_Py_CheckRecursiveCall" + "PyEval_GetFuncName" + "PyEval_GetFuncDesc" + "PyEval_GetCallStats" + "PyEval_EvalFrame" + "PyEval_SaveThread" + "PyEval_RestoreThread" + "PyEval_ThreadsInitialized" + "PyEval_InitThreads" + "PyEval_AcquireLock" + "PyEval_ReleaseLock" + "PyEval_AcquireThread" + "PyEval_ReleaseThread" + "PyEval_ReInitThreads" + "_PyEval_SliceIndex" + "PyEval_EvalCode" + "_PyEval_CallTracing" + "_Py_CheckRecursionLimit" + "_Py_CheckInterval" + "_Py_Ticker" + +; From python26_s.lib(compile) + "_Py_Mangle" + "PyAST_Compile" + "PyNode_Compile" + "Py_OptimizeFlag" + +; From python26_s.lib(codecs) + "_PyCodec_Lookup" + "PyCodec_Encode" + "PyCodec_Decode" + "PyCodec_IgnoreErrors" + "PyCodec_ReplaceErrors" + "PyCodec_XMLCharRefReplaceErrors" + "PyCodec_BackslashReplaceErrors" + "PyCodec_Register" + "PyCodec_Encoder" + "PyCodec_Decoder" + "PyCodec_IncrementalEncoder" + "PyCodec_IncrementalDecoder" + "PyCodec_StreamReader" + "PyCodec_StreamWriter" + "PyCodec_RegisterError" + "PyCodec_LookupError" + "PyCodec_StrictErrors" + +; From python26_s.lib(errors) + "PyErr_SetNone" + "PyErr_SetString" + "PyErr_GivenExceptionMatches" + "PyErr_NormalizeException" + "PyErr_Fetch" + "PyErr_Clear" + "PyErr_NoMemory" + "PyErr_SetFromErrnoWithFilenameObject" + "PyErr_Format" + "PyErr_NewException" + "PyErr_WriteUnraisable" + "PyErr_SyntaxLocation" + "PyErr_ProgramText" + "PyErr_SetObject" + "PyErr_Occurred" + "PyErr_Restore" + "PyErr_ExceptionMatches" + "PyErr_BadArgument" + "PyErr_SetFromErrno" + "PyErr_SetFromErrnoWithFilename" + "PyErr_BadInternalCall" + "_PyErr_BadInternalCall" + "PyErr_Warn" + "PyErr_WarnExplicit" + +; From python26_s.lib(frozen) + "PyImport_FrozenModules" + +; From python26_s.lib(frozenmain) + "Py_FrozenMain" + +; From python26_s.lib(future) + "PyFuture_FromAST" + +; From python26_s.lib(getargs) + "PyArg_Parse" + "_PyArg_Parse_SizeT" + "PyArg_ParseTuple" + "_PyArg_ParseTuple_SizeT" + "PyArg_ParseTupleAndKeywords" + "_PyArg_ParseTupleAndKeywords_SizeT" + "PyArg_UnpackTuple" + "_PyArg_NoKeywords" + "PyArg_VaParse" + "PyArg_VaParseTupleAndKeywords" + "_PyArg_VaParse_SizeT" + "_PyArg_VaParseTupleAndKeywords_SizeT" + +; From python26_s.lib(getcompiler) + "Py_GetCompiler" + +; From python26_s.lib(getcopyright) + "Py_GetCopyright" + +; From python26_s.lib(getmtime) + "PyOS_GetLastModificationTime" + +; From python26_s.lib(getplatform) + "Py_GetPlatform" + +; From python26_s.lib(getversion) + "Py_GetVersion" + +; From python26_s.lib(graminit) + "_PyParser_Grammar" + +; From python26_s.lib(import) + "_PyImport_Init" + "_PyImportHooks_Init" + "PyImport_ImportModule" + "PyImport_Cleanup" + "_PyImport_FixupExtension" + "PyImport_AddModule" + "PyImport_ExecCodeModuleEx" + "PyImport_ImportFrozenModule" + "PyImport_ImportModuleEx" + "PyImport_ImportModuleLevel" + "PyImport_ReloadModule" + "PyImport_Import" +; "initimp" + "_PyImport_Fini" + "PyImport_GetMagicNumber" + "PyImport_ExecCodeModule" + "PyImport_GetModuleDict" + "_PyImport_FindModule" + "_PyImport_IsScript" + "_PyImport_ReInitLock" + "_PyImport_FindExtension" + "PyImport_AppendInittab" + "PyImport_ExtendInittab" + "PyImport_Inittab" + "_PyImport_Filetab" + +; From python26_s.lib(importdl) + "_PyImport_LoadDynamicModule" + +; From python26_s.lib(marshal) + "PyMarshal_ReadLongFromFile" + "PyMarshal_WriteObjectToString" + "PyMarshal_WriteLongToFile" + "PyMarshal_WriteObjectToFile" + "PyMarshal_ReadShortFromFile" + "PyMarshal_ReadObjectFromFile" + "PyMarshal_ReadLastObjectFromFile" + "PyMarshal_ReadObjectFromString" + "PyMarshal_Init" + +; From python26_s.lib(modsupport) + "Py_InitModule4" + "Py_BuildValue" + "_Py_BuildValue_SizeT" + "PyEval_CallFunction" + "PyEval_CallMethod" + "_Py_VaBuildValue_SizeT" + "Py_VaBuildValue" + "PyModule_AddObject" + "PyModule_AddIntConstant" + "PyModule_AddStringConstant" + "_Py_PackageContext" + +; From python26_s.lib(mysnprintf) + "PyOS_snprintf" + "PyOS_vsnprintf" + +; From python26_s.lib(mystrtoul) + "PyOS_strtoul" + "PyOS_strtol" + +; From python26_s.lib(pyarena) + "PyArena_New" + "PyArena_Free" + "PyArena_Malloc" + "PyArena_AddPyObject" + +; From python26_s.lib(pyfpe) + "PyFPE_dummy" + +; From python26_s.lib(pystate) + "PyInterpreterState_Clear" + "PyThreadState_Clear" + "_PyThread_CurrentFrames" + "PyGILState_Ensure" + "PyGILState_Release" + "PyInterpreterState_New" + "PyInterpreterState_Delete" + "PyThreadState_Delete" + "PyThreadState_New" + "PyThreadState_DeleteCurrent" + "PyThreadState_Get" + "PyThreadState_Swap" + "PyThreadState_GetDict" + "PyThreadState_SetAsyncExc" + "PyGILState_GetThisThreadState" + "PyInterpreterState_Head" + "PyInterpreterState_Next" + "PyInterpreterState_ThreadHead" + "PyThreadState_Next" + "_PyGILState_Init" + "_PyGILState_Fini" + "_PyThreadState_Current" + "_PyThreadState_GetFrame" + +; From python26_s.lib(pystrtod) + "PyOS_ascii_strtod" + "PyOS_ascii_formatd" + "PyOS_ascii_atof" + +; From python26_s.lib(pythonrun) + "Py_IgnoreEnvironmentFlag" + "Py_DebugFlag" + "Py_VerboseFlag" + "Py_NoSiteFlag" + "Py_InteractiveFlag" + "Py_FrozenFlag" + "Py_InitializeEx" + "Py_FatalError" + "Py_NewInterpreter" + "PyErr_Print" + "PyRun_InteractiveOneFlags" + "PyParser_ASTFromFile" + "PyRun_SimpleFileExFlags" + "PyRun_FileExFlags" + "Py_Exit" + "PyErr_PrintEx" + "PyErr_Display" + "Py_SetProgramName" + "Py_GetProgramName" + "Py_SetPythonHome" + "Py_GetPythonHome" + "Py_Initialize" + "Py_Finalize" + "Py_IsInitialized" + "Py_EndInterpreter" + "PyRun_AnyFileFlags" + "Py_FdIsInteractive" + "PyRun_InteractiveLoopFlags" + "PyRun_AnyFileExFlags" + "PyRun_SimpleStringFlags" + "PyRun_StringFlags" + "PyParser_ASTFromString" + "PyParser_SimpleParseStringFlags" + "PyParser_SimpleParseFileFlags" + "Py_CompileStringFlags" + "Py_SymtableString" + "Py_AtExit" + "PyOS_getsig" + "PyOS_setsig" + "PyParser_SetError" + "PyModule_GetWarningsModule" + "PyParser_SimpleParseStringFlagsFilename" + "PyParser_SimpleParseStringFilename" + "PyParser_SimpleParseFile" + "PyParser_SimpleParseString" + "PyRun_AnyFile" + "PyRun_AnyFileEx" + "PyRun_File" + "PyRun_FileEx" + "PyRun_FileFlags" + "PyRun_SimpleFile" + "PyRun_SimpleFileEx" + "PyRun_String" + "PyRun_SimpleString" + "Py_CompileString" + "PyRun_InteractiveOne" + "PyRun_InteractiveLoop" + "Py_UseClassExceptionsFlag" + "Py_UnicodeFlag" + "_Py_QnewFlag" + +; From python26_s.lib(structmember) + "PyMember_Get" + "PyMember_GetOne" + "PyMember_SetOne" + "PyMember_Set" + +; From python26_s.lib(symtable) + "PySymtable_Build" + "PySymtable_Free" + "PyST_GetScope" + "PySymtable_Lookup" + "PySTEntry_Type" + +; From python26_s.lib(sysmodule) + "_PySys_Init" + "PySys_WriteStderr" + "PySys_SetPath" + "PySys_SetArgv" + "PySys_WriteStdout" + "Py_SubversionRevision" + "Py_SubversionShortBranch" + "PySys_GetObject" + "PySys_SetObject" + "PySys_GetFile" + "PySys_ResetWarnOptions" + "PySys_AddWarnOption" + +; From python26_s.lib(traceback) + "PyTraceBack_Here" + "PyTraceBack_Print" + "PyTraceBack_Type" + +; From python26_s.lib(getopt) + "_PyOS_GetOpt" + "_PyOS_opterr" + "_PyOS_optind" + "_PyOS_optarg" + +; From python26_s.lib(dynload_shlib) + "_PyImport_DynLoadFiletab" + "_PyImport_GetDynLoadFunc" + +; From python26_s.lib(thread) + "PyThread_delete_key_value" + "PyThread_init_thread" + "PyThread_start_new_thread" + "PyThread_exit_thread" + "PyThread_get_thread_ident" + "PyThread_allocate_lock" + "PyThread_free_lock" + "PyThread_acquire_lock" + "PyThread_release_lock" + "PyThread_get_stacksize" + "PyThread_set_stacksize" + "PyThread_create_key" + "PyThread_delete_key" + "PyThread_set_key_value" + "PyThread_get_key_value" + "PyThread__exit_thread" + +; From python26_s.lib(gcmodule) +; "initgc" + "_PyObject_GC_New" + "_PyObject_GC_NewVar" + "PyGC_Collect" + "_PyObject_GC_Resize" + "_PyObject_GC_Malloc" + "PyObject_GC_Track" + "PyObject_GC_UnTrack" + "PyObject_GC_Del" + "_PyGC_Dump" + "_PyObject_GC_Track" + "_PyObject_GC_UnTrack" + "_PyObject_GC_Del" + "_PyGC_generation0" + +; From python26_s.lib(signalmodule) +; "initsignal" + "PyErr_CheckSignals" + "PyErr_SetInterrupt" + "PyOS_FiniInterrupts" + "PyOS_InterruptOccurred" + "PyOS_InitInterrupts" + "PyOS_AfterFork" + +; From python26_s.lib(posixmodule) +; "initos2" + +; From python26_s.lib(threadmodule) +; "initthread" + +; From python26_s.lib(arraymodule) +; "initarray" +; "array_methods" + +; From python26_s.lib(binascii) +; "initbinascii" + +; From python26_s.lib(cmathmodule) +; "initcmath" + +; From python26_s.lib(_codecsmodule) +; "init_codecs" + +; From python26_s.lib(collectionsmodule) +; "initcollections" + "dequeiter_type" + "dequereviter_type" + +; From python26_s.lib(cPickle) +; "initcPickle" +; "fast_save_leave" + +; From python26_s.lib(cStringIO) +; "initcStringIO" + +; From python26_s.lib(_csv) +; "init_csv" + +; From python26_s.lib(datetimemodule) +; "initdatetime" + +; From python26_s.lib(dlmodule) +; "initdl" + +; From python26_s.lib(errnomodule) +; "initerrno" + +; From python26_s.lib(fcntlmodule) +; "initfcntl" + +; From python26_s.lib(_functoolsmodule) +; "init_functools" + +; From python26_s.lib(_heapqmodule) +; "init_heapq" + +; From python26_s.lib(imageop) +; "initimageop" + +; From python26_s.lib(itertoolsmodule) +; "inititertools" + +; From python26_s.lib(_localemodule) +; "init_locale" + +; From python26_s.lib(mathmodule) +; "initmath" + +; From python26_s.lib(md5) + "md5_finish" + "md5_init" + "md5_append" + +; From python26_s.lib(md5module) +; "init_md5" + +; From python26_s.lib(operator) +; "initoperator" + +; From python26_s.lib(_randommodule) +; "init_random" + +; From python26_s.lib(rgbimgmodule) +; "initrgbimg" + +; From python26_s.lib(shamodule) +; "init_sha" + +; From python26_s.lib(sha256module) +; "init_sha256" + +; From python26_s.lib(sha512module) +; "init_sha512" + +; From python26_s.lib(_sre) +; "init_sre" + +; From python26_s.lib(stropmodule) +; "initstrop" + +; From python26_s.lib(_struct) +; "init_struct" + +; From python26_s.lib(symtablemodule) +; "init_symtable" + +; From python26_s.lib(termios) +; "inittermios" + +; From python26_s.lib(timemodule) +; "inittime" + "_PyTime_DoubleToTimet" +; "inittimezone" + +; From python26_s.lib(timingmodule) +; "inittiming" + +; From python26_s.lib(_weakref) +; "init_weakref" + +; From python26_s.lib(xxsubtype) +; "initxxsubtype" + +; From python26_s.lib(zipimport) +; "initzipimport" diff --git a/PCbuild/_bsddb.vcproj b/PCbuild/_bsddb.vcproj index 205a178..a59c703 100644 --- a/PCbuild/_bsddb.vcproj +++ b/PCbuild/_bsddb.vcproj @@ -52,7 +52,7 @@ /> Options -> Projects and Solutions -> VC++ Directories, + Platform: Win32, Show directories for: Executable files). The _bsddb subprojects depends only on the db_static project of Berkeley DB. You have to choose either "Release", "Release AMD64", "Debug" diff --git a/configure b/configure index 6ac362f..7cda668 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 60476 . +# From configure.in Revision: 60489 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.0. # @@ -1312,7 +1312,7 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universalsdk[SDKDIR] - Build agains Mac OS X 10.4u SDK (ppc/i386) + Build against Mac OS X 10.4u SDK (ppc/i386) --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework --enable-shared disable/enable building shared python library diff --git a/configure.in b/configure.in index 36c319d..082bc7c 100644 --- a/configure.in +++ b/configure.in @@ -61,7 +61,7 @@ AC_SUBST(CONFIG_ARGS) CONFIG_ARGS="$ac_configure_args" AC_ARG_ENABLE(universalsdk, - AC_HELP_STRING(--enable-universalsdk@<:@SDKDIR@:>@, Build agains Mac OS X 10.4u SDK (ppc/i386)), + AC_HELP_STRING(--enable-universalsdk@<:@SDKDIR@:>@, Build against Mac OS X 10.4u SDK (ppc/i386)), [ case $enableval in yes) diff --git a/setup.py b/setup.py index 4cae0be..8cc4b15 100644 --- a/setup.py +++ b/setup.py @@ -327,7 +327,7 @@ class PyBuildExt(build_ext): parser.add_option(arg_name, dest="dirs", action="append") options = parser.parse_args(env_val.split())[0] if options.dirs: - for directory in options.dirs: + for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr': @@ -698,10 +698,10 @@ class PyBuildExt(build_ext): for dn in inc_dirs: std_variants.append(os.path.join(dn, 'db3')) std_variants.append(os.path.join(dn, 'db4')) - for x in (0,1,2,3,4,5,6): + for x in range(max_db_ver[1]+1): std_variants.append(os.path.join(dn, "db4%d"%x)) std_variants.append(os.path.join(dn, "db4.%d"%x)) - for x in (2,3): + for x in (3,): std_variants.append(os.path.join(dn, "db3%d"%x)) std_variants.append(os.path.join(dn, "db3.%d"%x)) -- cgit v0.12