From 38c5d69cc8f8e475e1ea673395c72d4867ce487a Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 18 Dec 2025 18:37:06 +0100 Subject: [PATCH 1/2] ci: add link check workflow --- .github/workflows/links.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/links.yml diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 00000000..d6357c60 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,39 @@ +name: Links + +on: + pull_request: + workflow_dispatch: + schedule: + - cron: "43 12 * * *" + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - uses: actions/cache@v4 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + + - uses: lycheeverse/lychee-action@v2 + with: + fail: true + args: > + --root-dir ${{ github.workspace }} + --verbose + --no-progress + --cache + --max-cache-age 2d + --include-fragments + --exclude 'api.hetzner.cloud' + --exclude 'api.hetzner.com' + --exclude 'codecov.io' + --exclude 'github.com' + --exclude '169.254.169.254' + --exclude 'https://docs.hetzner.cloud/changelog#new-product' + '**/*.md' + '**/*.py' From eeedd7916b426c559608e025ccd05bfe5324985c Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 18 Dec 2025 18:44:26 +0100 Subject: [PATCH 2/2] chore: fix broken links --- .github/workflows/links.yml | 2 -- CHANGELOG.md | 6 +++--- README.md | 4 ++-- docs/upgrading.md | 10 +++++----- hcloud/networks/domain.py | 2 +- hcloud/zones/client.py | 6 +++--- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index d6357c60..a0ac87c3 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -33,7 +33,5 @@ jobs: --exclude 'api.hetzner.com' --exclude 'codecov.io' --exclude 'github.com' - --exclude '169.254.169.254' - --exclude 'https://docs.hetzner.cloud/changelog#new-product' '**/*.md' '**/*.py' diff --git a/CHANGELOG.md b/CHANGELOG.md index e3846c68..325fd316 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,7 +55,7 @@ storage_box = response.storage_box The DNS API is now generally available, as well as support for features in this project that are related to the DNS API. -To migrate existing zones to the new DNS API, see the [DNS migration guide](https://docs.hetzner.com/networking/dns/migration-to-hetzner-console/process). +To migrate existing zones to the new DNS API, see the [DNS migration guide](https://docs.hetzner.com/networking/dns/migration-to-hetzner-console/process/). See the [changelog](https://docs.hetzner.cloud/changelog#2025-11-10-dns-ga) for more details. @@ -83,7 +83,7 @@ See the [changelog](https://docs.hetzner.cloud/changelog#2025-11-10-dns-ga) for This release adds support for the new [DNS API](https://docs.hetzner.cloud/reference/cloud#dns). -The DNS API is currently in **beta**, which will likely end on 10 November 2025. After the beta ended, it will no longer be possible to create new zones in the old DNS system. See the [DNS Beta FAQ](https://docs.hetzner.com/networking/dns/faq/beta) for more details. +The DNS API is currently in **beta**, which will likely end on 10 November 2025. After the beta ended, it will no longer be possible to create new zones in the old DNS system. See the [DNS Beta FAQ](https://docs.hetzner.com/networking/dns/faq/beta/) for more details. Future minor releases of this project may include breaking changes for features that are related to the DNS API. @@ -782,7 +782,7 @@ Fix: Ignore unknown fields in API response instead of raising an error - First stable release. - You can find the documentation under https://hcloud-python.readthedocs.io/en/latest/ + You can find the documentation under https://hcloud-python.readthedocs.io/en/stable/ ## 0.1.0 (2018-12-20) diff --git a/README.md b/README.md index 18876469..6cab8a9a 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ [![](https://github.com/hetznercloud/hcloud-python/actions/workflows/test.yml/badge.svg)](https://github.com/hetznercloud/hcloud-python/actions/workflows/test.yml) [![](https://github.com/hetznercloud/hcloud-python/actions/workflows/lint.yml/badge.svg)](https://github.com/hetznercloud/hcloud-python/actions/workflows/lint.yml) [![](https://codecov.io/github/hetznercloud/hcloud-python/graph/badge.svg?token=3YGRqB5t1L)](https://codecov.io/github/hetznercloud/hcloud-python/tree/main) -[![](https://readthedocs.org/projects/hcloud-python/badge/?version=latest)](https://hcloud-python.readthedocs.io) +[![](https://app.readthedocs.org/projects/hcloud-python/badge/?version=latest)](https://hcloud-python.readthedocs.io/en/stable/) [![](https://img.shields.io/pypi/pyversions/hcloud.svg)](https://pypi.org/project/hcloud/) Official Hetzner Cloud python library. -The library's documentation is available at [hcloud-python.readthedocs.io](https://hcloud-python.readthedocs.io), the public API documentation is available at [docs.hetzner.cloud](https://docs.hetzner.cloud). +The library's documentation is available at [hcloud-python.readthedocs.io](https://hcloud-python.readthedocs.io/en/stable/), the public API documentation is available at [docs.hetzner.cloud](https://docs.hetzner.cloud). > [!IMPORTANT] > Make sure to follow our API changelog available at diff --git a/docs/upgrading.md b/docs/upgrading.md index dd0c8ce2..fbf79db8 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -20,7 +20,7 @@ Before upgrading, make sure to resolve any deprecation warnings. +from hcloud import Client ``` -- [#398](https://github.com/hetznercloud/hcloud-python/pull/398): The [`Client.poll_interval`](#hcloud.Client) property is now private, make sure to configure it while creating the [`Client`](#hcloud.Client): +- [#398](https://github.com/hetznercloud/hcloud-python/pull/398): The [`Client.poll_interval`](https://hcloud-python.readthedocs.io/en/stable/api.html#hcloud.Client) property is now private, make sure to configure it while creating the [`Client`](https://hcloud-python.readthedocs.io/en/stable/api.html#hcloud.Client): ```diff -client = Client(token=token) @@ -31,7 +31,7 @@ Before upgrading, make sure to resolve any deprecation warnings. +) ``` -- [#400](https://github.com/hetznercloud/hcloud-python/pull/400): The [`Client.request`](#hcloud.Client.request) method now returns an empty dict instead of an empty string when the API response is empty: +- [#400](https://github.com/hetznercloud/hcloud-python/pull/400): The [`Client.request`](https://hcloud-python.readthedocs.io/en/stable/api.html#hcloud.Client.request) method now returns an empty dict instead of an empty string when the API response is empty: ```diff response = client.request(method="DELETE", url="/primary_ips/123456") @@ -39,7 +39,7 @@ Before upgrading, make sure to resolve any deprecation warnings. +assert response == {} ``` -- [#402](https://github.com/hetznercloud/hcloud-python/pull/402): In the [`Client.isos.get_list`](#hcloud.isos.client.IsosClient.get_list) and [`Client.isos.get_all`](#hcloud.isos.client.IsosClient.get_all) methods, the deprecated `include_wildcard_architecture` argument was removed, make sure to use the `include_architecture_wildcard` argument instead: +- [#402](https://github.com/hetznercloud/hcloud-python/pull/402): In the [`Client.isos.get_list`](https://hcloud-python.readthedocs.io/en/stable/api.clients.isos.html#hcloud.isos.client.IsosClient.get_list) and [`Client.isos.get_all`](https://hcloud-python.readthedocs.io/en/stable/api.clients.isos.html#hcloud.isos.client.IsosClient.get_all) methods, the deprecated `include_wildcard_architecture` argument was removed, make sure to use the `include_architecture_wildcard` argument instead: ```diff client.isos.get_all( @@ -48,7 +48,7 @@ Before upgrading, make sure to resolve any deprecation warnings. ) ``` -- [#363](https://github.com/hetznercloud/hcloud-python/pull/363): In the [`Client.primary_ips.create`](#hcloud.primary_ips.client.PrimaryIPsClient.create) method, the `datacenter` argument was moved after `name` argument and is now optional: +- [#363](https://github.com/hetznercloud/hcloud-python/pull/363): In the [`Client.primary_ips.create`](https://hcloud-python.readthedocs.io/en/stable/api.clients.primary_ips.html#hcloud.primary_ips.client.PrimaryIPsClient.create) method, the `datacenter` argument was moved after `name` argument and is now optional: ```diff client.primary_ips.create( @@ -68,7 +68,7 @@ Before upgrading, make sure to resolve any deprecation warnings. ) ``` -- [#406](https://github.com/hetznercloud/hcloud-python/pull/406): In the [`Client.servers.rebuild`](#hcloud.servers.client.ServersClient.rebuild) method, the single action return value was deprecated and is now removed. The method now returns a full response wrapping the action and an optional root password: +- [#406](https://github.com/hetznercloud/hcloud-python/pull/406): In the [`Client.servers.rebuild`](https://hcloud-python.readthedocs.io/en/stable/api.clients.servers.html#hcloud.servers.client.ServersClient.rebuild) method, the single action return value was deprecated and is now removed. The method now returns a full response wrapping the action and an optional root password: ```diff -action = client.servers.rebuild(server, image) diff --git a/hcloud/networks/domain.py b/hcloud/networks/domain.py index cf6f1fc8..9f14a579 100644 --- a/hcloud/networks/domain.py +++ b/hcloud/networks/domain.py @@ -115,7 +115,7 @@ def TYPE_SERVER(self) -> str: # pylint: disable=invalid-name """ Used to connect cloud servers and load balancers with dedicated servers. - See https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch/ + See https://docs.hetzner.com/networking/networks/connect-dedi-vswitch/ """ __api_properties__ = ("type", "ip_range", "network_zone", "gateway", "vswitch_id") diff --git a/hcloud/zones/client.py b/hcloud/zones/client.py index 3a1d5c7b..1e5383b1 100644 --- a/hcloud/zones/client.py +++ b/hcloud/zones/client.py @@ -367,7 +367,7 @@ def update_rrset_records( """ Updates records in a ZoneRRSet. - See https://docs.hetzner.cloud/reference/cloud#zone-rrset-actions-update-records-to-an-rrset + See https://docs.hetzner.cloud/reference/cloud#zone-rrset-actions-update-records-of-an-rrset :param rrset: RRSet to update. :param records: Records to update in the RRSet. @@ -508,7 +508,7 @@ def update_rrset_records( """ Updates records in a ZoneRRSet. - See https://docs.hetzner.cloud/reference/cloud#zone-rrset-actions-update-records-to-an-rrset + See https://docs.hetzner.cloud/reference/cloud#zone-rrset-actions-update-records-of-an-rrset :param records: Records to update in the RRSet. """ @@ -1215,7 +1215,7 @@ def update_rrset_records( """ Updates records in a ZoneRRSet. - See https://docs.hetzner.cloud/reference/cloud#zone-rrset-actions-update-records-to-an-rrset + See https://docs.hetzner.cloud/reference/cloud#zone-rrset-actions-update-records-of-an-rrset :param rrset: RRSet to update. :param records: Records to update in the RRSet.