ITADN
osmcode/pyosmium

版本发布 6

Version 4.1.0v4.1.0
? · 2025-08-30

_The build process for pyosmium changes slightly with this release. If you are installing via pip, things keep working as before. When installing from source be aware of the following: pybind11 is not longer packaged but will be installed as part of the build from the pypi packages. If you were using on of the `*_PREFIX` variables to set a custom location for libosmium, protozero or boost, you need to switch to the CMake standard way for custom locations, namly `Libosmium_ROOT`, `Protozero_ROOT` or `Boost_ROOT`. Compiled libraries will no longer be put into the `build` directory. See README for how to build and run tests during development._ ### Added - introduced flake8 linting for Python sources and tests - experimental support for free-threaded Python - support for Python 3.14 - binary wheels for Windows ARM architecture ### Fixed - various errors in the documentation (thanks @ltog, @amandasaurus, @uniform641) - make timestamp conversions thread-safe ### Changed - updated to pybind11 3.0 (drops support for Python 3.7 and CMake < 3.15) - replace setuptools build system with [scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/) - create version.h on the fly during build (now reflects the library versions actually used for building pyosmium) - example code modernized (thanks @jake-low)

Version 4.0.2v4.0.2
? · 2024-10-20

### Fixed - set proper default 'osc.gz' for prefixes on replication servers ### Added - add documentation for writing custom objects and replication module

Version 4.0.1v4.0.1
? · 2024-09-27

### Fixed - correctly package py.typed file - typing: correctly report inheritance of SimpleWriter and NodeLocationsForWays

Version 4.0.0v4.0.0
? · 2024-09-20

This release introduces iterative processing of OSM files. It also adds filtering of irrelevant data to speed up processing, so that pyosmium may now ne used even with planet-sized files. Have a look at the completely overhauled [user manual](https://docs.osmcode.org/pyosmium/v4.0.0/) to learn about the new features. ### Added - support for Python 3.13 - iterative processing of OSM files (see FileProcessor) - new `flush()` callback for handlers - FileBuffer for reading from a Python buffer instead of a file - bit operators for entity bit enum - filter mode for handlers (return False to stop processing) - various C++-implementations of filters (for tags, keys, ids, etc.) - convenience functions to determine object types - binary wheels for MAcOS and Intel ARM architecture - haversine functions for two point - direct access to lat/lon for nodes - expose osmium's IdSet - new IdTracker for efficient tracking of dependent objects - new writers for adding forward and backward references to output - new parameter for server file type for pyosmium_get_updates - new filter to add `__geo_interface__` attribute ### Fixed - consistently use namespaces everywhere - deprecation warnings around utc_now (thanks @mtmail) ### Changed - SimpleHandler is now a Python class - make NodeLocationForWays a generic BaseHandler - `apply()` and MergeInputReader can take an arbitrary number of handlers - accept Python class as handler, no inheritance from SimpleHandler necessary - new minimum requirements: pybind 2.7, Python 3.7, C++17 compatible compiler, cmake 3.8 - AreaManager is now part of the Python interface - consistently allow str, Path, File and FileBuffer, where OSM files are expected - objects stay alive through handler chain allowing to carry over extra attributes - switch SimpleWriter to use keyword arguments - make Reader and SimpleWriter context managers - new overwrite parameter for writers - remove GIL release, only slows down processing - move documentation of C++ interface into pyi files - complete rewrite of documentation using mkdocs - update pybind to 2.13.6 - use maximum parallelization when building (thanks @Mathiasdm) - move build configuration to pyproject.toml as far as possible

Version 3.7.0v3.7.0
? · 2023-11-19

### Added - transparently retry download on transient HTTP errors ### Fixed - catch non-200 status for HTTP responses ### Changed - 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.

Version 3.6.0v3.6.0
? · 2023-01-21

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