pyosmium

Python bindings for libosmium

BSD-2-CLAUSE License

Downloads
834.7K
Stars
288

Bot releases are visible (Hide)

pyosmium - Version 3.7.0 Latest Release

Published by lonvia 11 months ago

Added

  • transparently retry download on transient HTTP errors

Fixed

  • catch non-200 status for HTTP responses

Changed

  • switch unit tests for replication to use pytest-httpserver
  • update to pybind 2.11.1
  • update to libosmium 2.20.0

This is the last version to support overwriting ReplicationServer.open_url(). Use new ReplicationServer.set_request_parameter() function instead.

pyosmium - Version 3.6.0

Published by lonvia over 1 year ago

This release brings a major rewrite of the libosmium wrapper code. Access to libosmium objects and functions now goes through thin proxy objects which make sure that the underlying data buffers are still accessible. This replaces the check for reference counters which has caused a lot of cryptic errors. Users are still not allowed to keep references to data received in the handler callbacks. However, this will only be checked when data is accessed. Just keeping a reference around will not raise exceptions anymore. str() and repr() are guaranteed to never throw, even when the reference is invalid. That should make it easier to debug your code. These changes are all internal. The user-facing library interface and behaviour hasn't changed. Your code should just work with this new version.

Added

  • new example for creating geojson from a OSM file

Changed

  • complete internal rewrite of the bindings for OSM data types
  • invalid buffers are now checked on access time, no more reference count checks on leaving the handler callback
  • update to pybind 2.10.3
  • update to libosmium 2.19.0
  • change minimum required version of Cmake to 3.0
pyosmium - Version 3.5.0

Published by lonvia almost 2 years ago

Added

  • type annotations for the public interface
  • new ReplicationServer.set_request_parameter() function to specify additional parameters to give to requests.get()

