deps: update dependency hcloud to v1.31.0 (#370)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [hcloud](https://togithub.com/hetznercloud/hcloud-python)
([changelog](https://togithub.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md))
| `1.30.0` -> `1.31.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/hcloud/1.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/hcloud/1.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/hcloud/1.30.0/1.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/hcloud/1.30.0/1.31.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-python (hcloud)</summary>

###
[`v1.31.0`](https://togithub.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#1310-2023-10-23)

[Compare
Source](https://togithub.com/hetznercloud/hcloud-python/compare/v1.30.0...v1.31.0)

##### Features

- prepare for iso deprecated field removal
([#&#8203;320](https://togithub.com/hetznercloud/hcloud-python/issues/320))
([beae328](beae328dd6))

##### Dependencies

- update pre-commit hook psf/black-pre-commit-mirror to v23.10.0
([#&#8203;319](https://togithub.com/hetznercloud/hcloud-python/issues/319))
([184bbe6](184bbe65a7))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ansible-collections/hetzner.hcloud).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
renovate[bot] 2023-10-23 11:12:06 +02:00 committed by GitHub
parent a93dbaa428
commit f35f5009aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 9 deletions

View file

@ -1,3 +1,3 @@
from __future__ import annotations
VERSION = "1.30.0" # x-release-please-version
VERSION = "1.31.0" # x-release-please-version

View file

@ -1,9 +1,7 @@
from __future__ import annotations
try:
from dateutil.parser import isoparse
except ImportError:
isoparse = None
from datetime import datetime
from warnings import warn
from ..core import BaseDomain, DomainIdentityMixin
from ..deprecation import DeprecationInfo
@ -35,7 +33,6 @@ class Iso(BaseDomain, DomainIdentityMixin):
"type",
"architecture",
"description",
"deprecated",
"deprecation",
)
@ -46,7 +43,7 @@ class Iso(BaseDomain, DomainIdentityMixin):
type: str | None = None,
architecture: str | None = None,
description: str | None = None,
deprecated: str | None = None,
deprecated: str | None = None, # pylint: disable=unused-argument
deprecation: dict | None = None,
):
self.id = id
@ -54,7 +51,19 @@ class Iso(BaseDomain, DomainIdentityMixin):
self.type = type
self.architecture = architecture
self.description = description
self.deprecated = isoparse(deprecated) if deprecated else None
self.deprecation = (
DeprecationInfo.from_dict(deprecation) if deprecation is not None else None
)
@property
def deprecated(self) -> datetime | None:
"""
ISO 8601 timestamp of deprecation, None if ISO is still available.
"""
warn(
"The `deprecated` field is deprecated, please use the `deprecation` field instead.",
DeprecationWarning,
)
if self.deprecation is None:
return None
return self.deprecation.unavailable_after

View file

@ -20,7 +20,7 @@ from textwrap import dedent
logger = logging.getLogger("vendor")
HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python"
HCLOUD_VERSION = "v1.30.0"
HCLOUD_VERSION = "v1.31.0"
HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"