Skip to content

Commit

Permalink
Fix compatibility with python <3.11 for catch_warnings(), bump versio…
Browse files Browse the repository at this point in the history
…n to 4.5.1
  • Loading branch information
GeoSander committed Oct 8, 2024
1 parent 24dee2a commit a5316ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions geocatbridge/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ about=GeoCat is pleased to offer its Bridge plugin to the QGIS community.
experimental=False
category=Web
qgisMinimumVersion=3.16
version=4.5.0
version=4.5.1
email=support@geocat.net
icon=icons/geocat.png
tags=style, symbology, cartography, publishing, sharing, SDI, metadata, MapServer,
Expand All @@ -24,7 +24,11 @@ tracker=https://github.com/GeoCat/qgis-bridge-plugin/issues
repository=https://github.com/GeoCat/qgis-bridge-plugin
hasProcessingProvider=yes
deprecated=False
changelog=Version 4.5.0, September 2024
changelog=Version 4.5.1, October 2024
- Fix bridgestyle (ExpressionConverter) causing some feature styles to fail [#189]
- Remove Python warnings

Version 4.5.0, September 2024
- Properly release resources when plugin reloads [#187]
- Replaced QtWebKit related code with regular Qt UI elements [#152, #185]
- Replaced PNG icons with SVG icons
Expand Down
5 changes: 3 additions & 2 deletions geocatbridge/publish/style/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import json as _json
from warnings import catch_warnings
from warnings import catch_warnings, simplefilter
from typing import Dict as _Dict, List, Tuple
from xml.dom import minidom
from xml.etree import ElementTree as ETree
Expand Down Expand Up @@ -96,7 +96,8 @@ def layerStyleAsSld(layer: _lyr.BridgeLayer, lowercase_props: bool = False) -> T
layer_name = ETree.SubElement(named_layer, "Name")
layer_name.text = layer.web_slug if hasattr(layer, 'web_slug') else layer.name()
user_style = ETree.SubElement(named_layer, "UserStyle")
with catch_warnings(action="ignore", category=DeprecationWarning):
with catch_warnings():
simplefilter("ignore", DeprecationWarning)
# As title() and abstract() actually point to metadata().title() and metadata().abstract(),
# (see BridgeLayer.__init__), we can suppress the deprecation warning here...
props = {
Expand Down

0 comments on commit a5316ba

Please sign in to comment.