Skip to content

Commit

Permalink
removing vendor packaging version
Browse files Browse the repository at this point in the history
  • Loading branch information
Gpetrak committed Nov 11, 2024
1 parent d7e7054 commit 91b0d6c
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 855 deletions.
8 changes: 1 addition & 7 deletions src/qgis_geonode/apiclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@
import typing

from ..network import UNSUPPORTED_REMOTE
from ..vendor.packaging import version as packaging_version
from packaging import version as packaging_version
from packaging.specifiers import SpecifierSet

SUPPORTED_VERSIONS = SpecifierSet(">=4.0.0, <5.0.0dev0")


def validate_version(
version: packaging_version.Version, supported_versions=SUPPORTED_VERSIONS
) -> bool:

# We need to convert the Version class to string
# because the plugin uses a vendorized older packaging.version
# which cannot compare Version classes with strings directly.
# The new version of packaging can do this.
# TODO update the packaging vendorized version
version = version.base_version

if version in supported_versions:
Expand Down
2 changes: 1 addition & 1 deletion src/qgis_geonode/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .apiclient.models import GeonodeResourceType, IsoTopicCategory
from .network import UNSUPPORTED_REMOTE
from .utils import log
from .vendor.packaging import version as packaging_version
from packaging import version as packaging_version


@contextlib.contextmanager
Expand Down
2 changes: 1 addition & 1 deletion src/qgis_geonode/gui/connection_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
settings_manager,
)
from ..utils import tr
from ..vendor.packaging import version as packaging_version
from packaging import version as packaging_version


DialogUi, _ = loadUiType(
Expand Down
2 changes: 1 addition & 1 deletion src/qgis_geonode/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)

from .utils import log
from .vendor.packaging import version as packaging_version
from packaging import version as packaging_version

UNSUPPORTED_REMOTE = "unsupported"

Expand Down
26 changes: 0 additions & 26 deletions src/qgis_geonode/vendor/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/qgis_geonode/vendor/packaging/LICENSE

This file was deleted.

177 changes: 0 additions & 177 deletions src/qgis_geonode/vendor/packaging/LICENSE.APACHE

This file was deleted.

23 changes: 0 additions & 23 deletions src/qgis_geonode/vendor/packaging/LICENSE.BSD

This file was deleted.

26 changes: 0 additions & 26 deletions src/qgis_geonode/vendor/packaging/__about__.py

This file was deleted.

25 changes: 0 additions & 25 deletions src/qgis_geonode/vendor/packaging/__init__.py

This file was deleted.

61 changes: 0 additions & 61 deletions src/qgis_geonode/vendor/packaging/_structures.py

This file was deleted.

Loading

0 comments on commit 91b0d6c

Please sign in to comment.