nc-py-api 0.15.0__tar.gz → 0.15.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 (57) hide show
  1. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/CHANGELOG.md +7 -0
  2. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/PKG-INFO +1 -1
  3. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_session.py +3 -1
  4. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_version.py +1 -1
  5. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/misc.py +1 -1
  6. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/.gitignore +0 -0
  7. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/AUTHORS +0 -0
  8. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/LICENSE.txt +0 -0
  9. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/README.md +0 -0
  10. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/__init__.py +0 -0
  11. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_deffered_error.py +0 -0
  12. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_exceptions.py +0 -0
  13. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_misc.py +0 -0
  14. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_preferences.py +0 -0
  15. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_preferences_ex.py +0 -0
  16. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_talk_api.py +0 -0
  17. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/_theming.py +0 -0
  18. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/activity.py +0 -0
  19. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/apps.py +0 -0
  20. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/calendar.py +0 -0
  21. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/__init__.py +0 -0
  22. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/defs.py +0 -0
  23. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/events_listener.py +0 -0
  24. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/integration_fastapi.py +0 -0
  25. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/occ_commands.py +0 -0
  26. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/persist_transformers_cache.py +0 -0
  27. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/providers/__init__.py +0 -0
  28. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/providers/providers.py +0 -0
  29. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/providers/speech_to_text.py +0 -0
  30. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/providers/task_processing.py +0 -0
  31. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/providers/text_processing.py +0 -0
  32. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/providers/translations.py +0 -0
  33. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/ui/__init__.py +0 -0
  34. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/ui/files_actions.py +0 -0
  35. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/ui/resources.py +0 -0
  36. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/ui/settings.py +0 -0
  37. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/ui/top_menu.py +0 -0
  38. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/ui/ui.py +0 -0
  39. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/ex_app/uvicorn_fastapi.py +0 -0
  40. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/files/__init__.py +0 -0
  41. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/files/_files.py +0 -0
  42. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/files/files.py +0 -0
  43. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/files/files_async.py +0 -0
  44. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/files/sharing.py +0 -0
  45. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/loginflow_v2.py +0 -0
  46. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/nextcloud.py +0 -0
  47. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/notes.py +0 -0
  48. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/notifications.py +0 -0
  49. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/options.py +0 -0
  50. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/talk.py +0 -0
  51. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/talk_bot.py +0 -0
  52. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/user_status.py +0 -0
  53. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/users.py +0 -0
  54. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/users_groups.py +0 -0
  55. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/weather_status.py +0 -0
  56. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/nc_py_api/webhooks.py +0 -0
  57. {nc_py_api-0.15.0 → nc_py_api-0.15.1}/pyproject.toml +0 -0
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.15.1 - 2024-07-30]
6
+
7
+ ### Fixed
8
+
9
+ - Corrected behaviour of `ocs` function for `Group Folders` app routes(they are not fully OCS API). #279
10
+ - NextcloudApp: `get_computation_device` function now correctly returns result in upper_case. #278
11
+
5
12
  ## [0.15.0 - 2024-07-19]
6
13
 
7
14
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nc-py-api
3
- Version: 0.15.0
3
+ Version: 0.15.1
4
4
  Summary: Nextcloud Python Framework
5
5
  Project-URL: Changelog, https://github.com/cloud-py-api/nc_py_api/blob/main/CHANGELOG.md
6
6
  Project-URL: Documentation, https://cloud-py-api.github.io/nc_py_api/
@@ -150,7 +150,7 @@ class NcSessionBase(ABC):
150
150
  self.init_adapter()
151
151
  self.init_adapter_dav()
152
152
  self.response_headers = Headers()
153
- self._ocs_regexp = re.compile(r"/ocs/v[12]\.php/")
153
+ self._ocs_regexp = re.compile(r"/ocs/v[12]\.php/|/apps/groupfolders/")
154
154
 
155
155
  def init_adapter(self, restart=False) -> None:
156
156
  if getattr(self, "adapter", None) is None or restart:
@@ -289,6 +289,7 @@ class NcSessionBasic(NcSessionBase, ABC):
289
289
  str_url = str(request.url)
290
290
  if re.search(self._ocs_regexp, str_url) is not None: # this is OCS call
291
291
  request.url = request.url.copy_merge_params({"format": "json"})
292
+ request.headers["Accept"] = "application/json"
292
293
 
293
294
  def _response_event(self, response: Response) -> None:
294
295
  str_url = str(response.request.url)
@@ -412,6 +413,7 @@ class AsyncNcSessionBasic(NcSessionBase, ABC):
412
413
  str_url = str(request.url)
413
414
  if re.search(self._ocs_regexp, str_url) is not None: # this is OCS call
414
415
  request.url = request.url.copy_merge_params({"format": "json"})
416
+ request.headers["Accept"] = "application/json"
415
417
 
416
418
  async def _response_event(self, response: Response) -> None:
417
419
  str_url = str(response.request.url)
@@ -1,3 +1,3 @@
1
1
  """Version of nc_py_api."""
2
2
 
3
- __version__ = "0.15.0"
3
+ __version__ = "0.15.1"
@@ -54,4 +54,4 @@ def get_model_path(model_name: str) -> str:
54
54
 
55
55
  def get_computation_device() -> str:
56
56
  """Returns computation device(`ROCM` or `CUDA`) if it is defined in the environment variable."""
57
- return os.environ.get("COMPUTE_DEVICE", "")
57
+ return str(os.environ.get("COMPUTE_DEVICE", "")).upper()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes