#4 Use tomllib/python-tomli instead of dead upstream python-toml
Merged 2 years ago by music. Opened 2 years ago by churchyard.
rpms/ churchyard/llhttp tomllib  into  rawhide

file modified
+6 -3
@@ -6,7 +6,10 @@ 

  from pathlib import Path

  from sys import exit, stderr

  

- import toml

+ try:

+     import tomllib

+ except ImportError:

+     import tomli as tomllib

  

  

  def main():
@@ -124,7 +127,7 @@ 

      parser.add_argument(

          "-x",

          "--exceptions",

-         type=FileType("r"),

+         type=FileType("rb"),

          help="Manually audited package versions file",

      )

      parser.add_argument(
@@ -149,7 +152,7 @@ 

      else:

          with args.exceptions as xfile:

              xname = getattr(xfile, "name", "<exceptions>")

-             args.exceptions = toml.load(args.exceptions)

+             args.exceptions = tomllib.load(args.exceptions)

          if not isinstance(args.exceptions, dict):

              parser.error(f"Invalid format in {xname}: not an object")

          for tablename, table in args.exceptions.items():

file modified
+1 -1
@@ -71,7 +71,7 @@ 

  

  # For check-null-licenses

  BuildRequires:  python3-devel

- BuildRequires:  python3dist(toml)

+ BuildRequires:  (python3dist(tomli) if python3 < 3.11)

  

  %description

  This project is a port of http_parser to TypeScript. llparse is used to

no initial comment

Thanks!

Is rawhide good enough, or do you need this in other branches?

Pull-Request has been merged by music

2 years ago

Rawhide's good, but tested with F36 as well, in case you will need to fast forward later.

Metadata