Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion odev/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# or merged change.
# ------------------------------------------------------------------------------

__version__ = "4.27.0"
__version__ = "4.27.1"

Check failure on line 25 in odev/_version.py

View workflow job for this annotation

GitHub Actions / version-bump

Version Update Not Incremental

The new version value does not follow the incremental pattern (e.g: 1.2.3 -> 1.2.4 or 1.3.0 or 2.0.0). Please update incrementally the __version__ value on odev/_version.py
14 changes: 13 additions & 1 deletion odev/common/connectors/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _request(
@abstractmethod
def request(
self,
method: Literal["GET"] | Literal["POST"],
method: Literal["GET", "POST", "HEAD"],
path: str,
authenticate: bool = True,
params: dict | None = None,
Expand Down Expand Up @@ -348,6 +348,18 @@ def post(self, path: str, params: dict | None = None, authenticate: bool = True,
"""
return self.request("POST", path, params=params, authenticate=authenticate, **kwargs)

def head(self, path: str, params: dict | None = None, authenticate: bool = True, **kwargs) -> Response:
"""Perform a HEAD request to the endpoint.
Authentication is handled automatically using the Odoo credentials stored in the secrets vault.

:param path: The path to the resource.
:param params: The parameters to pass to the request.
:param kwargs: Additional keyword arguments to pass to the request.
:return: The response from the endpoint.
:rtype: requests.Response
"""
return self.request("HEAD", path, params=params, authenticate=authenticate, **kwargs)

def download(self, path: str, file_path: Path, progress_message: str = "Downloading", **kwargs) -> Path:
"""Download a file from the endpoint.

Expand Down
2 changes: 1 addition & 1 deletion odev/common/databases/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def venv(self) -> PythonEnv:
if self._venv is None:
info = self.store.databases.get(self)

if info is None:
if info is None or not info.virtualenv:
if self.version is None:
return PythonEnv()

Expand Down
Loading