scim2-client 0.3.0__tar.gz → 0.3.1__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 (35) hide show
  1. {scim2_client-0.3.0 → scim2_client-0.3.1}/PKG-INFO +1 -1
  2. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/changelog.rst +7 -0
  3. {scim2_client-0.3.0 → scim2_client-0.3.1}/pyproject.toml +1 -1
  4. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/client.py +2 -2
  5. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/errors.py +4 -10
  6. {scim2_client-0.3.0 → scim2_client-0.3.1}/uv.lock +1 -1
  7. {scim2_client-0.3.0 → scim2_client-0.3.1}/.github/FUNDING.yml +0 -0
  8. {scim2_client-0.3.0 → scim2_client-0.3.1}/.github/workflows/release.yml +0 -0
  9. {scim2_client-0.3.0 → scim2_client-0.3.1}/.github/workflows/tests.yaml +0 -0
  10. {scim2_client-0.3.0 → scim2_client-0.3.1}/.gitignore +0 -0
  11. {scim2_client-0.3.0 → scim2_client-0.3.1}/.pre-commit-config.yaml +0 -0
  12. {scim2_client-0.3.0 → scim2_client-0.3.1}/.readthedocs.yml +0 -0
  13. {scim2_client-0.3.0 → scim2_client-0.3.1}/LICENSE.md +0 -0
  14. {scim2_client-0.3.0 → scim2_client-0.3.1}/README.md +0 -0
  15. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/__init__.py +0 -0
  16. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/conf.py +0 -0
  17. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/contributing.rst +0 -0
  18. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/index.rst +0 -0
  19. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/reference.rst +0 -0
  20. {scim2_client-0.3.0 → scim2_client-0.3.1}/doc/tutorial.rst +0 -0
  21. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/__init__.py +0 -0
  22. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/engines/__init__.py +0 -0
  23. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/engines/httpx.py +0 -0
  24. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/engines/werkzeug.py +0 -0
  25. {scim2_client-0.3.0 → scim2_client-0.3.1}/scim2_client/py.typed +0 -0
  26. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/__init__.py +0 -0
  27. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/engines/__init__.py +0 -0
  28. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/engines/test_httpx.py +0 -0
  29. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/engines/test_werkzeug.py +0 -0
  30. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/test_create.py +0 -0
  31. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/test_delete.py +0 -0
  32. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/test_query.py +0 -0
  33. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/test_replace.py +0 -0
  34. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/test_search.py +0 -0
  35. {scim2_client-0.3.0 → scim2_client-0.3.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: scim2-client
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Pythonically build SCIM requests and parse SCIM responses
5
5
  Project-URL: documentation, https://scim2-client.readthedocs.io
6
6
  Project-URL: repository, https://github.com/python-scim/scim2-client
@@ -1,6 +1,13 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ [0.3.1] - 2024-11-29
5
+ --------------------
6
+
7
+ Fixed
8
+ ^^^^^
9
+ - Some variables were missing from the SCIM exception classes.
10
+
4
11
  [0.3.0] - 2024-11-29
5
12
  --------------------
6
13
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "scim2-client"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Pythonically build SCIM requests and parse SCIM responses"
9
9
  authors = [{name="Yaal Coop", email="contact@yaal.coop"}]
10
10
  license = {file = "LICENSE.md"}
@@ -174,7 +174,7 @@ class BaseSCIMClient:
174
174
  scim_ctx: Optional[Context] = None,
175
175
  ) -> Union[Error, None, dict, type[Resource]]:
176
176
  if expected_status_codes and status_code not in expected_status_codes:
177
- raise UnexpectedStatusCode()
177
+ raise UnexpectedStatusCode(status_code)
178
178
 
179
179
  # Interoperability considerations: The "application/scim+json" media
180
180
  # type is intended to identify JSON structure data that conforms to
@@ -207,7 +207,7 @@ class BaseSCIMClient:
207
207
  ):
208
208
  error = Error.model_validate(response_payload)
209
209
  if raise_scim_errors:
210
- raise SCIMResponseErrorObject(source=error)
210
+ raise SCIMResponseErrorObject(obj=error.detail, source=error)
211
211
  return error
212
212
 
213
213
  if not expected_types:
@@ -69,12 +69,9 @@ class SCIMResponseErrorObject(SCIMResponseError):
69
69
  Those errors are only raised when the :code:`raise_scim_errors` parameter is :data:`True`.
70
70
  """
71
71
 
72
- def __init__(self, *args, **kwargs):
72
+ def __init__(self, obj, *args, **kwargs):
73
73
  message = kwargs.pop(
74
- "message",
75
- f"The server returned a SCIM Error object: {kwargs['source'].detail}"
76
- if kwargs.get("source")
77
- else "The server returned a SCIM Error object",
74
+ "message", f"The server returned a SCIM Error object: {obj}"
78
75
  )
79
76
  super().__init__(message, *args, **kwargs)
80
77
 
@@ -82,12 +79,9 @@ class SCIMResponseErrorObject(SCIMResponseError):
82
79
  class UnexpectedStatusCode(SCIMResponseError):
83
80
  """Error raised when a server returned an unexpected status code for a given :class:`~scim2_models.Context`."""
84
81
 
85
- def __init__(self, *args, **kwargs):
82
+ def __init__(self, status_code: int, *args, **kwargs):
86
83
  message = kwargs.pop(
87
- "message",
88
- f"Unexpected response status code: {kwargs['source'].status_code}"
89
- if kwargs.get("source")
90
- else "Unexpected response status code",
84
+ "message", f"Unexpected response status code: {status_code}"
91
85
  )
92
86
  super().__init__(message, *args, **kwargs)
93
87
 
@@ -984,7 +984,7 @@ wheels = [
984
984
 
985
985
  [[package]]
986
986
  name = "scim2-client"
987
- version = "0.2.2"
987
+ version = "0.3.0"
988
988
  source = { editable = "." }
989
989
  dependencies = [
990
990
  { name = "scim2-models" },
File without changes
File without changes
File without changes
File without changes
File without changes