Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-oras for openSUSE:Factory 
checked in at 2026-11-25 16:13:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oras (Old)
 and      /work/SRC/openSUSE:Factory/.python-oras.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oras"

Wed Nov 25 16:13:59 2026 rev:5 rq:1400507 version:0.2.44

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oras/python-oras.changes  2026-08-11 
17:15:30.001887238 +0200
+++ /work/SRC/openSUSE:Factory/.python-oras.new.1340718/python-oras.changes     
2026-11-25 16:16:07.231441208 +0100
@@ -1,0 +2,16 @@
+Wed Nov 18 08:21:41 UTC 2026 - Johannes Kastl 
<[email protected]>
+
+- update to 0.2.44:
+  * If failed to get credential - inform on what input, and use
+    stdout if no stderr in #221
+  * [tributors] contributors/update-2026-08-21 in #251
+  * docs: replace references to the removed client.remote attribute
+    in #258
+  * fix: make login() username and password optional in #257
+  * [tributors] contributors/update-2026-09-29 in #263
+  * Fix temporary archive cleanup when pulling directories in #254
+  * [tributors] contributors/update-2026-10-02 in #264
+  * fix: raise an informative error for a non-JSON manifest
+    response in #268
+
+-------------------------------------------------------------------

Old:
----
  oras-0.2.43.tar.gz

New:
----
  oras-0.2.44.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-oras.spec ++++++
--- /var/tmp/diff_new_pack.3Ba5OF/_old  2026-11-25 16:16:07.988473305 +0100
+++ /var/tmp/diff_new_pack.3Ba5OF/_new  2026-11-25 16:16:07.990473390 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-oras
-Version:        0.2.43
+Version:        0.2.44
 Release:        0
 Summary:        OCI Registry as Storage Python SDK
 License:        Apache-2.0

++++++ oras-0.2.43.tar.gz -> oras-0.2.44.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/PKG-INFO new/oras-0.2.44/PKG-INFO
--- old/oras-0.2.43/PKG-INFO    2026-08-08 17:45:51.499518400 +0200
+++ new/oras-0.2.44/PKG-INFO    2026-11-18 06:08:06.641776300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: oras
-Version: 0.2.43
+Version: 0.2.44
 Summary: OCI Registry as Storage Python SDK
 Home-page: https://github.com/oras-project/oras-py
 Author: Vanessa Sochat
@@ -50,7 +50,7 @@
 # ORAS Python
 
 <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
