Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
Upstream has released a new stable release of pyosmium fixing important bugs which I'd like to propose for inclusion in the next stable update. Kind Regards, Bas
diff -Nru pyosmium-2.11.1/CHANGELOG.md pyosmium-2.11.3/CHANGELOG.md --- pyosmium-2.11.1/CHANGELOG.md 2017-05-04 23:36:03.000000000 +0200 +++ pyosmium-2.11.3/CHANGELOG.md 2017-08-20 11:18:52.000000000 +0200 @@ -12,6 +12,27 @@ ### Fixed +## [2.11.3] - 2017-08-20 + +### Added + +### Changed + +- updated to latest libosmium 2.11 bugfix release + +### Fixed + +- handler functions not called when using Reader instead of file + +## [2.11.2] - 2017-05-25 + +### Added + +### Changed + +### Fixed + +- handler functions not called when using replication service (#38) ## [2.11.1] - 2017-05-04 diff -Nru pyosmium-2.11.1/debian/changelog pyosmium-2.11.3/debian/changelog --- pyosmium-2.11.1/debian/changelog 2017-05-05 09:51:21.000000000 +0200 +++ pyosmium-2.11.3/debian/changelog 2017-08-26 15:10:04.000000000 +0200 @@ -1,3 +1,11 @@ +pyosmium (2.11.3-1) stretch; urgency=medium + + * New upstream bugfix release. + - handler functions not called when using replication service (#38) + - handler functions not called when using Reader instead of file + + -- Bas Couwenberg <sebas...@debian.org> Sat, 26 Aug 2017 15:10:04 +0200 + pyosmium (2.11.1-1) unstable; urgency=medium * New upstream bugfix release. diff -Nru pyosmium-2.11.1/lib/generic_handler.hpp pyosmium-2.11.3/lib/generic_handler.hpp --- pyosmium-2.11.1/lib/generic_handler.hpp 2017-05-04 23:36:03.000000000 +0200 +++ pyosmium-2.11.3/lib/generic_handler.hpp 2017-08-20 11:18:52.000000000 +0200 @@ -25,6 +25,7 @@ }; public: +virtual void apply_start() {}; // handler functions virtual void node(const osmium::Node&) const = 0; virtual void way(const osmium::Way&) const = 0; @@ -163,14 +164,7 @@ apply_object(osmium::io::File(cbuf, len, cfmt), locations, idx); } -private: - void apply_object(osmium::io::File file, bool locations, const std::string &idx) - { - osmium::osm_entity_bits::type entities = osmium::osm_entity_bits::nothing; - BaseHandler::pre_handler handler = locations? - BaseHandler::location_handler - :BaseHandler::no_handler; - + void apply_start() override { m_callbacks = osmium::osm_entity_bits::nothing; if (hasfunc("node")) m_callbacks |= osmium::osm_entity_bits::node; @@ -182,6 +176,18 @@ m_callbacks |= osmium::osm_entity_bits::area; if (hasfunc("changeset")) m_callbacks |= osmium::osm_entity_bits::changeset; + } + + +private: + void apply_object(osmium::io::File file, bool locations, const std::string &idx) + { + osmium::osm_entity_bits::type entities = osmium::osm_entity_bits::nothing; + BaseHandler::pre_handler handler = locations? + BaseHandler::location_handler + :BaseHandler::no_handler; + + apply_start(); if (m_callbacks & osmium::osm_entity_bits::area) { @@ -202,6 +208,7 @@ apply(file, entities, handler, idx); } + bool hasfunc(char const *name) { reference_existing_object::apply<SimpleHandlerWrap*>::type converter; PyObject* obj = converter( this ); diff -Nru pyosmium-2.11.1/lib/merged_input.hpp pyosmium-2.11.3/lib/merged_input.hpp --- pyosmium-2.11.1/lib/merged_input.hpp 2017-05-04 23:36:03.000000000 +0200 +++ pyosmium-2.11.3/lib/merged_input.hpp 2017-08-20 11:18:52.000000000 +0200 @@ -16,6 +16,7 @@ class MergeInputReader { public: void apply(BaseHandler& handler, bool simplify = true) { + handler.apply_start(); if (simplify) { objects.sort(osmium::object_order_type_id_reverse_version()); osmium::item_type prev_type = osmium::item_type::undefined; diff -Nru pyosmium-2.11.1/lib/osmium.cc pyosmium-2.11.3/lib/osmium.cc --- pyosmium-2.11.1/lib/osmium.cc 2017-05-04 23:36:03.000000000 +0200 +++ pyosmium-2.11.3/lib/osmium.cc 2017-08-20 11:18:52.000000000 +0200 @@ -13,11 +13,17 @@ osmium::apply(rd, h); } +template <> +void apply_reader_simple(osmium::io::Reader &rd, BaseHandler &h) { + h.apply_start(); + osmium::apply(rd, h); +} template <typename T> void apply_reader_simple_with_location(osmium::io::Reader &rd, osmium::handler::NodeLocationsForWays<T> &l, BaseHandler &h) { + h.apply_start(); osmium::apply(rd, l, h); } diff -Nru pyosmium-2.11.1/osmium/version.py pyosmium-2.11.3/osmium/version.py --- pyosmium-2.11.1/osmium/version.py 2017-05-04 23:36:03.000000000 +0200 +++ pyosmium-2.11.3/osmium/version.py 2017-08-20 11:18:52.000000000 +0200 @@ -5,7 +5,7 @@ # the major version pyosmium_major = '2.11' # current release (Pip version) -pyosmium_release = '2.11.1' +pyosmium_release = '2.11.3' # libosmium version shipped with the Pip release -libosmium_version = '2.11.3' +libosmium_version = '2.11.4'