mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 23:22:02 +03:00
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:
parent
455fdf8461
commit
4fe02f3607
@ -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" }
|
||||
|
@ -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 }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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"
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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"
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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"
|
||||
|
@ -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" }
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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" }
|
||||
|
@ -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/" }
|
||||
|
@ -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"
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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" }
|
||||
|
@ -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/" }
|
||||
|
@ -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" }
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user