From 1158a33fab14fe0522dd5ebc753c573369652eff Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 4 Jun 2009 09:30:30 +0000 Subject: [PATCH] #3791: remove last traces of bsddb. --- Doc/library/shelve.rst | 14 +++--- Doc/library/weakref.rst | 5 +-- Lib/test/regrtest.py | 29 ++---------- Makefile.pre.in | 2 +- Misc/RPM/python-3.1.spec | 1 - Misc/valgrind-python.supp | 2 +- Modules/Setup.dist | 19 -------- PC/VS7.1/python.build | 1 - PC/VS7.1/python.iss | 3 -- PC/VS7.1/python20.wse | 18 -------- PC/VS7.1/readme.txt | 91 +------------------------------------- PC/VS8.0/pyproject.vsprops | 24 ---------- PC/os2emx/README.os2emx | 52 +++------------------- PC/os2vacpp/makefile | 14 ------ PC/os2vacpp/makefile.omk | 8 ---- PCbuild/pyproject.vsprops | 24 ---------- PCbuild/readme.txt | 9 ++-- PCbuild/vs9to8.py | 2 - 18 files changed, 26 insertions(+), 292 deletions(-) diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 6dfef68fec3..62005a46f7a 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -102,12 +102,14 @@ Restrictions .. class:: BsdDbShelf(dict[, protocol=None[, writeback=False]]) A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`next`, - :meth:`previous`, :meth:`last` and :meth:`set_location` which are available in - the :mod:`bsddb` module but not in other database modules. The *dict* object - passed to the constructor must support those methods. This is generally - accomplished by calling one of :func:`bsddb.hashopen`, :func:`bsddb.btopen` or - :func:`bsddb.rnopen`. The optional *protocol* and *writeback* parameters have - the same interpretation as for the :class:`Shelf` class. + :meth:`previous`, :meth:`last` and :meth:`set_location` which are available + in the third-party :mod:`bsddb` module from `pybsddb + `_ but not in other database + modules. The *dict* object passed to the constructor must support those + methods. This is generally accomplished by calling one of + :func:`bsddb.hashopen`, :func:`bsddb.btopen` or :func:`bsddb.rnopen`. The + optional *protocol* and *writeback* parameters have the same interpretation + as for the :class:`Shelf` class. .. class:: DbfilenameShelf(filename[, flag='c'[, protocol=None[, writeback=False]]]) diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index 3681d816ee1..0f3ebe62160 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -59,9 +59,8 @@ is exposed by the :mod:`weakref` module for the benefit of advanced uses. Not all objects can be weakly referenced; those objects which can include class instances, functions written in Python (but not in C), instance methods, sets, -frozensets, file objects, :term:`generator`\s, type objects, :class:`DBcursor` -objects from the :mod:`bsddb` module, sockets, arrays, deques, and regular -expression pattern objects. +frozensets, file objects, :term:`generator`\s, type objects, sockets, arrays, +deques, and regular expression pattern objects. Several builtin types such as :class:`list` and :class:`dict` do not directly support weak references but can add support through subclassing:: diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index e80a55e8220..e98a99aa85b 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -114,9 +114,6 @@ resources to test. Currently only the following are defined: network - It is okay to run tests that use external network resource, e.g. testing SSL support for sockets. - bsddb - It is okay to run the bsddb testsuite, which takes - a long time to complete. - decimal - Test the decimal module against a large suite that verifies compliance with standards. @@ -130,8 +127,8 @@ resources to test. Currently only the following are defined: gui - Run tests that require a running GUI. To enable all resources except one, use '-uall,-'. For -example, to run all the tests except for the bsddb tests, give the -option '-uall,-bsddb'. +example, to run all the tests except for the gui tests, give the +option '-uall,-gui'. """ import getopt @@ -182,7 +179,7 @@ if sys.platform == 'darwin': from test import support -RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb', +RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'decimal', 'compiler', 'subprocess', 'urlfetch', 'gui') @@ -900,7 +897,6 @@ _expectations = { 'win32': """ test__locale - test_bsddb3 test_crypt test_curses test_dbm @@ -937,8 +933,6 @@ _expectations = { 'mac': """ test_atexit - test_bsddb - test_bsddb3 test_bz2 test_crypt test_curses @@ -966,7 +960,6 @@ _expectations = { """, 'unixware7': """ - test_bsddb test_epoll test_largefile test_kqueue @@ -978,7 +971,6 @@ _expectations = { """, 'openunix8': """ - test_bsddb test_epoll test_largefile test_kqueue @@ -991,7 +983,6 @@ _expectations = { 'sco_sv3': """ test_asynchat - test_bsddb test_fork1 test_epoll test_gettext @@ -1012,8 +1003,6 @@ _expectations = { 'darwin': """ test__locale - test_bsddb - test_bsddb3 test_curses test_epoll test_dbm_gnu @@ -1025,7 +1014,6 @@ _expectations = { """, 'sunos5': """ - test_bsddb test_curses test_dbm test_epoll @@ -1038,7 +1026,6 @@ _expectations = { """, 'hp-ux11': """ - test_bsddb test_curses test_epoll test_dbm_gnu @@ -1068,7 +1055,6 @@ _expectations = { """, 'cygwin': """ - test_bsddb3 test_curses test_dbm test_epoll @@ -1082,7 +1068,6 @@ _expectations = { 'os2emx': """ test_audioop - test_bsddb3 test_curses test_epoll test_kqueue @@ -1096,8 +1081,6 @@ _expectations = { """, 'freebsd4': """ - test_bsddb - test_bsddb3 test_epoll test_dbm_gnu test_locale @@ -1115,8 +1098,6 @@ _expectations = { """, 'aix5': """ - test_bsddb - test_bsddb3 test_bz2 test_epoll test_dbm_gnu @@ -1132,8 +1113,6 @@ _expectations = { """, 'openbsd3': """ - test_bsddb - test_bsddb3 test_ctypes test_epoll test_dbm_gnu @@ -1149,8 +1128,6 @@ _expectations = { """, 'netbsd3': """ - test_bsddb - test_bsddb3 test_ctypes test_curses test_epoll diff --git a/Makefile.pre.in b/Makefile.pre.in index 83fa48d6d80..378707a86cb 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -840,7 +840,7 @@ LIBSUBDIRS= tkinter site-packages test test/output test/data \ email email/mime email/test email/test/data \ html json json/tests http dbm xmlrpc \ sqlite3 sqlite3/test \ - logging bsddb bsddb/test csv wsgiref urllib \ + logging csv wsgiref urllib \ lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \ diff --git a/Misc/RPM/python-3.1.spec b/Misc/RPM/python-3.1.spec index acbe38c4132..a13a080f967 100644 --- a/Misc/RPM/python-3.1.spec +++ b/Misc/RPM/python-3.1.spec @@ -360,7 +360,6 @@ rm -f mainpkg.files tools.files %{__prefix}/%{libdirname}/python%{libvers}/email/mime %{__prefix}/%{libdirname}/python%{libvers}/sqlite3 %{__prefix}/%{libdirname}/python%{libvers}/compiler -%{__prefix}/%{libdirname}/python%{libvers}/bsddb %{__prefix}/%{libdirname}/python%{libvers}/hotshot %{__prefix}/%{libdirname}/python%{libvers}/logging %{__prefix}/%{libdirname}/python%{libvers}/lib-old diff --git a/Misc/valgrind-python.supp b/Misc/valgrind-python.supp index 319e5d1957a..a66305beea8 100644 --- a/Misc/valgrind-python.supp +++ b/Misc/valgrind-python.supp @@ -5,7 +5,7 @@ # # cd python/dist/src # valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \ -# ./python -E ./Lib/test/regrtest.py -u bsddb,network +# ./python -E ./Lib/test/regrtest.py -u gui,network # # You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER # to use the preferred suppressions with Py_ADDRESS_IN_RANGE. diff --git a/Modules/Setup.dist b/Modules/Setup.dist index 5e29bc60c13..9f189deb4c0 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist @@ -324,25 +324,6 @@ _symtable symtablemodule.c #_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm -# Sleepycat Berkeley DB interface. -# -# This requires the Sleepycat DB code, see http://www.sleepycat.com/ -# The earliest supported version of that library is 3.0, the latest -# supported version is 4.0 (4.1 is specifically not supported, as that -# changes the semantics of transactional databases). A list of available -# releases can be found at -# -# http://www.sleepycat.com/update/index.html -# -# Edit the variables DB and DBLIBVERto point to the db top directory -# and the subdirectory of PORT where you built it. -#DB=/usr/local/BerkeleyDB.4.0 -#DBLIBVER=4.0 -#DBINC=$(DB)/include -#DBLIB=$(DB)/lib -#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) - - # Helper module for various ascii-encoders #binascii binascii.c diff --git a/PC/VS7.1/python.build b/PC/VS7.1/python.build index 61bbe893c81..171101d5919 100644 --- a/PC/VS7.1/python.build +++ b/PC/VS7.1/python.build @@ -12,7 +12,6 @@ - diff --git a/PC/VS7.1/python.iss b/PC/VS7.1/python.iss index 2f6c8b72712..ca6a3c0ff45 100644 --- a/PC/VS7.1/python.iss +++ b/PC/VS7.1/python.iss @@ -137,9 +137,6 @@ Source: libs\_testcapi.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Comp Source: DLLs\_tkinter.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: tk Source: libs\_tkinter.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: tk -Source: DLLs\bsddb.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main -Source: libs\bsddb.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main - Source: DLLs\mmap.pyd; DestDir: {app}\DLLs; CopyMode: alwaysoverwrite; Components: main Source: libs\mmap.lib; DestDir: {app}\libs; CopyMode: alwaysoverwrite; Components: main diff --git a/PC/VS7.1/python20.wse b/PC/VS7.1/python20.wse index 8611b8e574b..2e7f6ad3fbc 100644 --- a/PC/VS7.1/python20.wse +++ b/PC/VS7.1/python20.wse @@ -1753,11 +1753,6 @@ item: Install File Destination=%MAINDIR%\DLLs\_socket.pyd Flags=0000000000000010 end -item: Install File - Source=.\_bsddb.pyd - Destination=%MAINDIR%\DLLs\_bsddb.pyd - Flags=0000000000000010 -end item: Install File Source=.\bz2.pyd Destination=%MAINDIR%\DLLs\bz2.pyd @@ -1850,11 +1845,6 @@ item: Install File Destination=%MAINDIR%\libs\_socket.lib Flags=0000000000000010 end -item: Install File - Source=.\_bsddb.lib - Destination=%MAINDIR%\libs\_bsddb.lib - Flags=0000000000000010 -end item: Install File Source=.\bz2.lib Destination=%MAINDIR%\libs\bz2.lib @@ -1939,14 +1929,6 @@ item: Install File end item: Remark end -item: Install File - Source=..\lib\bsddb\*.py - Destination=%MAINDIR%\Lib\bsddb - Description=Berkeley database package - Flags=0000000100000010 -end -item: Remark -end item: Install File Source=..\lib\compiler\*.py Destination=%MAINDIR%\Lib\compiler diff --git a/PC/VS7.1/readme.txt b/PC/VS7.1/readme.txt index 9b78e6dad09..8fb069f1877 100644 --- a/PC/VS7.1/readme.txt +++ b/PC/VS7.1/readme.txt @@ -138,82 +138,6 @@ bz2 All of this managed to build bzip2-1.0.3\libbz2.lib, which the Python project links in. - -_bsddb - To use the version of bsddb that Python is built with by default, invoke - (in the dist directory) - - svn export http://svn.python.org/projects/external/db-4.4.20 - - - Then open a VS.NET 2003 shell, and invoke: - - devenv db-4.4.20\build_win32\Berkeley_DB.sln /build Release /project db_static - - and do that a second time for a Debug build too: - - devenv db-4.4.20\build_win32\Berkeley_DB.sln /build Debug /project db_static - - Alternatively, if you want to start with the original sources, - go to Sleepycat's download page: - http://www.sleepycat.com/downloads/releasehistorybdb.html - - and download version 4.4.20. - - With or without strong cryptography? You can choose either with or - without strong cryptography, as per the instructions below. By - default, Python is built and distributed WITHOUT strong crypto. - - Unpack the sources; if you downloaded the non-crypto version, rename - the directory from db-4.4.20.NC to db-4.4.20. - - Now apply any patches that apply to your version. - - Open - dist\db-4.4.20\docs\index.html - - and follow the "Windows->Building Berkeley DB with Visual C++ .NET" - instructions for building the Sleepycat - software. Note that Berkeley_DB.dsw is in the build_win32 subdirectory. - Build the "db_static" project, for "Release" mode. - - To run extensive tests, pass "-u bsddb" to regrtest.py. test_bsddb3.py - is then enabled. Running in verbose mode may be helpful. - - XXX The test_bsddb3 tests don't always pass, on Windows (according to - XXX me) or on Linux (according to Barry). (I had much better luck - XXX on Win2K than on Win98SE.) The common failure mode across platforms - XXX is - XXX DBAgainError: (11, 'Resource temporarily unavailable -- unable - XXX to join the environment') - XXX - XXX and it appears timing-dependent. On Win2K I also saw this once: - XXX - XXX test02_SimpleLocks (bsddb.test.test_thread.HashSimpleThreaded) ... - XXX Exception in thread reader 1: - XXX Traceback (most recent call last): - XXX File "C:\Code\python\lib\threading.py", line 411, in __bootstrap - XXX self.run() - XXX File "C:\Code\python\lib\threading.py", line 399, in run - XXX apply(self.__target, self.__args, self.__kwargs) - XXX File "C:\Code\python\lib\bsddb\test\test_thread.py", line 268, in - XXX readerThread - XXX rec = c.next() - XXX DBLockDeadlockError: (-30996, 'DB_LOCK_DEADLOCK: Locker killed - XXX to resolve a deadlock') - XXX - XXX I'm told that DBLockDeadlockError is expected at times. It - XXX doesn't cause a test to fail when it happens (exceptions in - XXX threads are invisible to unittest). - - Building for Win64: - - open a VS.NET 2003 command prompt - - run the SDK setenv.cmd script, passing /RETAIL and the target - architecture (/SRV64 for Itanium, /X64 for AMD64) - - build BerkeleyDB with the solution configuration matching the - target ("Release IA64" for Itanium, "Release AMD64" for AMD64), e.g. - devenv db-4.4.20\build_win32\Berkeley_DB.sln /build "Release AMD64" /project db_static /useenv - _sqlite3 Python wrapper for SQLite library. @@ -363,7 +287,7 @@ Setting up the environment Extension modules To build those extension modules which require external libraries - (_tkinter, bz2, _bsddb, _sqlite3, _ssl) you can follow the instructions + (_tkinter, bz2, _sqlite3, _ssl) you can follow the instructions for the Visual Studio build above, with a few minor modifications. These instructions have only been tested using the sources in the Python subversion repository - building from original sources should work, but @@ -386,19 +310,6 @@ Extension modules bz2 No changes are needed - _bsddb - The file db.build should be copied from the Python PCBuild directory - to the directory db-4.4.20\build_win32. - - The file db_static.vcproj in db-4.4.20\build_win32 should be edited to - remove the string "$(SolutionDir)" - this occurs in 2 places, only - relevant for 64-bit builds. (The edit is required as otherwise, nant - wants to read the solution file, which is not in a suitable form). - - The bsddb library can then be build with the command - nant -buildfile:db.build all - run from the db-4.4.20\build_win32 directory. - _sqlite3 No changes are needed. However, in order for the tests to succeed, a copy of sqlite3.dll must be downloaded, and placed alongside diff --git a/PC/VS8.0/pyproject.vsprops b/PC/VS8.0/pyproject.vsprops index 24ecf438520..1ba124fe993 100644 --- a/PC/VS8.0/pyproject.vsprops +++ b/PC/VS8.0/pyproject.vsprops @@ -48,30 +48,6 @@ Name="externalsDir" Value="..\..\.." /> - - - - - - - - - - - -