[pyosmium] 01/04: Imported Upstream version 2.12.3

Bas Couwenberg sebastic at debian.org
Fri May 26 20:38:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository pyosmium.

commit 3ccb706ac1bd1e016542e3679d797fb2af79cf86
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri May 26 22:17:20 2017 +0200

    Imported Upstream version 2.12.3
---
 CHANGELOG.md               | 16 +++++++++++++++-
 README.md                  |  9 ++++++++-
 README.rst                 | 10 ++++++++--
 lib/generic_handler.hpp    | 25 ++++++++++++++++---------
 lib/merged_input.hpp       |  1 +
 lib/osmium.cc              |  5 +++++
 src/osmium/version.py      |  2 +-
 tools/pyosmium-get-changes |  4 ++--
 8 files changed, 56 insertions(+), 16 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f66df3..5833572 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,19 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Fixed
 
+## [2.12.3] - 2017-05-25
+
+### Added
+
+- links to appropriate mailing lists and issue trackers
+
+### Changed
+
+### Fixed
+
+- handler functions not called when using replication service (#38)
+- pyosmium-get-updates: bad variable name
+
 ## [2.12.2] - 2017-05-04
 
 ### Added
@@ -177,7 +190,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 
 - Exception not caught in test.
 
-[unreleased]: https://github.com/osmcode/pyosmium/compare/v2.12.2...HEAD
+[unreleased]: https://github.com/osmcode/pyosmium/compare/v2.12.3...HEAD
+[2.12.3]: https://github.com/osmcode/pyosmium/compare/v2.12.2...v2.12.3
 [2.12.2]: https://github.com/osmcode/pyosmium/compare/v2.12.1...v2.12.2
 [2.12.1]: https://github.com/osmcode/pyosmium/compare/v2.12.0...v2.12.1
 [2.12.0]: https://github.com/osmcode/pyosmium/compare/v2.11.0...v2.12.0
diff --git a/README.md b/README.md
index 892ccda..2a56bb6 100644
--- a/README.md
+++ b/README.md
@@ -86,12 +86,19 @@ For building the man pages for the tools run:
     cd doc
     make man
 
+## Bugs and Questions
+
+If you find bugs or have feature requests, please report those in the
+[github issue tracker](https://github.com/osmcode/pyosmium/issues/).
+
+For general questions about using pyosmium you can use the
+[OSM development mailing list](https://lists.openstreetmap.org/listinfo/dev)
+or ask on [OSM help](https://help.openstreetmap.org/).
 
 ## License
 
 Pyosmium is available under the BSD 2-Clause License. See LICENSE.TXT.
 
-
 ## Authors
 
 Sarah Hoffmann (lonvia at denofr.de)
diff --git a/README.rst b/README.rst
index b45db7e..26171ea 100644
--- a/README.rst
+++ b/README.rst
@@ -35,7 +35,14 @@ Documentation
 The documentation for the latest release is available at
 `osmcode.org`_.
 
+If you find bugs or have feature requests, please report those in the
+`Github issue tracker`_. For general questions about using pyosmium you
+can contanct the `OSM development mailing list`_ or ask on `OSM help`_.
+
 .. _osmcode.org: http://docs.osmcode.org/pyosmium/latest
+.. _Github issue tracker: https://github.com/osmcode/pyosmium/issues/
+.. _OSM development mailing list: https://lists.openstreetmap.org/listinfo/dev
+.. _OSM help: https://help.openstreetmap.org/
 
 Examples
 ========
@@ -49,7 +56,6 @@ Fineprint
 
 Pyosmium is available under the BSD 2-Clause License. See LICENSE.TXT.
 
-The source code can be found on `GitHub`_. There is also the issue tracker
-for reporting bugs.
+The source code can be found on `GitHub`_.
 
 .. _GitHub: https://github.com/osmcode/pyosmium
diff --git a/lib/generic_handler.hpp b/lib/generic_handler.hpp
index 18823ef..beaa7df 100644
--- a/lib/generic_handler.hpp
+++ b/lib/generic_handler.hpp
@@ -25,8 +25,9 @@ protected:
     };
 
 public:
+virtual void apply_start() {};
 // handler functions
-virtual void node(const osmium::Node&)= 0;
+virtual void node(const osmium::Node&) = 0;
 virtual void way(const osmium::Way&) = 0;
 virtual void relation(const osmium::Relation&) = 0;
 virtual void changeset(const osmium::Changeset&) = 0;
@@ -163,14 +164,7 @@ struct SimpleHandlerWrap: BaseHandler, wrapper<BaseHandler> {
         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 @@ private:
             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 @@ private:
         apply(file, entities, handler, idx);
     }
 
+
     bool hasfunc(char const *name) {
         reference_existing_object::apply<SimpleHandlerWrap*>::type converter;
         PyObject* obj = converter( this );
diff --git a/lib/merged_input.hpp b/lib/merged_input.hpp
index b35503d..4d88575 100644
--- a/lib/merged_input.hpp
+++ b/lib/merged_input.hpp
@@ -52,6 +52,7 @@ namespace pyosmium {
 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 --git a/lib/osmium.cc b/lib/osmium.cc
index 73e0da9..e351bf4 100644
--- a/lib/osmium.cc
+++ b/lib/osmium.cc
@@ -28,11 +28,16 @@ void apply_reader_simple(osmium::io::Reader &rd, T &h) {
     osmium::apply(rd, h);
 }
 
+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 --git a/src/osmium/version.py b/src/osmium/version.py
index 34ed1a8..73f77fd 100644
--- a/src/osmium/version.py
+++ b/src/osmium/version.py
@@ -5,7 +5,7 @@ Version information.
 # the major version
 pyosmium_major = '2.12'
 # current release (Pip version)
-pyosmium_release = '2.12.2'
+pyosmium_release = '2.12.3'
 
 # libosmium version shipped with the Pip release
 libosmium_version = '2.12.2'
diff --git a/tools/pyosmium-get-changes b/tools/pyosmium-get-changes
index f10b305..dac4403 100755
--- a/tools/pyosmium-get-changes
+++ b/tools/pyosmium-get-changes
@@ -69,7 +69,7 @@ class ReplicationStart(object):
             if python_version >= (3,0):
                 date = date.replace(tzinfo=dt.timezone.utc)
         except ValueError:
-            raise ArgumentTypeError("Date needs to be in ISO8601 format (e.g. 2015-12-24T08:08Z).")
+            raise ArgumentTypeError("Date needs to be in ISO8601 format (e.g. 2015-12-24T08:08:08Z).")
 
         return ReplicationStart(date=date)
 
@@ -104,7 +104,7 @@ def write_end_sequence(fname, seqid):
         print(seqid)
     else:
         with open(fname, 'w') as fd:
-            fd.write(str(startseq))
+            fd.write(str(seqid))
 
 def get_arg_parser(from_main=False):
     def h(s):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pyosmium.git



More information about the Pkg-grass-devel mailing list