Michael Cahill
ef86c8fe24
Remove Java and Python build rules that relied on "--enable-debug". Always require junit to test the Java build, and don't turn on the "-g" flag in the Python build: we're not debugging the glue code in general.
2014-04-24 08:37:09 +10:00
Alex Gorrod
c93b75875b
Fix include paths for Java and Python builds.
...
This means that Java and Python builds work from the root
(or arbitrary) directories again.
2014-03-31 13:03:53 +11:00
Don Anderson
80404edbaf
In python, flush during callbacks to wrute to sys streams. refs #883 .
2014-03-03 13:38:43 -05:00
Michael Cahill
c6ef3c5eda
whitespace
2014-01-20 15:33:21 +11:00
Alex Gorrod
9eebe8b7ff
Fix bug in Python SWIG layer.
...
The Python interpreter can shut down threading before we are finished with
it unless an explicit lock is taken.
See:
http://stackoverflow.com/questions/12178897/swig-crashes-python
2014-01-15 22:18:30 +11:00
Keith Bostic
5b509b7220
Update copyright notices for 2014.
...
Move lang/java and lang/python into the public domain.
2014-01-07 10:30:12 -05:00
Don Anderson
67e7b1c79d
Using a closed {Cursor,Session,Connection} handle in Python
...
will not crash the VM on use. ref #485
Uses the event callback for close to give notification on close
of a handle. For explicit calls to close(), we set the SWIG 'this'
attribute on the containing object to None.
On uses of a handle as an input argument, we check to see if it is
None, or if its 'this' attribute is None, and issue the
appropriate exception.
Includes a set of test cases that parallel Java test cases for the same.
2013-12-10 13:27:09 -05:00
Michael Cahill
f23871f394
Switch log_printf to use a log record in the same format as transactional operations, update "wt printlog" to print all log record types.
...
refs #605
2013-11-21 17:26:48 +11:00
Don Anderson
ab49b06be4
Use the event handler to capture stderr, stdout.
...
Cleaned up test suite infrastructure a bit using this.
Any verbose messages from the infrastructure itself do not get captured.
refs #649
test_reconfig.py needed special treatment. Verbose output from
threads is not necessarily flushed until the connection is closed;
we reopen the connection to force the flush so that the test should
pass on all platforms.
refs #698
2013-10-24 11:08:37 -04:00
Alex Gorrod
99ee0bd6f9
Remove Python custom error and message callback implementations.
...
They cause problems with the Python test suite.
2013-08-28 10:13:26 +00:00
Alex Gorrod
22214b382c
Merge branch 'develop' into java-auto-close
2013-08-15 18:43:39 +10:00
Michael Cahill
40b371c5b4
Pass any configured Python prefix through to the Python install step.
2013-07-17 12:37:13 +10:00
Michael Cahill
1fb70757f2
Fix "make install" of Python. Remove old code and restructure the Python sources under lang/python to simplify the installation step.
...
--HG--
rename : lang/python/fpacking.py => lang/python/wiredtiger/fpacking.py
rename : lang/python/intpack-test.py => lang/python/wiredtiger/intpack-test.py
rename : lang/python/intpacking.py => lang/python/wiredtiger/intpacking.py
rename : lang/python/packing-test.py => lang/python/wiredtiger/packing-test.py
rename : lang/python/packing.py => lang/python/wiredtiger/packing.py
2013-07-17 10:13:11 +10:00
Michael Cahill
81bc53cd3f
Install the Python module as part of "make install".
2013-07-09 15:33:26 +10:00
Michael Cahill
055d692856
Suppress warnings building SWIG-generated Python code.
2013-05-08 16:28:35 +10:00
Michael Cahill
a37f94d337
Move pack/unpack methods into the extension API, because extensions shouldn't link with the WiredTiger library.
...
While in the area, make doxygen comment formatting consistent: block comments should have a blank first line.
2013-04-22 17:41:34 +10:00
Michael Cahill
9a74a794a7
Change the extension function names to "init" and "terminate" so that API changes are caught at compile time.
2013-04-19 17:11:21 +10:00
Keith Bostic
3f5f248803
Add an extension "unload" entry point, configured with "unload" and with
...
a default of wiredtiger_extension_unload.
Rename "entry" load extension entry point to be "load", rename the default
from wiredtiger_extension_init to wiredtiger_extension_load, to match.
2013-04-18 08:44:08 -04:00
Keith Bostic
ce9c3de74b
Remove WT_EXTENSION_CONFIG, export WT_CONFIG_ITEM instead.
2013-04-17 13:46:43 -04:00
Keith Bostic
08c982ad15
Replace wiredtiger_extension_api() with WT_CONNECTION.get_extension_api.
...
Pass the wiredtiger_extension_init function a (WT_CONNECTION *) instead
of a (WT_SESSION *, WT_EXTENSION_API) pair.
2013-04-17 11:02:54 -04:00
Alex Gorrod
9f32a8755c
Add implementation for close callbacks. Add event callbacks to Python.
...
This breaks the test suite - since it is playing tricks to capture a
weird output stream, due to not implementing the event callbacks.
2013-04-17 12:01:27 +10:00
Keith Bostic
9889288775
Make WiredTiger extension functions available to linked-in modules via
...
a new function wiredtiger_extension_api(WT_EXTENSION_API **pp).
Write some WT_EXTENSION_API documentation.
Remove WT_SESSION::msg_printf, add a new msg_printf extension function
instead, convert test/format to use it.
Quit using __UNUSED in the extension code, use explicit (void) casting,
it's cleaner.
2013-04-09 13:12:36 -04:00
Alex Gorrod
9094e4b2c0
Ignore warnings when building the Python SWIG wrapper.
2013-03-13 11:58:12 +11:00
Michael Cahill
6234ba40fc
Improvements for the Java API documentation: create a Java API module, link to class documentation and wiredtiger_open documentation.
2013-02-25 16:13:39 +11:00
Michael Cahill
6f4673c288
Allow examples to run in parallel: give each a unique home directory.
...
closes #426
2013-01-08 11:55:11 +11:00
Michael Cahill
bb550b2b74
Fixes for automake 1.3.x: don't use $(srcdir) in TESTS and avoid the new parallel test harness (our tests all currently expect to have exclusive access to a WT_TEST directory).
...
--HG--
rename : examples/python/run-ex_access => lang/python/run-ex_access
2013-01-07 17:43:44 +11:00
Keith Bostic
963d37a4e6
Update copyright notice to 2013.
2013-01-01 09:45:50 +00:00
Michael Cahill
c1cdc4cff9
Disable some GCC warning flags for the SWIG-generated Python code.
2012-12-10 23:08:06 +11:00
Michael Cahill
3bdf27747a
Add a "size of checkpoint" statistic.
...
Merge statistics from file and LSM sources into a "data source" statistic structure. Rename and regroup some shared stastistics. Make statistics constant names upper case. Add a helper to the Python API to lookup in a cursor in a simple expression.
closes #232
2012-11-16 21:02:27 +11:00
Michael Cahill
439f1213d6
Switch the Python API to not allocate objects explicitly, and instead leave that to SWIG typemaps.
...
This avoids making calls into Python's C API from our methods. The problem with that is that in SWIG "thread" mode, we are not holding the Python interpreter lock, and some Python functions (including allocation functions) expect to be single-threaded.
While in the area, prefer generic SWIG macros to Python-specific ones and avoid int returns that are used purely for error checking.
closes #374
2012-10-24 14:33:39 +11:00
Michael Cahill
ca6c9037fa
Cache cursor key/value formats in Python, to save a native call from every get_key/value.
2012-10-24 14:33:39 +11:00
Michael Cahill
033834a443
Turn on SWIG optimizations and warnings.
...
This doesn't appear to have any significant effect at the moment, but we may as well take advantage of them.
2012-10-24 14:33:39 +11:00
Michael Cahill
899d510f98
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
2012-10-03 18:18:43 +10:00
Michael Cahill
9803c4736a
lang/python/wiredtiger_wrap.c:5726:3: warning: expression result unused
...
; should this cast be to 'void'? [-Wunused-value]
2012-09-12 15:04:39 +10:00
Keith Bostic
0c60365433
Replace cursor.equals with cursor.compare ( #314 )
2012-09-07 17:41:26 +00:00
Michael Cahill
06e48b3b0b
Move dist/RELEASE to the top level of the tree.
...
Bump the version to 1.2.3 to check that it is updated everywhere.
--HG--
rename : dist/RELEASE => RELEASE
2012-08-02 14:23:03 +10:00
Michael Cahill
e4a08ad7f6
whitespace
2012-07-30 17:08:51 +10:00
Michael Cahill
b7c593b39b
Fix warnings in SWIG code on OS X 10.8.
2012-07-30 16:32:42 +10:00
Michael Cahill
b608c27425
Fix methods that return integer parameters from Python.
...
This includes cursor.equals and cursor.search_near.
closes #276
2012-07-30 16:05:15 +10:00
Keith Bostic
71442cc95f
Change cursor.equals to return a standard error value and store the cursor
...
equality result in a separate argument: close #274 .
Add connection.is_new to the list of methods in the SWIG file that don't
require error handling, add a connection.is_new smoke test to the test
suite.
Add a connection.get_home smoke test to the test suite.
2012-07-28 11:56:53 +00:00
Michael Cahill
fd3a1bcc34
Determine statically in SWIG how to handle errors.
...
(This change requires SWIG 2.0.x for a bug fix involving interaction between
thread mode and exceptions in SWIG).
2012-07-11 13:53:51 +10:00
Michael Cahill
c4cf6417f6
Revert change to use SWIG exception in the Python API.
...
That relied on a bug fix in swig 2.0 (SWIG bug ID 2818499),
and we don't have SWIG 2.0 available everywhere.
reverts 2fb179afbd
2012-07-10 12:28:21 +10:00
Michael Cahill
2fb179afbd
Decide statically what error handling is required.
2012-07-10 11:12:53 +10:00
Keith Bostic
80c1c05662
Change SWIG mapping to treat cursor.equals as a boolean return.
...
Change SWIG mapping to only support WT_NOTFOUND return from cursor methods
that search for keys.
2012-07-09 14:05:26 +00:00
Michael Cahill
8e0bafa05e
Add a cast to the Python API when setting a record number.
...
(Found in transaction testing, refs #183 ).
2012-05-23 21:45:14 +10:00
Michael Cahill
410e800b1e
retab the SWIG input file: whitespace was inconsistent.
2012-05-14 10:22:33 +10:00
Michael Cahill
8f941fa757
Handle errors in Python cursor._set_recno.
2012-05-14 10:02:36 +10:00
Keith Bostic
ff12749de3
The wiredtiger_struct_size() call can fail, it has to return an error
...
status, not a size.
2012-05-11 10:56:09 +00:00
Keith Bostic
5a06143447
Change wiredtiger_struct_{size,pack,unpack} to take a WT_SESSION as their
...
first argument, they're calling underlying functions that need to handle
errors in appropriate ways.
Fix some related documentation problems.
__log_record_size was calling the wrong function, fix that while I'm in
the area.
ref #209 .
2012-05-11 10:36:20 +00:00
Michael Cahill
362714a228
Move the python "check" into lang/python: that simplifies things and avoids tracking the dependency.
2012-05-04 10:39:46 +10:00