Fixed

  • writer now rolls back data buffer after exceptions (fixes #212)
  • off-by-one error in computation of change ID from a start date
  • socket timeout in pyosmium-get-changes/pyosmium-up-to-date was ignored falling back to waiting forever on requests

Changed

  • use format strings instead of format() where possible
  • pyosmium-get-changes now prints an error message when there is a HTTP error
    during download
  • overwriting ReplicationServer.open_url() is no longer recommended, use new ReplicationServer.set_request_parameter() function instead
  • cookies for pyosmium-get-changes/pyosmium-up-to-date are now set via request parameters, removing the last use-case where urllib was used
  • update bundled pybind11 to 2.10.1
pyosmium - Version 3.4.1

Published by lonvia about 2 years ago

Fixed

  • allow building docs from built sources in PYTHONPATH again
pyosmium - Version 3.4.0

Published by lonvia about 2 years ago

Fixed

  • finding the build directory when newer versions of setuptools are used

Changed

  • improve error message when writing to a writer that is already closed
  • update to pybind 2.10.0
  • drop support for Python 3.5
pyosmium - Version 3.3.0

Published by lonvia over 2 years ago

With this release the recommended way of using ReplicationServer changes: use it now as a context manager with the with statement:

with rserv.ReplicationServer('https://planet.osm.org/replication/hour/', 'osc.gz') as svr:
    print(svr.get_state_info())

The old way of simply calling the constructor still works but it won't make use of requests.Sessions. Downloads will be a bit slower.

This is the last version to support Python 3.5.

Added

  • add_box() for osmium.osm.Header for setting the bbox in a OSM file
  • SimpleWriter now can receive a customized header in its constructor
  • SimpleWriter now accepts a list of RelationMember in then member parameter
    of add_relation()
  • more tests for replication server and osm base types

Fixed

  • AttributeError when using pyosmium-get-changes with cookies (thanks @wiktorn)
  • avoid memory leak in apply_buffer() functions in
    SimpleHandler and MergeInputReader
  • maek sure close() is called for requests.Session and requests.Response
  • documentation for open_url() now reflects its new behaviour
  • build issue with raw ssize_t on Windows since Python 3.10

Changed

  • ReplicationServer is now a context manager
  • allow any string-like object for apply_file()
  • switch tests from nose to pytest
  • use Python libraries instead of wget for downloading contrib packages
  • update to libosmium 2.18.0 (requires now C++14)
  • update to pybind11 2.9.1
pyosmium - Release 3.2.0

Published by lonvia about 3 years ago

Please note that this release adds a dependency to the requests library.

Fixed

  • merge change files correctly so that latest applied object comes first

Changed

  • switch to requests library for downloading files (thanks @jocelynj)
  • update to libosmium 2.17.0
  • update to pybind11 2.7.1
pyosmium - Release 3.1.3

Published by lonvia over 3 years ago

Fixed

  • up-to-date: check if any updates are available before starting download
  • AttributeError when writing replication headers and network is unreachable

Changed

  • update to pybind11 2.6.2
pyosmium - Release 3.1.2

Published by lonvia almost 4 years ago

Fixed

  • package pypi source wheel with correct libosmium version
pyosmium - Release 3.1.1

Published by lonvia almost 4 years ago

Added

  • support for lz4 compression (compiled in when library is found)

Changed

  • update to libosmium 2.16.0
  • update to pybind11 2.6.1
pyosmium - Release 3.1.0

Published by lonvia almost 4 years ago

Changed

  • improved help messages for update tools
  • update to pybind11 2.6

Fixed

  • pyosmium-up-to-date: fix missing flag when applying changes to history files
  • smaller linting and documentation issues

When compiling against pybind11 2.6, you need at least CMake 3.4. Older versions of pybind11 are still supported and work together with older CMake versions.

pyosmium - Release 3.0.1

Published by lonvia about 4 years ago

Added

  • allow to set user in mutable object

Changed

  • use current libosmium and protozero

Fixed

  • avoid leaking Python handle in timestamp conversion
pyosmium - Version 3.0.0

Published by lonvia over 4 years ago

Starting with this release, pyosmium no longer follows version numbering of libosmium.

Added

  • socket timeouts for pyosmium-get-changes and pyosmium-up-to-date
  • pyosmium-up-to-date: allow writing the diff to stdout (requires format option)

Changed

  • remove support for Python2 and Python 3.3
pyosmium - Version 2.15.4

Published by lonvia over 4 years ago

This is the last release to support Python2.

Added

  • pyosmium-get-changes: allow to pipe updates to stdout
  • doc: add more information about file updates

Changed

  • check for dangling references in callbacks
  • use a custom HTTP user agent when requesting diffs
  • use current libosmium

Fixed

  • replication: retry downloading truncated state files
pyosmium - Version 2.15.3

Published by lonvia about 5 years ago

Note: pyosmium 2.15 will be the last release series to support Python 2.

Added

  • make_simple_handler() convenience wrapper
  • iterator for Tag type (for allowing to convert TagLists into python dicts)
  • tests for examples
  • tests for MP building and MergeInputReader

Changed

  • use current libosmium and protozero

Fixed

  • remove spurious 404 error message when downloading OSM diffs
pyosmium - Version 2.15.2

Published by lonvia over 5 years ago

Added

  • NodeLocationsForWays (accidentally removed in 2.15.0)
  • more tests

Changed

  • GIL lock now released while apply() is in C++ code

Fixed

  • unicode output of tag str() representation for python 2
  • handling of tempfile in test for pyosmium_get_changes
  • documentation for ends_have_same_location()
pyosmium - Version 2.15.1

Published by lonvia over 5 years ago

Added

  • tests for pyosmium-get-changes

Changed

  • do not read data when checking for replication headers

Fixed

  • fix typo in sequence file reading of pyosmium-get-changes
pyosmium - Version 2.15.0

Published by lonvia almost 6 years ago

This is the first release to ship binary wheels.

Added

  • more tests

Changed

  • replace boost-python with header only pybind11 library
  • switch to cmake for configuration (called through setup.py)
  • default node cache changed to flex_mem
pyosmium - Version 2.14.4

Published by lonvia almost 6 years ago

Added

  • allow to add arbitrary headers when updating files
  • replication: custom URL opener
  • cookie support for pyosmium-get-changes and pyosmium-up-to-date

Changed

  • pyosmium-up-to-date declares itself as 'generator'

Fixed

  • bug when reading sequence ID files in pyosmium-get-changes
pyosmium - Version 2.14.3

Published by lonvia about 6 years ago

Fixed

  • fix rounding error in tests