diff --git a/ChangeLog b/ChangeLog index 8612c5af5..e975c7308 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * fix python3 portability issue in python binding * delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE * fix NAT-PMP crash when removing a mapping at the wrong time * improve path sanitization (filter unicode text direction characters) diff --git a/bindings/python/src/boost_python.hpp b/bindings/python/src/boost_python.hpp index 12c1f3ea2..a807c9631 100644 --- a/bindings/python/src/boost_python.hpp +++ b/bindings/python/src/boost_python.hpp @@ -7,6 +7,7 @@ #include #include +#include #include #endif diff --git a/bindings/python/src/session.cpp b/bindings/python/src/session.cpp index bbddc7692..197fda47f 100644 --- a/bindings/python/src/session.cpp +++ b/bindings/python/src/session.cpp @@ -106,11 +106,10 @@ namespace void make_settings_pack(lt::settings_pack& p, dict const& sett_dict) { - list iterkeys = (list)sett_dict.keys(); - int const len = boost::python::len(iterkeys); - for (int i = 0; i < len; i++) + stl_input_iterator i(sett_dict.keys()), end; + for (; i != end; ++i) { - std::string const key = extract(iterkeys[i]); + std::string const key = *i; int sett = setting_by_name(key); if (sett < 0)