CacheToolsUtils 9.1__tar.gz → 9.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CacheToolsUtils
3
- Version: 9.1
3
+ Version: 9.2
4
4
  Summary: Cachetools Utilities
5
5
  Author-email: Fabien Coelho <cachetools.utils@coelho.net>
6
6
  License: CC0
@@ -454,10 +454,14 @@ def cacheFunctions(
454
454
  # JSON-based key function
455
455
  # NOTE obviously this only works if parameters are json-serializable…
456
456
  def json_key(*args, **kwargs):
457
- if kwargs:
458
- return json.dumps({"*": args, "**": kwargs}, sort_keys=True)
457
+ if kwargs: # object
458
+ if args:
459
+ val = {"*": args, "**": kwargs}
460
+ else:
461
+ val = {"**": kwargs}
459
462
  else: # array
460
- return json.dumps(args)
463
+ val = args
464
+ return json.dumps(val, sort_keys=True, separators=(",", ":"))
461
465
 
462
466
 
463
467
  # Hmmm…
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CacheToolsUtils
3
- Version: 9.1
3
+ Version: 9.2
4
4
  Summary: Cachetools Utilities
5
5
  Author-email: Fabien Coelho <cachetools.utils@coelho.net>
6
6
  License: CC0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "CacheToolsUtils"
7
- version = "9.1"
7
+ version = "9.2"
8
8
  authors = [ { name = "Fabien Coelho", email = "cachetools.utils@coelho.net" } ]
9
9
  description = "Cachetools Utilities"
10
10
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes