diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 66b49d7fd2c..bcffc9083fc 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -192,6 +192,7 @@ jobs: run: | cd bindings/python b2 -j2 stage_module stage_dependencies + b2 -j2 deprecated-functions=off - name: run python tests run: | diff --git a/bindings/python/src/create_torrent.cpp b/bindings/python/src/create_torrent.cpp index ef07cd24e42..8abb266a7db 100644 --- a/bindings/python/src/create_torrent.cpp +++ b/bindings/python/src/create_torrent.cpp @@ -209,7 +209,9 @@ void bind_create_torrent() .def("set_file_hash", &set_file_hash) #endif .def("add_url_seed", &create_torrent::add_url_seed) +#if TORRENT_ABI_VERSION < 4 .def("add_http_seed", &create_torrent::add_http_seed) +#endif .def("add_node", &add_node) .def("add_tracker", add_tracker, (arg("announce_url"), arg("tier") = 0)) .def("set_priv", &create_torrent::set_priv) diff --git a/bindings/python/src/session.cpp b/bindings/python/src/session.cpp index 025dfc71889..92f11e332f4 100644 --- a/bindings/python/src/session.cpp +++ b/bindings/python/src/session.cpp @@ -309,12 +309,14 @@ namespace p.url_seeds = extract>(value); continue; } +#if TORRENT_ABI_VERSION < 4 else if(key == "http_seeds") { p.http_seeds = extract(value); continue; } +#endif else if(key == "dht_nodes") { p.dht_nodes = @@ -831,7 +833,9 @@ void bind_session() .def_readwrite("info_hash", &add_torrent_params::info_hash) #endif .def_readwrite("info_hashes", &add_torrent_params::info_hashes) +#if TORRENT_ABI_VERSION < 4 .add_property("http_seeds", PROP(&add_torrent_params::http_seeds)) +#endif .add_property("url_seeds", PROP(&add_torrent_params::url_seeds)) .add_property("peers", PROP(&add_torrent_params::peers)) .add_property("banned_peers", PROP(&add_torrent_params::banned_peers)) diff --git a/bindings/python/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index 31bbd30e5fa..487a2fb5b42 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -42,6 +42,7 @@ namespace return ret; } +#if TORRENT_ABI_VERSION < 4 list http_seeds(torrent_handle& handle) { list ret; @@ -56,6 +57,7 @@ namespace ret.append(*i); return ret; } +#endif list piece_availability(torrent_handle& handle) { @@ -491,9 +493,11 @@ void bind_torrent_handle() .def("add_url_seed", _(&torrent_handle::add_url_seed)) .def("remove_url_seed", _(&torrent_handle::remove_url_seed)) .def("url_seeds", url_seeds) +#if TORRENT_ABI_VERSION < 4 .def("add_http_seed", _(&torrent_handle::add_http_seed)) .def("remove_http_seed", _(&torrent_handle::remove_http_seed)) .def("http_seeds", http_seeds) +#endif .def("torrent_file", _(&torrent_handle::torrent_file)) .def("set_metadata", set_metadata) .def("is_valid", _(&torrent_handle::is_valid)) diff --git a/bindings/python/src/torrent_info.cpp b/bindings/python/src/torrent_info.cpp index f19455fd54f..4e0610476b5 100644 --- a/bindings/python/src/torrent_info.cpp +++ b/bindings/python/src/torrent_info.cpp @@ -324,7 +324,9 @@ void bind_torrent_info() .def("add_tracker", (add_tracker1)&torrent_info::add_tracker, arg("url"), arg("tier") = 0, arg("source") = announce_entry::source_client) .def("add_url_seed", &torrent_info::add_url_seed) +#if TORRENT_ABI_VERSION < 4 .def("add_http_seed", &torrent_info::add_http_seed) +#endif .def("web_seeds", get_web_seeds) .def("set_web_seeds", set_web_seeds)