Alex Miller
40b290b7de
If `func` throws, then `ret` will never be assigned, and accessed later.
...
Thus we now initiailize it with None so that it will always have a
value.
2019-06-27 18:57:58 -07:00
Jingyu Zhou
16765c6b67
Fix a comment
2019-06-20 20:52:29 -07:00
Jingyu Zhou
77d5932465
Add a transaction size limit test
2019-06-20 14:14:09 -07:00
Jingyu Zhou
9c2257a0e5
Add transaction size option
2019-06-19 07:45:23 -07:00
Alex Miller
4098eb721e
Upon reflection, I think this test was doing nothing.
2019-06-19 02:35:07 -07:00
Alex Miller
e8f994965d
python: Post-API Version 620, @fdb.transactional on a generator will throw.
...
Previously, writing code like
@fdb.transactional
def foo(tr):
yield tr.get('a')
yield tr.get('b')
print(foo(db))
was accepted by the python bindings, but had surprising semantics. The
function returned by @fdb.transactional opens a transaction, runs foo(),
commits the transaction, and then returns the generator returned by foo().
This generator then uses the committed transaction. This worked before API
version 410 (FDB 4.1), and hasn't worked since. This will also be a problem if
a closure is returned from foo() that contains `tr`, but it's much harder to
check that in Python.
Rather than allow users to hit an unexpected and mysterious "Operation issued
while a commit was outstanding" exception, it's nicer to explicitly highlight
this problem as soon as we can. Unfortunately, we have no way to know that a
function will return a generator until we call it, so that's the soonest we can
give a more informative error.
2019-06-19 01:38:35 -07:00
Chris Donati
156962e5bf
Fix Versionstamp encoding issue for Value objects
...
Python's struct.pack does not accept Value objects.
2019-04-02 13:49:58 -07:00
Chris Donati
2d4d219ef2
Improve Python KeySelector representation
...
Python 2 resolves escape characters when printing byte strings,
which doesn't seem useful in this context.
I replaced __str__ since it defaults to __repr__ and the change
should be suitable for both cases.
2019-04-01 09:18:01 -07:00
Alec Grieser
63f23c0818
add tests for new database behavior to python scripted tests
...
This also fixes the behavior for the tests of the options which are no longer reset when on_error is called.
2019-03-22 15:10:08 -04:00
Alec Grieser
e6e2ea2af6
Merge remote-tracking branch 'upstream/master' into 00775-database-level-tr-options
2019-03-22 14:41:27 -04:00
Alec Grieser
5e8e2ef2a6
rename the function where it is defined as well as where it is called
2019-03-22 13:26:41 -04:00
Alec Grieser
9e15872418
remove test that is now extraneous
2019-03-22 13:20:00 -04:00
A.J. Beamon
001fde718c
fix comments to mark things that throw as throwing rather than not throwing
...
Co-Authored-By: alecgrieser <alloc@apple.com>
2019-03-22 13:04:11 -04:00
Alec Grieser
4ac3e790ad
modify the reset and timeout option unit tests to handle new on_error cancellation behavior
2019-03-22 12:45:59 -04:00
Alec Grieser
4fff1f6756
add database options to bindingtester stack tester
2019-03-20 11:13:38 -06:00
Jingyu Zhou
1f39da06de
Merge pull request #1268 from jzhou77/cmake_fix
...
Create tar.gz file for python package
2019-03-11 22:48:16 -07:00
A.J. Beamon
083a73b0d2
In our binding testers, stop using the TRANSACTION_LOGGING_ENABLE option and switch to the DEBUG_TRANSACTION_IDENTIFIER and LOG_TRANSACTION options
2019-03-11 13:35:43 -07:00
Jingyu Zhou
314e87edfb
Create tar.gz file for python package
...
On Windows, the default package format can be zip, while tar.gz is expected.
2019-03-11 11:10:40 -07:00
A.J. Beamon
8669aea22b
Python: creating a SingleFloat with an integer didn't work. Updated the tester to exercise this path.
2019-03-01 09:25:53 -08:00
mpilman
ddddda7328
docker-compose can now build rpm
...
weirdly it still generates a foundationd-unspecified
rpm. However, it is empty and can be ignored for now
2019-02-15 00:01:42 -08:00
mpilman
9b7dcc4ed5
flow, python, and go bindings
2019-02-15 00:01:42 -08:00
mpilman
44cb835ffe
build python sdist
2019-02-15 00:01:42 -08:00
A.J. Beamon
32b3c2ad69
Add comment for the code where we replace the semaphore in the exception handler
2019-02-11 10:35:29 -08:00
A.J. Beamon
5bf7e72fc5
If the semaphore acquire is interrupted (e.g. by a signal), then replace it with a new one so that subsequent futures will still work.
2019-02-11 10:22:19 -08:00
A.J. Beamon
8960670694
Python now blocks on a future in Python rather than in native code to preserve Python's signal handling functionality. In particular, this means that ctrl-c will work in the REPL.
2019-02-08 13:51:01 -08:00
A.J. Beamon
093f4d9b83
Merge pull request #1091 from ajbeamon/fix-python-onready
...
Python: _CBFUNC should be defined outside init_c_api
2019-02-08 11:26:51 -08:00
mpilman
e45295a1f5
Added support for TLS
2019-02-07 15:37:04 -08:00
mpilman
8a94d80deb
fdbservice and fdbrpc now compiling
2019-02-07 15:37:04 -08:00
mpilman
7a858b902d
Most of FDB compiling on Windows with cmake
2019-02-07 15:37:04 -08:00
A.J. Beamon
ec995ebef0
_CBFUNC should be defined outside init_c_api, both because it doesn't depend on the C API and because it is used elsewhere and wasn't available globally as previously written
2019-01-25 11:32:49 -08:00
Alec Grieser
04b94e74c7
Merge pull request #942 from ajbeamon/remove-cluster-from-bindings
...
Remove cluster from bindings
2019-01-24 14:39:09 -08:00
Andrew Noyes
4bca5dad73
Fix _bit_length for 0 and negative numbers
2019-01-22 10:09:58 -08:00
Andrew Noyes
5a6f82a75b
bit_length python 2.6 compat
2019-01-22 10:09:03 -08:00
A.J. Beamon
401f8a6774
Python and Ruby bindings displayed an unhelpful error if trying to load an old incompatible fdb_c with a new binding.
2019-01-14 10:41:54 -08:00
A.J. Beamon
bfa97d7ff2
Address review comments
2019-01-10 12:28:14 -08:00
A.J. Beamon
11cce3731b
Merge branch 'master' into remove-cluster-from-bindings
...
# Conflicts:
# bindings/c/fdb_c.cpp
2019-01-10 11:58:34 -08:00
Markus Pilman
df0f491c29
Some more improvements to the build and preparations for packaging
2018-12-13 15:04:13 -08:00
Markus Pilman
f8eac70700
Fixed C bindings DLLEXPORT and Java bindings
2018-12-13 14:59:36 -08:00
A.J. Beamon
890a0f3e82
Merge branch 'master' into remove-cluster-from-bindings
...
# Conflicts:
# bindings/flow/fdb_flow.actor.cpp
2018-11-26 12:01:03 -08:00
Ofek Lev
4bd9efc4fc
Update vendored Python module six
2018-10-25 23:46:49 -04:00
Evan Tschannen
2f4e7fad48
Merge branch 'master' of github.com:apple/foundationdb
2018-10-15 18:39:46 -07:00
A.J. Beamon
a2630a68a6
We can't use async as a variable name in python 3.7 because it's now a keyword. Support gevent's new 'async_' name.
2018-10-09 09:51:04 -07:00
A.J. Beamon
d5357d2439
Update all of the bindings to use the new C API and deprecate or remove unneeded parts of their APIs.
2018-10-02 15:28:46 -07:00
A.J. Beamon
983a5bd390
Bump API version to 610
2018-09-26 10:58:07 -07:00
Bhaskar Muppana
5e954a8d57
Merge remote-tracking branch 'upstream/release-5.2' into release-6.0
2018-09-06 13:29:31 -07:00
AlvinMooreSr
f4b3299e23
Merge pull request #601 from AlvinMooreSr/python-setup
...
Changed python binding classifier
2018-09-04 12:57:02 -07:00
Alvin Moore
bc1098d889
Changed python binding classifier to that on approved list: https://pypi.org/pypi?%3Aaction=list_classifiers
2018-07-13 07:58:08 -07:00
Alec Grieser
46b8612566
bump API version from 520 to 600
2018-07-09 11:00:57 -07:00
A.J. Beamon
ea8a288a20
Merge pull request #537 from apple/release-5.2
...
Merge Release-5.2 into master
2018-06-27 15:55:58 -07:00
Jay Kominek
fb33412b3a
use inspect.getfullargspec when available
...
getargspec was deprecated in python3, this should use
getfullargspec when available, and degrade gracefully
otherwise.
2018-06-08 01:07:18 -06:00
A.J. Beamon
026458baf3
Merge release-5.2 into master
2018-05-23 15:32:56 -07:00
A.J. Beamon
5db549c203
Changes to print output
2018-05-18 16:24:03 -07:00
Alec Grieser
a3e52424da
actually pass along new versionstamp position in nested versionstamp
...
addresses #356
2018-05-10 16:11:42 -07:00
Alec Grieser
47c9e4f923
update bindings and bindingtester that uses versionstamps to use new protocol
...
issue #148
2018-05-08 08:57:09 -07:00
Alec Grieser
6ee14bbb93
expose second versionstamp value type through vexillographer and add support in bindings and bindingtester
2018-05-08 08:57:09 -07:00
A.J. Beamon
d5f69ff596
Merge pull request #296 from apple/release-5.1
...
Merge Release 5.1 Into Release 5.2
2018-05-03 12:05:35 -07:00
John Brownlee
1739c82c1b
Fixes the links to download the client libraries in our documentation and packages.
2018-05-01 16:10:51 -07:00
Alec Grieser
a1faaafca3
Merge remote-tracking branch 'upstream/release-5.1' into merge-release-5.1
2018-04-27 16:38:18 -07:00
Evan Tschannen
9060e6d82b
merged in 5.1
2018-04-27 16:13:35 -07:00
Evan Tschannen
d67b0e7d54
removed binding tester references to dev_null_is_web_scale
2018-04-26 14:36:17 -07:00
Vince Polsinelli
a52e8b8f3c
Fixed broken links to documentation
2018-04-19 11:45:24 -07:00
Alec Grieser
b18f6200db
remove references to read_ahead_disable transaction option in bindings tests
2018-04-11 11:43:01 -07:00
A.J. Beamon
e2d3afb621
Merge branch 'release-5.1' into merge-release-5.1-into-release-5.2
...
# Conflicts:
# Makefile
# documentation/sphinx/Makefile
# documentation/sphinx/source/administration.rst
# documentation/sphinx/source/anti-features.rst
# documentation/sphinx/source/api-general.rst
# documentation/sphinx/source/building-cluster.rst
# documentation/sphinx/source/class-scheduling-go.rst
# documentation/sphinx/source/class-scheduling-java.rst
# documentation/sphinx/source/class-scheduling-ruby.rst
# documentation/sphinx/source/class-scheduling.rst
# documentation/sphinx/source/command-line-interface.rst
# documentation/sphinx/source/configuration.rst
# documentation/sphinx/source/downloads.rst
# documentation/sphinx/source/fault-tolerance.rst
# documentation/sphinx/source/features.rst
# documentation/sphinx/source/getting-started-linux.rst
# documentation/sphinx/source/getting-started-mac.rst
# documentation/sphinx/source/guide-common.rst.inc
# documentation/sphinx/source/hierarchical-documents-java.rst
# documentation/sphinx/source/index.rst
# documentation/sphinx/source/known-limitations.rst
# documentation/sphinx/source/multimaps-java.rst
# documentation/sphinx/source/performance.rst
# documentation/sphinx/source/segmented-range-reads-java.rst
# documentation/sphinx/source/simple-indexes-java.rst
# documentation/sphinx/source/spatial-indexing-java.rst
# documentation/sphinx/source/subspace-indirection-java.rst
# documentation/sphinx/source/tables-java.rst
# documentation/sphinx/source/vector-java.rst
# versions.target
2018-03-21 09:28:10 -07:00
A.J. Beamon
af738e0f45
Fix Python3 directory layer bug where str() was used instead of bytes(). Fix bug in binding tester that caused directory tests to not compare results, which resulted in the directory layer bug going undetected.
2018-03-19 15:47:56 -07:00
John Brownlee
91fa01a5a6
Updates URLs and email addresses in documentation and package config.
2018-03-15 16:30:29 -07:00
Alec Grieser
8dc05b3d81
added methods to (1) determine if an API version has been selected and (2) get it in flow, go, java, python, and ruby bindings
...
rdar://problem/33838833
2018-03-14 12:26:00 -07:00
Alec Grieser
285e1a1ccc
bump API version to 520
2018-03-02 10:30:41 -08:00
Alec Grieser
0bae9880f1
remove trailing whitespace from our copyright headers ; fixed formatting of python setup.py
2018-02-21 10:25:11 -08:00
Alec Grieser
e104c21160
tweaks to fix some places where python format rewrite looked kind of bad
2018-02-07 16:59:59 -08:00
Alec Grieser
899cb63952
added style check guard to python build
2018-01-26 13:13:15 -08:00
Alec Grieser
9b6cd8e11f
added python code style options
2018-01-25 09:48:29 -08:00
Alec Grieser
57986cfe00
format python files to be roughtly pep8 compliant
2018-01-24 19:06:58 -08:00
A.J. Beamon
d174e05bac
Merge pull request #180 from cie/bindings-versionstamps-in-tuples
...
<rdar://problem/25560444> [Feature] Versionstamped keys and tuple/directory incompatibility
2017-11-06 16:39:17 -08:00
Alec Grieser
396434794d
some python versionstamp api tweaks
2017-11-06 14:56:41 -08:00
Evan Tschannen
93be673e20
Merge pull request #192 from cie/bindingtester-ro-lock-aware-option
...
<rdar://problem/34579176> Transaction option for read-only lock aware
2017-10-27 17:19:40 -07:00
Alec Grieser
5cc4328602
Merge remote-tracking branch 'origin/master' into bindings-versionstamps-in-tuples
2017-10-26 08:58:09 -07:00
Alec Grieser
8cad278da1
add set_read_lock_aware to atomic ops unit tests in binding tester
2017-10-25 15:14:18 -07:00
Alec Grieser
deb48641e3
use a constant instead of 12 ; some better comments ; remove prefix_len weirdness
2017-10-24 16:40:58 -07:00
Alec Grieser
c12c928141
Merge branch 'master' into bindings-versionstamps-in-tuples
2017-10-18 14:13:01 -07:00
Alec Grieser
2722e6d99e
added a helper method to fdb.Subspace and updated some docs
2017-10-11 14:48:09 -07:00
Balachandar Namasivayam
8e0bea2795
Update API_VERSION from 500 to 510
2017-10-11 13:49:38 -07:00
Alec Grieser
5e44aa06e4
python tester now sometimes uses has_incomplete_versionstamp
2017-10-11 11:00:16 -07:00
Alec Grieser
fc97fa3c8d
added documentation for versionstamped tuples to python docs
2017-10-10 09:12:42 -07:00
Alec Grieser
a9cc7af79e
added versionstamps to java tuples
2017-10-09 11:07:34 -07:00
Evan Tschannen
ef41b07bb3
renamed past_version to transaction_too_old
...
implemented read_lock_aware option
2017-09-28 16:35:08 -07:00
Alec Grieser
bd6dabacdb
added versionstamp type to python tuple layer and updated bindingtester to test it
2017-09-28 12:03:40 -07:00
A.J. Beamon
fc468f682b
Merge branch 'release-5.0' into bindings-tuple-improvements
...
# Conflicts:
# bindings/java/src-completable/main/com/apple/apple/foundationdbdb/tuple/Tuple.java
2017-05-26 12:33:33 -07:00
FDB Dev Team
a674cb4ef4
Initial repository commit
2017-05-25 13:48:44 -07:00