Ticket #22369: firefox-jsonschema.patch

File firefox-jsonschema.patch, 1.8 KB (added by Zhang Wen, 11 months ago)
  • python/mozbuild/mozbuild/vendor/vendor_python.py

    # HG changeset patch
    # User Jan-Erik Rediger <jrediger@mozilla.com>
    # Date 1756256998 0
    #      Wed Aug 27 01:09:58 2025 +0000
    # Node ID d4b3eb4f76e81f18c53863b1d55ee146d6ec7d10
    # Parent  3f3cecb96480b861cfb31c2f1c0cba0da92e98ef
    Bug 1983736 - Patch jsonschema to work with Python 3.14+ r=mach-reviewers,ahal,ahochheiden
    
    Differential Revision: https://phabricator.services.mozilla.com/D262335
    
    diff -r 3f3cecb96480 -r d4b3eb4f76e8 python/mozbuild/mozbuild/vendor/vendor_python.py
    a b  
    4040    # modified 'dummy' version of it so that the dependency checks still succeed, but
    4141    # if it ever is attempted to be used, it will fail gracefully.
    4242    "ansicon",
     43    # jsonschema 4.17.3 is incompatible with Python 3.14+,
     44    # but later versions use a dependency with Rust components, which we thus can't vendor.
     45    # For now we apply the minimal patch to jsonschema to make it work again.
     46    "jsonschema",
    4347}
    4448
    4549
  • third_party/python/jsonschema/jsonschema/validators.py

    diff -r 3f3cecb96480 -r d4b3eb4f76e8 third_party/python/jsonschema/jsonschema/validators.py
    a b  
    875875            return None
    876876        uri, fragment = urldefrag(url)
    877877        for subschema in subschemas:
     878            id = subschema["$id"]
     879            if not isinstance(id, str):
     880                continue
    878881            target_uri = self._urljoin_cache(
    879                 self.resolution_scope, subschema["$id"],
     882                self.resolution_scope, id,
    880883            )
    881884            if target_uri.rstrip("/") == uri.rstrip("/"):
    882885                if fragment: