Skip to content

Commit

Permalink
Update all minor versions (master) (minor) (#11695)
Browse files Browse the repository at this point in the history
* Update all minor versions

* Fix new Prospector issues

* Fix Prospector profile

* Fix import auto remove

* Update dpkg versions list

From the artifact of the previous workflow run

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stéphane Brunner <[email protected]>
Co-authored-by: geo-ghci-int[bot] <146321879+geo-ghci-int[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 4, 2025
1 parent e665c7b commit e60940b
Show file tree
Hide file tree
Showing 30 changed files with 198 additions and 153 deletions.
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,18 @@ repos:
geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/{{cookiecutter.package}}_geoportal/__init__\.py
)$
- repo: https://github.com/PyCQA/prospector
rev: v1.13.3
rev: v1.14.1
hooks:
- id: prospector
args:
- --profile=.prospector.yaml
- --profile=utils:unsafe
- --tool=ruff
- --die-on-tool-error
- --output-format=pylint
additional_dependencies:
- prospector-profile-duplicated==1.10.0 # pypi
- prospector-profile-utils==1.14.1 # pypi
- prospector-profile-utils==1.17.0 # pypi
- ruff==0.8.4 # pypi
- repo: https://github.com/sbrunner/jsonschema-validator
rev: 1.0.0
Expand Down
1 change: 0 additions & 1 deletion .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ inherits:
- utils:base
- utils:fix
- utils:no-design-checks
- utils:unsafe
- utils:c2cwsgiutils

ignore-paths:
Expand Down
6 changes: 3 additions & 3 deletions admin/c2cgeoportal_admin/lib/ogcserver_synchronizer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2024, Camptocamp SA
# Copyright (c) 2020-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -40,7 +40,7 @@
from sqlalchemy.orm.session import Session


class dry_run_transaction: # noqa ignore=N801: class names should use CapWords convention
class _DryRunTransaction:
def __init__(self, dbsession: Session, dry_run: bool):
self.dbsession = dbsession
self.dry_run = dry_run
Expand Down Expand Up @@ -168,7 +168,7 @@ def synchronize(self, dry_run: bool = False) -> None:
dry_run
When set to True, do not commit but roll back transaction at end of synchronization.
"""
with dry_run_transaction(self._request.dbsession, dry_run):
with _DryRunTransaction(self._request.dbsession, dry_run):
self.do_synchronize()
if dry_run:
self._logger.info("Rolling back transaction due to dry run")
Expand Down
8 changes: 4 additions & 4 deletions admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"snyk-protect": "snyk-protect"
},
"dependencies": {
"@snyk/protect": "1.1294.3",
"@snyk/protect": "1.1295.2",
"bootstrap": "3.4.1",
"bootstrap-table": "1.24.0",
"jquery": "3.7.1",
Expand Down
1 change: 1 addition & 0 deletions ci/dpkg-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ camptocamp/geomapfish-config:latest:
ubuntu_24_04/tar: 1.35+dfsg-3build1
ubuntu_24_04/tzdata: 2024a-3ubuntu1.1
ubuntu_24_04/ubuntu-keyring: 2023.11.28.1
ubuntu_24_04/unminimize: 0.2.1
ubuntu_24_04/util-linux: 2.39.3-9ubuntu6.1
camptocamp/geomapfish-qgisserver:gmflatest-qgis3.34:
ubuntu_22_04/adduser: 3.118ubuntu5
Expand Down
4 changes: 2 additions & 2 deletions commons/c2cgeoportal_commons/models/static.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011-2024, Camptocamp SA
# Copyright (c) 2011-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -324,7 +324,7 @@ def set_temp_password(self, password: str) -> None:
@staticmethod
def __encrypt_password_legacy(password: str) -> str:
"""Hash the given password with SHA1."""
return sha1(password.encode("utf8")).hexdigest() # noqa: S324
return sha1(password.encode("utf8")).hexdigest() # noqa: S324 # nosec

@staticmethod
def __encrypt_password(password: str) -> str:
Expand Down
30 changes: 15 additions & 15 deletions doc/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Sphinx-Substitution-Extensions = { extras = ["prompt"], version = "2025.1.2" }
sphinxcontrib-mermaid = "1.0.0"
c2cwsgiutils = ">=6.0.0.dev148"
tilecloud-chain = "1.22.0"
boto3 = { version = "1.35.92", optional = true }
boto3 = { version = "1.36.12", optional = true }
5 changes: 4 additions & 1 deletion docker/qgisserver/.prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ inherits:
- utils:base
- utils:fix
- utils:no-design-checks
- utils:unsafe

pyroma:
run: False

mypy:
options:
python_version: '3.10'

pylint:
options:
extension-pkg-allow-list: qgis
4 changes: 2 additions & 2 deletions docker/qgisserver/geomapfish_qgisserver/accesscontrol.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2024, Camptocamp SA
# Copyright (c) 2018-2025, Camptocamp SA
# All rights reserved.

# This program is free software; you can redistribute it and/or modify it under the terms of the
Expand Down Expand Up @@ -322,7 +322,7 @@ def cacheKey(self) -> str: # pylint: disable=invalid-name
try:
if not self.initialized:
_LOG.error("Call on uninitialized plugin")
return str(random.randrange(1000000)) # noqa: S311
return str(random.randrange(1000000)) # noqa: S311 # nosec
return self.get_ogcserver_accesscontrol().cacheKey()
except Exception:
_LOG.exception("Unhandled error")
Expand Down
20 changes: 10 additions & 10 deletions docker/qgisserver/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docker/qgisserver/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ c2cwsgiutils = { extras = ["broadcast"], version = "6.1.5" }
papyrus = "2.6.2" # commons
transaction = "5.0" # commons
"c2c.template" = "2.4.2"
GeoAlchemy2 = "0.16.0"
GeoAlchemy2 = "0.17.0"
SQLAlchemy = "2.0.36" # commons
"zope.event" = "5.0" # commons
"zope.sqlalchemy" = "3.1" # commons
Expand All @@ -23,8 +23,8 @@ psycopg2 = "2.9.10"
pytz = "2025.1"

[tool.poetry.dev-dependencies]
prospector = { version = "1.13.3", extras = ["with_mypy", "with_bandit", "with_ruff"] }
prospector = { version = "1.14.1", extras = ["with_mypy", "with_bandit", "with_ruff"] }
prospector-profile-duplicated = "1.10.4"
prospector-profile-utils = "1.15.1"
prospector-profile-utils = "1.17.0"
types-pyyaml = "6.0.12.20241230"
pytest = "8.3.4"
4 changes: 2 additions & 2 deletions geoportal/c2cgeoportal_geoportal/lib/dbreflection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011-2024, Camptocamp SA
# Copyright (c) 2011-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -206,7 +206,7 @@ def _create_class(
# The randint is to fix the SAWarning: This declarative base already contains a class with the same
# class name and module name
cls = type(
f"{table.name.capitalize()}_{random.randint(0, 9999999)}", # noqa: S311
f"{table.name.capitalize()}_{random.randint(0, 9999999)}", # noqa: S311 # nosec
(GeoInterface, Base),
attributes,
)
Expand Down
8 changes: 4 additions & 4 deletions geoportal/c2cgeoportal_geoportal/lib/lingva_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def __call__(
int_filename = filename
if re.match("^" + re.escape(f"./{self.config['package']}/templates"), filename):
try:
empty_template = Template("") # noqa: S702
empty_template = Template("") # noqa: S702 # nosec

class Lookup(TemplateLookup): # type: ignore[misc]
def get_template(self, uri: str) -> Template:
Expand All @@ -190,9 +190,9 @@ def prepare(self, **kwargs: Any) -> None:
options.update({"input_encoding": self.encoding})
lookup = Lookup(**kwargs)
if self.source:
self.tpl = Template(self.source, lookup=lookup, **kwargs) # noqa: S702
self.tpl = Template(self.source, lookup=lookup, **kwargs) # noqa: S702 # nosec
else:
self.tpl = Template( # noqa: S702
self.tpl = Template( # noqa: S702 # nosec
uri=self.name, filename=self.filename, lookup=lookup, **kwargs
)

Expand Down Expand Up @@ -307,7 +307,7 @@ def __call__(
init_region({"backend": "dogpile.cache.memory"}, "obj")

with open(filename, encoding="utf8") as config_file:
gmf_config = yaml.load(config_file, Loader=yaml.BaseLoader) # noqa: S506
gmf_config = yaml.load(config_file, Loader=yaml.BaseLoader) # noqa: S506 # nosec
# For application config (config.yaml)
if "vars" in gmf_config:
return self._collect_app_config(filename)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@

def includeme(config: Configurator) -> None:
"""Initialize the multi-tenant."""

del config # Unused
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ services:
- PGOPTIONS

mapserver:
image: camptocamp/mapserver:8.2-gdal3.8
image: camptocamp/mapserver:8.4-gdal3.8
user: www-data
restart: unless-stopped
entrypoint: []
Expand Down
6 changes: 3 additions & 3 deletions geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2014-2024, Camptocamp SA
# Copyright (c) 2014-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -210,11 +210,11 @@ def test_checkers(self) -> tuple[bool, str | None]:
)
run_curl = f"Run `curl --insecure {headers} '{self.project['checker_url']}'` for more information."
try:
requests.packages.urllib3.disable_warnings() # type: ignore
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member,unrecognized-inline-option
resp = requests.get(
self.project["checker_url"],
headers=self.project.get("checker_headers"),
verify=False, # noqa: S501
verify=False, # noqa: S501 # nosec
timeout=120,
)
except requests.exceptions.ConnectionError as exception:
Expand Down
4 changes: 2 additions & 2 deletions geoportal/c2cgeoportal_geoportal/scripts/pcreate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024, Camptocamp SA
# Copyright (c) 2021-2025, Camptocamp SA
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -181,7 +181,7 @@ def get_context(self) -> dict[str, str | int]:
}
context.update(self.read_project_file())
if os.environ.get("CI") == "true":
context["authtkt_secret"] = "io7heoDui8xaikie1rushaeGeiph8Bequei6ohchaequob6viejei0xooWeuvohf" # noqa: S105
context["authtkt_secret"] = "io7heoDui8xaikie1rushaeGeiph8Bequei6ohchaequob6viejei0xooWeuvohf" # noqa: S105 # nosec

self.get_var(context, "srid", "Spatial Reference System Identifier (e.g. 2056): ", int)
srid = cast(int, context["srid"])
Expand Down
Loading

0 comments on commit e60940b

Please sign in to comment.