diff --git a/CHANGES.rst b/CHANGES.rst index ffab9bb04b..38f62b2b09 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,11 @@ Notes: ------ - This python package specifies the version numbers only of directly imported python packages. This approach may result in a build failure of older versions of the project if incompatibilities arise between imported packages over time. The build process of the master branch is regularly tested in an automatic process. +2.5.3 +----- +- Provide a general WMS verify certificate option +- Library upgrade (shapely) + 2.5.2 ----- - Add configuration Option to check certificate for external WMS. Default setting: True diff --git a/dev/config/pyramid_oereb.yml.mako b/dev/config/pyramid_oereb.yml.mako index 0cc3d97a6b..e78f9947ab 100644 --- a/dev/config/pyramid_oereb.yml.mako +++ b/dev/config/pyramid_oereb.yml.mako @@ -245,8 +245,6 @@ pyramid_oereb: fr: https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&STYLES=default&CRS=EPSG:2056&BBOX=2475000,1065000,2850000,1300000&WIDTH=493&HEIGHT=280&FORMAT=image/png&LAYERS=ch.swisstopo-vd.amtliche-vermessung layer_index: 0 layer_opacity: 1.0 - # Option to check certificate for external WMS. Default and recommended setting: True - verify_certificate: True plan_for_land_register_main_page: # WMS URL to query the plan for land register specially for static extracts overview page reference_wms: @@ -254,8 +252,6 @@ pyramid_oereb: fr: https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&STYLES=default&CRS=EPSG:2056&BBOX=2475000,1065000,2850000,1300000&WIDTH=493&HEIGHT=280&FORMAT=image/png&LAYERS=ch.swisstopo-vd.amtliche-vermessung layer_index: 0 layer_opacity: 1.0 - # Option to check certificate for external WMS. Default and recommended setting: True - verify_certificate: True visualisation: method: pyramid_oereb.core.hook_methods.produce_sld_content # Note: these parameters must fit to the attributes provided by the RealEstateRecord!!!! @@ -1420,6 +1416,10 @@ pyramid_oereb: transfer_code: Hinweis extract_code: Hint + # Option to check certificate for external WMS calls in standard and oereblex themes. + # Default and recommended setting: True + verify_certificate_wms: True + # The error message returned if an error occurs when requesting a static extract # The content of the message is defined in the specification (document "Inhalt und Darstellung des statischen Auszugs") static_error_message: diff --git a/doc/source/changes.rst b/doc/source/changes.rst index e82036c99d..70e651fd30 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -13,6 +13,13 @@ call for the pdf extract in most cases. This value should be set if >95% of the pages. Default setting: 2 +Version 2.5.3 +------------- +Feature and maintenance release: + +* Provide a general WMS verify certificate option +* Library upgrade (shapely) + Version 2.5.2 ------------- Feature and maintenance release: diff --git a/pyproject.toml b/pyproject.toml index db124ffb37..dcf901b44b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] name = "pyramid_oereb" -version = "2.5.2" +version = "2.5.3" description = "pyramid_oereb, extension for pyramid web frame work to provide a basic server part for the oereb project" classifiers=[ diff --git a/pyramid_oereb/contrib/data_sources/standard/sources/plr.py b/pyramid_oereb/contrib/data_sources/standard/sources/plr.py index 2f085cd489..3aa9028ae1 100644 --- a/pyramid_oereb/contrib/data_sources/standard/sources/plr.py +++ b/pyramid_oereb/contrib/data_sources/standard/sources/plr.py @@ -163,8 +163,7 @@ def from_db_to_view_service_record(self, view_service_from_db, legend_entry_reco Config.get('srid'), Config.get('proxies'), legends=legend_entry_records, - # Note: our standard database model does not contain an option to override the verify_certificate - verify_certificate=True + verify_certificate=Config.get('verify_certificate_wms', True) ) return view_service_record diff --git a/pyramid_oereb/contrib/data_sources/swisstopo/address.py b/pyramid_oereb/contrib/data_sources/swisstopo/address.py index 317fb0ea8b..92b62de8a8 100644 --- a/pyramid_oereb/contrib/data_sources/swisstopo/address.py +++ b/pyramid_oereb/contrib/data_sources/swisstopo/address.py @@ -61,7 +61,8 @@ def read(self, params, street_name, zip_code, street_number): self._geoadmin_url, params=request_params, proxies=self._proxies, - headers=headers + headers=headers, + timeout=4 ) if response.status_code == requests.codes.ok: rp = Reprojector() diff --git a/pyramid_oereb/core/config.py b/pyramid_oereb/core/config.py index 22b8da703d..d17b7a3973 100644 --- a/pyramid_oereb/core/config.py +++ b/pyramid_oereb/core/config.py @@ -2098,7 +2098,7 @@ def municipality_by_fosnr(fosnr): if municipality.fosnr == fosnr: return municipality raise ConfigurationError( - 'No municipalitiy with fosnr {} could be found in the configured municipalities ({}).'.format( + 'No municipality with fosnr {} could be found in the configured municipalities ({}).'.format( fosnr, Config.municipalities ) diff --git a/pyramid_oereb/core/readers/real_estate.py b/pyramid_oereb/core/readers/real_estate.py index e37d956446..e277533c34 100644 --- a/pyramid_oereb/core/readers/real_estate.py +++ b/pyramid_oereb/core/readers/real_estate.py @@ -64,7 +64,7 @@ def read(self, params, nb_ident=None, number=None, egrid=None, geometry=None): Config.get('default_language'), Config.get('srid'), Config.get('proxies'), - verify_certificate=plan_for_land_register_config.get('verify_certificate', True) + verify_certificate=Config.get('verify_certificate_wms', True) ) plan_for_land_register_main_page_config = Config.get_plan_for_land_register_main_page_config() @@ -75,7 +75,7 @@ def read(self, params, nb_ident=None, number=None, egrid=None, geometry=None): Config.get('default_language'), Config.get('srid'), Config.get('proxies'), - verify_certificate=plan_for_land_register_main_page_config.get('verify_certificate', True) + verify_certificate=Config.get('verify_certificate_wms', True) ) self._source_.read(params, nb_ident=nb_ident, number=number, egrid=egrid, geometry=geometry)