-[![All 
Contributors](https://img.shields.io/badge/all_contributors-35-orange.svg?style=flat-square)](#contributors-)
+[![All 
Contributors](https://img.shields.io/badge/all_contributors-38-orange.svg?style=flat-square)](#contributors-)
 <!-- ALL-CONTRIBUTORS-BADGE:END -->
 
 ![ORAS 
Logo](https://raw.githubusercontent.com/oras-project/oras-www/main/static/img/oras.png)
@@ -130,6 +130,11 @@
       <td align="center" valign="top" width="14.28%"><a 
href="https://crosscat.me";><img 
src="https://avatars.githubusercontent.com/u/39812919?v=4?s=100"; width="100px;" 
alt="Isabella Basso"/><br /><sub><b>Isabella Basso</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=antisaling"; 
title="Code">💻</a></td>
       <td align="center" valign="top" width="14.28%"><a 
href="https://github.com/ianpittwood";><img 
src="https://avatars.githubusercontent.com/u/9877347?v=4?s=100"; width="100px;" 
alt="Ian Pittwood"/><br /><sub><b>Ian Pittwood</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=ianpittwood"; 
title="Code">💻</a></td>
     </tr>
+    <tr>
+      <td align="center" valign="top" width="14.28%"><a 
href="https://github.com/tomatotomata";><img 
src="https://avatars.githubusercontent.com/u/170848582?v=4?s=100"; 
width="100px;" alt="tomatotomata"/><br /><sub><b>tomatotomata</b></sub></a><br 
/><a href="https://github.com/oras-project/oras-py/commits?author=tomatotomata"; 
title="Code">💻</a></td>
+      <td align="center" valign="top" width="14.28%"><a 
href="www.oneukrainian.com"><img 
src="https://avatars.githubusercontent.com/u/39889?v=4?s=100"; width="100px;" 
alt="Yaroslav Halchenko"/><br /><sub><b>Yaroslav Halchenko</b></sub></a><br 
/><a href="https://github.com/oras-project/oras-py/commits?author=yarikoptic"; 
title="Code">💻</a></td>
+      <td align="center" valign="top" width="14.28%"><a 
href="https://shubham-portfolio-gray-kappa.vercel.app/";><img 
src="https://avatars.githubusercontent.com/u/177908686?v=4?s=100"; 
width="100px;" alt="Shubham Padkonde"/><br /><sub><b>Shubham 
Padkonde</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=Shubham-Padkonde"; 
title="Code">💻</a></td>
+    </tr>
   </tbody>
 </table>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/README.md new/oras-0.2.44/README.md
--- old/oras-0.2.43/README.md   2026-08-08 17:45:32.000000000 +0200
+++ new/oras-0.2.44/README.md   2026-11-18 06:07:53.000000000 +0100
@@ -1,7 +1,7 @@
 # ORAS Python
 
 <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
-[![All 
Contributors](https://img.shields.io/badge/all_contributors-35-orange.svg?style=flat-square)](#contributors-)
+[![All 
Contributors](https://img.shields.io/badge/all_contributors-38-orange.svg?style=flat-square)](#contributors-)
 <!-- ALL-CONTRIBUTORS-BADGE:END -->
 
 ![ORAS 
Logo](https://raw.githubusercontent.com/oras-project/oras-www/main/static/img/oras.png)
@@ -81,6 +81,11 @@
       <td align="center" valign="top" width="14.28%"><a 
href="https://crosscat.me";><img 
src="https://avatars.githubusercontent.com/u/39812919?v=4?s=100"; width="100px;" 
alt="Isabella Basso"/><br /><sub><b>Isabella Basso</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=antisaling"; 
title="Code">💻</a></td>
       <td align="center" valign="top" width="14.28%"><a 
href="https://github.com/ianpittwood";><img 
src="https://avatars.githubusercontent.com/u/9877347?v=4?s=100"; width="100px;" 
alt="Ian Pittwood"/><br /><sub><b>Ian Pittwood</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=ianpittwood"; 
title="Code">💻</a></td>
     </tr>
+    <tr>
+      <td align="center" valign="top" width="14.28%"><a 
href="https://github.com/tomatotomata";><img 
src="https://avatars.githubusercontent.com/u/170848582?v=4?s=100"; 
width="100px;" alt="tomatotomata"/><br /><sub><b>tomatotomata</b></sub></a><br 
/><a href="https://github.com/oras-project/oras-py/commits?author=tomatotomata"; 
title="Code">💻</a></td>
+      <td align="center" valign="top" width="14.28%"><a 
href="www.oneukrainian.com"><img 
src="https://avatars.githubusercontent.com/u/39889?v=4?s=100"; width="100px;" 
alt="Yaroslav Halchenko"/><br /><sub><b>Yaroslav Halchenko</b></sub></a><br 
/><a href="https://github.com/oras-project/oras-py/commits?author=yarikoptic"; 
title="Code">💻</a></td>
+      <td align="center" valign="top" width="14.28%"><a 
href="https://shubham-portfolio-gray-kappa.vercel.app/";><img 
src="https://avatars.githubusercontent.com/u/177908686?v=4?s=100"; 
width="100px;" alt="Shubham Padkonde"/><br /><sub><b>Shubham 
Padkonde</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=Shubham-Padkonde"; 
title="Code">💻</a></td>
+    </tr>
   </tbody>
 </table>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/oras/auth/base.py 
new/oras-0.2.44/oras/auth/base.py
--- old/oras-0.2.43/oras/auth/base.py   2026-08-08 17:45:32.000000000 +0200
+++ new/oras-0.2.44/oras/auth/base.py   2026-11-18 06:07:53.000000000 +0100
@@ -66,10 +66,11 @@
 
     def _get_auth_from_creds_store(self, suffix: str, hostname: str) -> 
Optional[str]:
         binary = f"docker-credential-{suffix}"
+        stdin = hostname
         try:
             proc = subprocess.run(
                 [binary, "get"],
-                input=hostname.encode(),
+                input=stdin.encode(),
                 stdout=subprocess.PIPE,
                 stderr=subprocess.PIPE,
                 check=True,
@@ -79,7 +80,8 @@
             return None
         except subprocess.CalledProcessError as exc:
             logger.warning(
-                f"Credential helper '{binary}' failed: 
{exc.stderr.decode().strip()}"
+                f"Credential helper '{binary}' for {stdin!r} failed: "
+                f"{(exc.stderr or exc.stdout).decode().strip()}"
             )
             return None
         payload = json.loads(proc.stdout)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/oras/provider.py 
new/oras-0.2.44/oras/provider.py
--- old/oras-0.2.43/oras/provider.py    2026-08-08 17:45:32.000000000 +0200
+++ new/oras-0.2.44/oras/provider.py    2026-11-18 06:07:53.000000000 +0100
@@ -3,6 +3,7 @@
 __license__ = "Apache-2.0"
 
 import copy
+import getpass
 import os
 import sys
 import urllib
@@ -36,6 +37,13 @@
         yield config_file
 
 
+@contextmanager
+def temporary_archive(source: str) -> Generator[str, None, None]:
+    with TemporaryDirectory() as tmpdir:
+        archive = os.path.join(tmpdir, "archive.tar.gz")
+        yield oras.utils.make_targz(source, archive)
+
+
 class Registry:
     """
     Direct interactions with an OCI registry.
@@ -143,8 +151,8 @@
 
     def login(
         self,
-        username: str,
-        password: str,
+        username: Optional[str] = None,
+        password: Optional[str] = None,
         password_stdin: bool = False,
         tls_verify: bool = True,
         hostname: Optional[str] = None,
@@ -153,21 +161,22 @@
         """
         Login to a registry.
 
-        :param username: the user account name
-        :type username: str
-        :param password: the user account password
-        :type password: str
+        :param username: the user account name, prompted for if not provided
+        :type username: Optional[str]
+        :param password: the user account password, prompted for if not 
provided
+        :type password: Optional[str]
         :param password_stdin: get the password from standard input
         :type password_stdin: bool
-        :param insecure: use http instead of https
-        :type insecure: bool
         :param tls_verify: verify tls
         :type tls_verify: bool
         :param hostname: the hostname to login to
-        :type hostname: str
+        :type hostname: Optional[str]
         :param config_path: custom config path to add credentials to
-        :type config_path: str
+        :type config_path: Optional[str]
         """
+        if password_stdin and not username:
+            raise ValueError("username is required when password_stdin is set")
+
         # Read password from stdin
         if password_stdin:
             password = oras.utils.readline()
@@ -175,17 +184,15 @@
         # No username, try to get from stdin
         if not username:
             username = input("Username: ")
+            if not username:
+                raise ValueError("username required")
 
         # No password provided
         if not password:
-            password = input("Password: ")
+            password = getpass.getpass("Password: ")
             if not password:
                 raise ValueError("password required")
 
-        # Cut out early if we didn't get what we need
-        if not password or not username:
-            return {"Login": "Not successful"}
-
         # Set basic auth for the auth client
         self.auth.set_basic_auth(username, password)
 
@@ -789,39 +796,32 @@
             blob_name = os.path.basename(blob)
 
             # If it's a directory, we need to compress
-            cleanup_blob = False
-            if os.path.isdir(blob):
-                blob = oras.utils.make_targz(blob)
-                cleanup_blob = True
-
-            # Create a new layer from the blob
-            layer = oras.oci.NewLayer(blob, is_dir=cleanup_blob, 
media_type=media_type)
-            annotations = annotset.get_annotations(blob)
-
-            # Always strip blob_name of path separator
-            layer["annotations"] = {
-                oras.defaults.annotation_title: blob_name.strip(os.sep)
-            }
-            if annotations:
-                layer["annotations"].update(annotations)
-
-            # update the manifest with the new layer
-            manifest["layers"].append(layer)
-            logger.debug(f"Preparing layer {layer}")
-
-            # Upload the blob layer
-            response = self.upload_blob(
-                blob,
-                container,
-                layer,
-                do_chunked=do_chunked,
-                chunk_size=chunk_size,
-            )
-            self._check_200_response(response)
+            is_dir = os.path.isdir(blob)
+            with temporary_archive(blob) if is_dir else nullcontext(blob) as 
blob:
+                # Create a new layer from the blob
+                layer = oras.oci.NewLayer(blob, is_dir=is_dir, 
media_type=media_type)
+                annotations = annotset.get_annotations(blob)
+
+                # Always strip blob_name of path separator
+                layer["annotations"] = {
+                    oras.defaults.annotation_title: blob_name.strip(os.sep)
+                }
+                if annotations:
+                    layer["annotations"].update(annotations)
 
-            # Do we need to cleanup a temporary targz?
-            if cleanup_blob and os.path.exists(blob):
-                os.remove(blob)
+                # update the manifest with the new layer
+                manifest["layers"].append(layer)
+                logger.debug(f"Preparing layer {layer}")
+
+                # Upload the blob layer
+                response = self.upload_blob(
+                    blob,
+                    container,
+                    layer,
+                    do_chunked=do_chunked,
+                    chunk_size=chunk_size,
+                )
+                self._check_200_response(response)
 
         # Add annotations to the manifest, if provided
         manifest_annots = annotset.get_annotations("$manifest") or {}
@@ -923,11 +923,12 @@
 
             # A directory will need to be uncompressed and moved
             if layer["mediaType"] == oras.defaults.default_blob_dir_media_type:
-                targz = oras.utils.get_tmpfile(suffix=".tar.gz")
-                self.download_blob(container, layer["digest"], targz)
+                with TemporaryDirectory() as tmpdir:
+                    targz = oras.utils.get_tmpfile(tmpdir=tmpdir, 
suffix=".tar.gz")
+                    self.download_blob(container, layer["digest"], targz)
 
-                # The artifact will be extracted to the correct name
-                oras.utils.extract_targz(targz, os.path.dirname(outfile))
+                    # The artifact will be extracted to the correct name
+                    oras.utils.extract_targz(targz, os.path.dirname(outfile))
 
             # Anything else just extracted directly
             else:
@@ -965,7 +966,17 @@
         response = self.do_request(get_manifest, "GET", headers=headers)
 
         self._check_200_response(response)
-        manifest = response.json()
+        try:
+            manifest = response.json()
+        # json()'s decode error subclasses ValueError across the requests,
+        # simplejson and stdlib json variants, so catch the common base.
+        except ValueError as e:
+            raise ValueError(
+                f"Could not parse the manifest from {get_manifest} as JSON "
+                f"(status {response.status_code}, Content-Type "
+                f"{response.headers.get('Content-Type', 'unknown')}). "
+                f"Response body starts with: {response.text[:200]!r}"
+            ) from e
         if validation_schema:
             jsonschema.validate(manifest, schema=validation_schema)
         return manifest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/oras/tests/test_provider.py 
new/oras-0.2.44/oras/tests/test_provider.py
--- old/oras-0.2.43/oras/tests/test_provider.py 2026-08-08 17:45:32.000000000 
+0200
+++ new/oras-0.2.44/oras/tests/test_provider.py 2026-11-18 06:07:53.000000000 
+0100
@@ -2,12 +2,17 @@
 __copyright__ = "Copyright The ORAS Authors."
 __license__ = "Apache-2.0"
 
+import json
 import os
+import shutil
 import subprocess
+import tarfile
+import tempfile
 from pathlib import Path
 from unittest.mock import Mock
 
 import pytest
+import requests
 
 import oras.client
 import oras.defaults
@@ -18,6 +23,121 @@
 here = Path(__file__).resolve().parent
 
 
[email protected](
+    "outcome", ["success", "compression_error", "upload_error", "http_error"]
+)
+def test_push_cleans_temporary_archive(tmp_path, monkeypatch, outcome):
+    client = oras.provider.Registry(hostname="registry.example", insecure=True)
+    artifact = tmp_path / "artifact"
+    artifact.mkdir()
+    (artifact / "content.txt").write_text("artifact contents")
+    temporary_root = tmp_path / "temporary"
+    temporary_root.mkdir()
+    monkeypatch.setattr(tempfile, "tempdir", str(temporary_root))
+    monkeypatch.setattr(client.auth, "load_configs", lambda *args, **kwargs: 
None)
+    archives = []
+    make_targz = oras.utils.make_targz
+
+    def compress(source, destination=None):
+        archive = make_targz(source, destination)
+        archives.append(Path(archive))
+        if outcome == "compression_error":
+            raise OSError("compression interrupted")
+        return archive
+
+    def upload_blob(path, container, layer, **kwargs):
+        if (
+            layer.get("annotations", {}).get(oras.defaults.annotation_title)
+            == artifact.name
+        ):
+            with tarfile.open(path) as archive:
+                assert (
+                    archive.extractfile("artifact/content.txt").read()
+                    == b"artifact contents"
+                )
+            if outcome == "upload_error":
+                raise OSError("upload interrupted")
+            if outcome == "http_error":
+                return Mock(status_code=500)
+        return Mock(status_code=201)
+
+    monkeypatch.setattr(oras.utils, "make_targz", compress)
+    monkeypatch.setattr(client, "upload_blob", upload_blob)
+    monkeypatch.setattr(client, "upload_manifest", lambda *args: 
Mock(status_code=201))
+    if outcome == "success":
+        client.push(
+            "registry.example/repository:tag",
+            files=[artifact],
+            disable_path_validation=True,
+        )
+    else:
+        error = ValueError if outcome == "http_error" else OSError
+        with pytest.raises(error):
+            client.push(
+                "registry.example/repository:tag",
+                files=[artifact],
+                disable_path_validation=True,
+            )
+    assert len(archives) == 1
+    assert not archives[0].exists()
+    assert list(temporary_root.iterdir()) == []
+    assert (artifact / "content.txt").read_text() == "artifact contents"
+
+
[email protected]("use_default_outdir", [False, True])
[email protected]("outcome", ["success", "download_error", 
"invalid_archive"])
+def test_pull_cleans_temporary_archive(
+    tmp_path, monkeypatch, use_default_outdir, outcome
+):
+    client = oras.provider.Registry(hostname="registry.example", insecure=True)
+
+    # Archive and describe a directory the same way push does.
+    target = "registry.example/repository:tag"
+    content_name = "content.txt"
+    content = "artifact contents"
+    artifact = tmp_path / "source" / "artifact"
+    artifact.mkdir(parents=True)
+    (artifact / content_name).write_text(content)
+    archive = oras.utils.make_targz(str(artifact), str(tmp_path / 
"artifact.tar.gz"))
+    layer = oras.oci.NewLayer(archive, is_dir=True)
+    layer["annotations"] = {oras.defaults.annotation_title: artifact.name}
+
+    temporary_root = tmp_path / "temporary"
+    temporary_root.mkdir()
+    monkeypatch.setattr(tempfile, "tempdir", str(temporary_root))
+    monkeypatch.setattr(client.auth, "load_configs", lambda *args, **kwargs: 
None)
+    monkeypatch.setattr(client, "get_manifest", lambda *args: {"layers": 
[layer]})
+    downloads = []
+
+    def download_blob(container, digest, destination):
+        assert digest == layer["digest"]
+        downloads.append(Path(destination))
+        if outcome == "download_error":
+            Path(destination).write_bytes(b"partial download")
+            raise OSError("download interrupted")
+        if outcome == "invalid_archive":
+            Path(destination).write_bytes(b"invalid archive")
+            return
+        shutil.copyfile(archive, destination)
+
+    monkeypatch.setattr(client, "download_blob", download_blob)
+    outdir = None if use_default_outdir else str(tmp_path / "output")
+    if outcome == "success":
+        files = client.pull(target, outdir=outdir)
+        assert len(files) == 1
+        assert (Path(files[0]) / content_name).read_text() == content
+    else:
+        error = OSError if outcome == "download_error" else tarfile.ReadError
+        with pytest.raises(error):
+            client.pull(target, outdir=outdir)
+
+    assert len(downloads) == 1
+    assert not downloads[0].exists()
+    assert not downloads[0].parent.exists()
+    # Only the caller's implicit output directory should survive the pull.
+    assert len(list(temporary_root.iterdir())) == int(use_default_outdir)
+
+
 def test_push_quiet_output_does_not_write_stdout(tmp_path, monkeypatch, 
capsys):
     client = oras.provider.Registry(hostname="registry.example", insecure=True)
     artifact = tmp_path / "artifact.txt"
@@ -46,6 +166,85 @@
     info.assert_called_once_with(f"Successfully pushed {container}")
 
 
[email protected]("backend", ["docker", "fallback"])
[email protected]("password_source", ["prompt", "argument", "stdin"])
+def test_login_prompts_for_missing_credentials(monkeypatch, backend, 
password_source):
+    client = oras.provider.Registry(hostname="registry.example", insecure=True)
+    username_prompt = Mock(return_value="alice")
+    password_prompt = Mock(return_value="secret")
+    stdin = Mock(return_value="secret")
+    monkeypatch.setattr("builtins.input", username_prompt)
+    monkeypatch.setattr(oras.provider.getpass, "getpass", password_prompt)
+    monkeypatch.setattr(oras.utils, "readline", stdin)
+    set_basic_auth = Mock()
+    monkeypatch.setattr(client.auth, "set_basic_auth", set_basic_auth)
+    docker_client = Mock()
+    docker_client.login.return_value = {"Status": "Login Succeeded"}
+    get_client = Mock(return_value=docker_client)
+    if backend == "fallback":
+        get_client.side_effect = RuntimeError("Docker unavailable")
+        monkeypatch.setattr(oras.provider.login, "DockerClient", lambda: 
docker_client)
+    monkeypatch.setattr(oras.utils, "get_docker_client", get_client)
+
+    kwargs = {}
+    if password_source == "argument":
+        kwargs["password"] = "secret"
+    elif password_source == "stdin":
+        kwargs["password_stdin"] = True
+    if password_source == "stdin":
+        kwargs["username"] = "alice"
+    result = client.login(hostname="registry.example", **kwargs)
+
+    assert result == {"Status": "Login Succeeded"}
+    if password_source == "stdin":
+        username_prompt.assert_not_called()
+    else:
+        username_prompt.assert_called_once_with("Username: ")
+    if password_source == "prompt":
+        password_prompt.assert_called_once_with("Password: ")
+    else:
+        password_prompt.assert_not_called()
+    if password_source == "stdin":
+        stdin.assert_called_once_with()
+    else:
+        stdin.assert_not_called()
+    set_basic_auth.assert_called_once_with("alice", "secret")
+    docker_client.login.assert_called_once_with(
+        username="alice",
+        password="secret",
+        registry="registry.example",
+        dockercfg_path=None,
+    )
+
+
[email protected]("username", [None, ""])
+def test_login_stdin_requires_username(monkeypatch, username):
+    client = oras.provider.Registry()
+    stdin = Mock()
+    prompt = Mock()
+    get_client = Mock()
+    monkeypatch.setattr(oras.utils, "readline", stdin)
+    monkeypatch.setattr("builtins.input", prompt)
+    monkeypatch.setattr(oras.utils, "get_docker_client", get_client)
+    with pytest.raises(
+        ValueError, match="username is required when password_stdin is set"
+    ):
+        client.login(username=username, password_stdin=True)
+    stdin.assert_not_called()
+    prompt.assert_not_called()
+    get_client.assert_not_called()
+
+
+def test_login_rejects_empty_prompted_username(monkeypatch):
+    client = oras.provider.Registry()
+    monkeypatch.setattr("builtins.input", lambda prompt: "")
+    get_client = Mock()
+    monkeypatch.setattr(oras.utils, "get_docker_client", get_client)
+    with pytest.raises(ValueError, match="username required"):
+        client.login(password="secret", hostname="registry.example")
+    get_client.assert_not_called()
+
+
 def test_push_quiet_suppresses_completion_message(tmp_path, monkeypatch):
     client = oras.provider.Registry(hostname="registry.example", insecure=True)
     artifact = tmp_path / "artifact.txt"
@@ -297,3 +496,37 @@
         str(e.value)
         == f"Filename {Path(os.path.join(os.getcwd(), '..', '..')).resolve()} 
is not in {Path('../').resolve()} directory"
     )
+
+
[email protected](
+    "decode_error",
+    [
+        # requests >= 2.27 raises its own subclass; older requests (and
+        # simplejson) raise the stdlib one. Both must be handled.
+        requests.exceptions.JSONDecodeError("Expecting value", "", 0),
+        json.JSONDecodeError("Expecting value", "", 0),
+    ],
+)
+def test_get_manifest_non_json_response(monkeypatch, decode_error):
+    """A non-JSON manifest body raises an informative error, not a raw
+    JSONDecodeError (#223)."""
+    client = oras.provider.Registry(hostname="registry.example", insecure=True)
+    monkeypatch.setattr(client.auth, "load_configs", lambda *args, **kwargs: 
None)
+
+    response = Mock(spec=requests.Response)
+    response.status_code = 200
+    response.headers = {"Content-Type": "text/html"}
+    response.text = "<html><body>502 Bad Gateway</body></html>"
+    response.json.side_effect = decode_error
+    monkeypatch.setattr(client, "do_request", lambda *args, **kwargs: response)
+
+    with pytest.raises(ValueError) as exc:
+        client.get_manifest("registry.example/repository:tag")
+
+    # Not the raw, non-informative JSONDecodeError the user saw (the requests
+    # subclass derives from the stdlib one, so this covers both).
+    assert not isinstance(exc.value, json.JSONDecodeError)
+    message = str(exc.value)
+    # Names the request that failed and shows what came back instead.
+    assert "registry.example/v2/repository/manifests/tag" in message
+    assert "502 Bad Gateway" in message
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/oras/version.py 
new/oras-0.2.44/oras/version.py
--- old/oras-0.2.43/oras/version.py     2026-08-08 17:45:32.000000000 +0200
+++ new/oras-0.2.44/oras/version.py     2026-11-18 06:07:53.000000000 +0100
@@ -2,7 +2,7 @@
 __copyright__ = "Copyright The ORAS Authors."
 __license__ = "Apache-2.0"
 
-__version__ = "0.2.43"
+__version__ = "0.2.44"
 AUTHOR = "Vanessa Sochat"
 EMAIL = "[email protected]"
 NAME = "oras"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oras-0.2.43/oras.egg-info/PKG-INFO 
new/oras-0.2.44/oras.egg-info/PKG-INFO
--- old/oras-0.2.43/oras.egg-info/PKG-INFO      2026-08-08 17:45:51.000000000 
+0200
+++ new/oras-0.2.44/oras.egg-info/PKG-INFO      2026-11-18 06:08:06.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: oras
-Version: 0.2.43
+Version: 0.2.44
 Summary: OCI Registry as Storage Python SDK
 Home-page: https://github.com/oras-project/oras-py
 Author: Vanessa Sochat
@@ -50,7 +50,7 @@
 # ORAS Python
 
 <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
-[![All 
Contributors](https://img.shields.io/badge/all_contributors-35-orange.svg?style=flat-square)](#contributors-)
+[![All 
Contributors](https://img.shields.io/badge/all_contributors-38-orange.svg?style=flat-square)](#contributors-)
 <!-- ALL-CONTRIBUTORS-BADGE:END -->
 
 ![ORAS 
Logo](https://raw.githubusercontent.com/oras-project/oras-www/main/static/img/oras.png)
@@ -130,6 +130,11 @@
       <td align="center" valign="top" width="14.28%"><a 
href="https://crosscat.me";><img 
src="https://avatars.githubusercontent.com/u/39812919?v=4?s=100"; width="100px;" 
alt="Isabella Basso"/><br /><sub><b>Isabella Basso</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=antisaling"; 
title="Code">💻</a></td>
       <td align="center" valign="top" width="14.28%"><a 
href="https://github.com/ianpittwood";><img 
src="https://avatars.githubusercontent.com/u/9877347?v=4?s=100"; width="100px;" 
alt="Ian Pittwood"/><br /><sub><b>Ian Pittwood</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=ianpittwood"; 
title="Code">💻</a></td>
     </tr>
+    <tr>
+      <td align="center" valign="top" width="14.28%"><a 
href="https://github.com/tomatotomata";><img 
src="https://avatars.githubusercontent.com/u/170848582?v=4?s=100"; 
width="100px;" alt="tomatotomata"/><br /><sub><b>tomatotomata</b></sub></a><br 
/><a href="https://github.com/oras-project/oras-py/commits?author=tomatotomata"; 
title="Code">💻</a></td>
+      <td align="center" valign="top" width="14.28%"><a 
href="www.oneukrainian.com"><img 
src="https://avatars.githubusercontent.com/u/39889?v=4?s=100"; width="100px;" 
alt="Yaroslav Halchenko"/><br /><sub><b>Yaroslav Halchenko</b></sub></a><br 
/><a href="https://github.com/oras-project/oras-py/commits?author=yarikoptic"; 
title="Code">💻</a></td>
+      <td align="center" valign="top" width="14.28%"><a 
href="https://shubham-portfolio-gray-kappa.vercel.app/";><img 
src="https://avatars.githubusercontent.com/u/177908686?v=4?s=100"; 
width="100px;" alt="Shubham Padkonde"/><br /><sub><b>Shubham 
Padkonde</b></sub></a><br /><a 
href="https://github.com/oras-project/oras-py/commits?author=Shubham-Padkonde"; 
title="Code">💻</a></td>
+    </tr>
   </tbody>
 </table>
 

Reply via email to