mreg-api 0.2.1__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {mreg_api-0.2.1 → mreg_api-0.2.3}/CHANGELOG.md +16 -0
  2. {mreg_api-0.2.1 → mreg_api-0.2.3}/PKG-INFO +1 -1
  3. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/_version.py +3 -3
  4. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/endpoints.py +0 -1
  5. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/models.py +8 -8
  6. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/PKG-INFO +1 -1
  7. {mreg_api-0.2.1 → mreg_api-0.2.3}/.github/workflows/publish.yml +0 -0
  8. {mreg_api-0.2.1 → mreg_api-0.2.3}/.github/workflows/test.yml +0 -0
  9. {mreg_api-0.2.1 → mreg_api-0.2.3}/.gitignore +0 -0
  10. {mreg_api-0.2.1 → mreg_api-0.2.3}/.markdownlint.json +0 -0
  11. {mreg_api-0.2.1 → mreg_api-0.2.3}/.pre-commit-config.yaml +0 -0
  12. {mreg_api-0.2.1 → mreg_api-0.2.3}/LICENSE +0 -0
  13. {mreg_api-0.2.1 → mreg_api-0.2.3}/NOTES.md +0 -0
  14. {mreg_api-0.2.1 → mreg_api-0.2.3}/README.md +0 -0
  15. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/__about__.py +0 -0
  16. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/__init__.py +0 -0
  17. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/cache.py +0 -0
  18. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/client.py +0 -0
  19. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/events.py +0 -0
  20. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/exceptions.py +0 -0
  21. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/__init__.py +0 -0
  22. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/abstracts.py +0 -0
  23. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/fields.py +0 -0
  24. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/models/history.py +0 -0
  25. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/py.typed +0 -0
  26. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/types.py +0 -0
  27. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/utilities/__init__.py +0 -0
  28. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/utilities/fs.py +0 -0
  29. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api/utilities/shared.py +0 -0
  30. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/SOURCES.txt +0 -0
  31. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/dependency_links.txt +0 -0
  32. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/requires.txt +0 -0
  33. {mreg_api-0.2.1 → mreg_api-0.2.3}/mreg_api.egg-info/top_level.txt +0 -0
  34. {mreg_api-0.2.1 → mreg_api-0.2.3}/pyproject.toml +0 -0
  35. {mreg_api-0.2.1 → mreg_api-0.2.3}/setup.cfg +0 -0
  36. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/__init__.py +0 -0
  37. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/conftest.py +0 -0
  38. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/__init__.py +0 -0
  39. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/test_fields.py +0 -0
  40. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/test_history.py +0 -0
  41. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/models/test_models.py +0 -0
  42. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_cache.py +0 -0
  43. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_client.py +0 -0
  44. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_events.py +0 -0
  45. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_exceptions.py +0 -0
  46. {mreg_api-0.2.1 → mreg_api-0.2.3}/tests/test_types.py +0 -0
  47. {mreg_api-0.2.1 → mreg_api-0.2.3}/uv.lock +0 -0
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  <!-- ## Unreleased -->
9
9
 
10
+ ## [0.2.3](https://github.com/unioslo/mreg-api/releases/tag/0.2.3) - 2026-05-21
11
+
12
+ ### Fixed
13
+
14
+ - Fixed `NAPTR` fields missing defaults after removal of nullability.
15
+
16
+ ## [0.2.2](https://github.com/unioslo/mreg-api/releases/tag/0.2.2) - 2026-04-23
17
+
18
+ ### Changed
19
+
20
+ - Removed nullability of `NAPTR` fields.
21
+
22
+ ### Removed
23
+
24
+ - Duplicate endpoint `Endpoints.NAPTRs`. Now only `Endpoints.Naptrs` exists.
25
+
10
26
  ## [0.2.1](https://github.com/unioslo/mreg-api/releases/tag/0.2.1) - 2026-04-20
11
27
 
12
28
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mreg-api
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: MREG API
5
5
  Author-email: Terje Kvernes <terjekv@uio.no>
6
6
  Maintainer-email: Peder Hovdan Andresen <pederhan@uio.no>
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.2.1'
22
- __version_tuple__ = version_tuple = (0, 2, 1)
21
+ __version__ = version = '0.2.3'
22
+ __version_tuple__ = version_tuple = (0, 2, 3)
23
23
 
