bindings: update to rust-cpython 0.4

Summary: Update to the new version of rust-cpython.  This supports `list.append`, so make use of it.

Reviewed By: xavierd

Differential Revision: D19590905

fbshipit-source-id: 03609d4f698ae8e4380e82b8144caaa205b4c2d4
This commit is contained in:
Mark Thomas 2020-01-28 10:44:31 -08:00 committed by Facebook Github Bot
parent 455fdf8461
commit 4fe02f3607
34 changed files with 39 additions and 39 deletions

View File

@ -12,7 +12,7 @@ incremental = true
lto = false
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
env_logger = "0.7"
pyblackbox = { path = "modules/pyblackbox" }
pybookmarkstore = { path = "modules/pybookmarkstore" }

View File

@ -6,4 +6,4 @@ edition = "2018"
[dependencies]
blackbox = { path = "../../../../lib/blackbox" }
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }

View File

@ -5,6 +5,6 @@ edition = "2018"
[dependencies]
bookmarkstore = { path = "../../../../lib/bookmarkstore" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
types = { path = "../../../../lib/types" }

View File

@ -7,5 +7,5 @@ edition = "2018"
clidispatch = { path = "../../../../lib/clidispatch" }
cliparser = { path = "../../../../lib/cliparser", features = ["python"] }
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
pyconfigparser = { path = "../pyconfigparser" }

View File

@ -6,5 +6,5 @@ edition = "2018"
[dependencies]
clidispatch = { path = "../../../../lib/clidispatch" }
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
hgcommands = { path = "../../../../lib/hgcommands" }

View File

@ -6,6 +6,6 @@ edition = "2018"
[dependencies]
bytes = "0.4.11"
configparser = { path = "../../../../lib/configparser" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
util = { path = "../../../../lib/util" }

View File

@ -5,6 +5,6 @@ edition = "2018"
[dependencies]
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
dag = { path = "../../../../lib/dag" }
anyhow = "1.0.20"

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies]
bytes = "0.4"
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
edenapi = { path = "../../../../lib/edenapi" }
pyrevisionstore = { path = "../pyrevisionstore" }
revisionstore = { path = "../../../../lib/revisionstore" }

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
indexedlog = { path = "../../../../lib/indexedlog" }
metalog = { path = "../../../../lib/metalog" }

View File

@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
hgtime = { path = "../../../../lib/hgtime" }

View File

@ -15,9 +15,9 @@ anyhow = "1.0.20"
thiserror = "1.0.5"
[dependencies.cpython]
version = "0.3"
version = "0.4"
default-features = false
features = ["python27-sys"]
[dependencies.python27-sys]
version = "0.3"
version = "0.4"

View File

@ -5,5 +5,5 @@ edition = "2018"
[dependencies]
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
lz4-pyframe = { path = "../../../../lib/lz4-pyframe" }

View File

@ -7,7 +7,7 @@ edition = "2018"
anyhow = "1.0.20"
bytes = { version = "0.4.11" }
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
manifest = { path = "../../../../lib/manifest" }
manifest-tree = { path = "../../../../lib/manifest-tree" }
pathmatcher = { path = "../../../../lib/pathmatcher" }

View File

@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
metalog = { path = "../../../../lib/metalog" }

View File

@ -7,7 +7,7 @@ edition = "2018"
anyhow = "1.0.20"
byteorder = "1.2.7"
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
mutationstore = { path = "../../../../lib/mutationstore" }
thiserror = "1.0.5"
types = { path = "../../../../lib/types" }

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
nodemap = { path = "../../../../lib/nodemap" }
types = { path = "../../../../lib/types" }

View File

@ -5,7 +5,7 @@ edition = "2018"
[dependencies]
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
encoding = { path = "../../../../lib/encoding" }
pathmatcher = { path = "../../../../lib/pathmatcher" }
types = { path = "../../../../lib/types" }

View File

@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
renderdag = { path = "../../../../lib/renderdag" }
parking_lot = "0.9"

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0.20"
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
parking_lot = "0.9.0"
pyconfigparser = { path = "../pyconfigparser" }
revisionstore = { path = "../../../../lib/revisionstore" }

View File

@ -136,7 +136,7 @@ impl<T: DataStore + ?Sized> DataStorePyExt for T {
let results = PyList::new(py, &[]);
for key in missing {
let key_tuple = from_key_to_tuple(py, &key);
results.insert_item(py, results.len(py), key_tuple.into_object());
results.append(py, key_tuple.into_object());
}
Ok(results)

View File

@ -59,7 +59,7 @@ impl<T: HistoryStore + ?Sized> HistoryStorePyExt for T {
let results = PyList::new(py, &[]);
for key in missing {
let key_tuple = from_key_to_tuple(py, &key);
results.insert_item(py, results.len(py), key_tuple.into_object());
results.append(py, key_tuple.into_object());
}
Ok(results)

View File

@ -175,7 +175,7 @@ impl LocalStore for PythonDataStore {
let py_missing = PyList::new(py, &[]);
for key in keys.iter() {
let py_key = from_key_to_tuple(py, &key);
py_missing.insert_item(py, py_missing.len(py), py_key.into_object());
py_missing.append(py, py_key.into_object());
}
let py_missing = self

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
dag = { path = "../../../../lib/dag" }
pydag = { path = "../pydag" }

View File

@ -4,5 +4,5 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
stackdesc = { path = "../../../../lib/stackdesc/" }

View File

@ -9,9 +9,9 @@ lto = "thin"
[dependencies]
[dependencies.cpython]
version = "0.3"
version = "0.4"
default-features = false
features = ["python27-sys"]
[dependencies.python27-sys]
version = "0.3"
version = "0.4"

View File

@ -10,11 +10,11 @@ python3 = []
[dependencies]
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
lazy_static = "1"
mincode = { path = "../../../../lib/mincode" }
parking_lot = "0.9"
python27-sys = "0.3"
python27-sys = "0.4"
serde_json = "1"
tracing = "0.1"
tracing-collector = { path = "../../../../lib/tracing-collector" }

View File

@ -6,5 +6,5 @@ edition = "2018"
[dependencies]
anyhow = "1.0.20"
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
treestate = { path = "../../../../lib/treestate" }

View File

@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
vlqencoding = { path = "../../../../lib/vlqencoding" }

View File

@ -5,7 +5,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0.20"
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
encoding = { path = "../../../../lib/encoding" }
pathmatcher = { path = "../../../../lib/pathmatcher" }

View File

@ -5,6 +5,6 @@ edition = "2018"
[dependencies]
cpython-ext = { path = "../../../../lib/cpython-ext" }
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
zstd = "0.4.18"
zstdelta = { path = "../../../../lib/zstdelta/" }

View File

@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2018"
[dependencies]
cpython = { version = "0.3", features = ["python27-sys"], default-features = false }
cpython = { version = "0.4", features = ["python27-sys"], default-features = false }
cpython-ext = { path = "../../../../lib/cpython-ext" }
zstore = { path = "../../../../lib/zstore" }

View File

@ -12,7 +12,7 @@ cpython-ext = { path = "../cpython-ext", optional = true }
thiserror = "1.0.5"
[dependencies.cpython]
version = "0.3"
version = "0.4"
default-features = false
features = ["python27-sys"]
optional = true

View File

@ -17,9 +17,9 @@ parking_lot = "0.9"
serde = "1"
[dependencies.cpython]
version = "0.3"
version = "0.4"
default-features = false
features = ["python27-sys"]
[dependencies.python27-sys]
version = "0.3"
version = "0.4"

View File

@ -36,9 +36,9 @@ zstd = "0.4"
path = "../encoding"
[dependencies.cpython]
version = "0.3"
version = "0.4"
default-features = false
features = ["python27-sys"]
[dependencies.python27-sys]
version = "0.3"
version = "0.4"