24
- __commit_id__ = commit_id = 'g9821c55c9'
24
+ __commit_id__ = commit_id = 'ga3717eba5'
@@ -23,7 +23,6 @@ class Endpoint(str, Enum):
23
23
  PTR_overrides = "/api/v1/ptroverrides/"
24
24
  Locs = "/api/v1/locs/"
25
25
  Mxs = "/api/v1/mxs/"
26
- NAPTRs = "/api/v1/naptrs/"
27
26
  Nameservers = "/api/v1/nameservers/"
28
27
 
29
28
  Hosts = "/api/v1/hosts/"
@@ -891,7 +891,7 @@ class Zone(FrozenModelWithTimestamps, WithTTL, APIMixin):
891
891
 
892
892
  self.ensure_delegation_in_zone(name)
893
893
  cls = Delegation.type_by_zone(self)
894
- resp = MregClient().get(cls.endpoint_with_id(self, name), ok404=True)
894
+ resp = MregClient().get(cls.endpoint_with_name(self, name), ok404=True)
895
895
  if not resp:
896
896
  return None
897
897
  return cls.model_validate_json(resp.text)
@@ -951,7 +951,7 @@ class Zone(FrozenModelWithTimestamps, WithTTL, APIMixin):
951
951
  # Check if delegation exists
952
952
  self.ensure_delegation_in_zone(name) # check name
953
953
  delegation = self.get_delegation_or_raise(name)
954
- resp = MregClient().delete(delegation.endpoint_with_id(self, name))
954
+ resp = MregClient().delete(delegation.endpoint_with_name(self, name))
955
955
  return resp.is_success if resp else False
956
956
 
957
957
  def set_delegation_comment(self, name: str, comment: str) -> None:
@@ -966,7 +966,7 @@ class Zone(FrozenModelWithTimestamps, WithTTL, APIMixin):
966
966
  delegation = self.get_delegation_or_raise(name)
967
967
  try:
968
968
  MregClient().patch(
969
- delegation.endpoint_with_id(self, delegation.name), json={"comment": comment}
969
+ delegation.endpoint_with_name(self, delegation.name), json={"comment": comment}
970
970
  )
971
971
  except PatchError as e:
972
972
  # TODO: implement after mreg-cli parity
@@ -1087,7 +1087,7 @@ class Delegation(FrozenModelWithTimestamps, WithZone):
1087
1087
  return Endpoint.ForwardZonesDelegations
1088
1088
 
1089
1089
  @classmethod
1090
- def endpoint_with_id(cls, zone: Zone, name: str) -> str:
1090
+ def endpoint_with_name(cls, zone: Zone, name: str) -> str:
1091
1091
  """Return the path to a delegation in a specific zone."""
1092
1092
  if cls.is_reverse():
1093
1093
  endpoint = Endpoint.ReverseZonesDelegationsZone
@@ -2603,9 +2603,9 @@ class NAPTR(FrozenModelWithTimestamps, WithHost, APIMixin):
2603
2603
  id: int # noqa: A003
2604
2604
  preference: int
2605
2605
  order: int
2606
- flag: str | None = None
2607
- service: str | None = None
2608
- regex: str | None = None
2606
+ flag: str = ""
2607
+ service: str = ""
2608
+ regex: str = ""
2609
2609
  replacement: str
2610
2610
 
2611
2611
  @classmethod
@@ -2614,7 +2614,7 @@ class NAPTR(FrozenModelWithTimestamps, WithHost, APIMixin):
2614
2614
  return Endpoint.Naptrs
2615
2615
 
2616
2616
  @classmethod
2617
- def headers(cls) -> list[str]:
2617
+ def headers(cls) -> list[str]: # TODO: remove. Move to mreg-cli
2618
2618
  """Return the headers for the NAPTR record."""
2619
2619
  return [
2620
2620
  "NAPTRs:",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mreg-api
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: MREG API
5
5
  Author-email: Terje Kvernes <terjekv@uio.no>
6
6
  Maintainer-email: Peder Hovdan Andresen <pederhan@uio.no>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes