ZhengyangZhang commited on
Commit
182d6c4
·
verified ·
1 Parent(s): 72f5621

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. lib/python3.12/site-packages/jsonschema_specifications/__init__.py +12 -0
  2. lib/python3.12/site-packages/jsonschema_specifications/__pycache__/__init__.cpython-312.pyc +0 -0
  3. lib/python3.12/site-packages/jsonschema_specifications/__pycache__/_core.cpython-312.pyc +0 -0
  4. lib/python3.12/site-packages/jsonschema_specifications/_core.py +38 -0
  5. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/metaschema.json +42 -0
  6. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +56 -0
  7. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/content +17 -0
  8. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/core +57 -0
  9. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/format +14 -0
  10. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +37 -0
  11. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/validation +98 -0
  12. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/metaschema.json +58 -0
  13. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +48 -0
  14. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/content +17 -0
  15. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/core +51 -0
  16. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +14 -0
  17. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +14 -0
  18. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +37 -0
  19. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +15 -0
  20. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/validation +98 -0
  21. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft3/metaschema.json +172 -0
  22. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft4/metaschema.json +149 -0
  23. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft6/metaschema.json +153 -0
  24. lib/python3.12/site-packages/jsonschema_specifications/schemas/draft7/metaschema.json +166 -0
  25. lib/python3.12/site-packages/jsonschema_specifications/tests/__init__.py +0 -0
  26. lib/python3.12/site-packages/jsonschema_specifications/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  27. lib/python3.12/site-packages/jsonschema_specifications/tests/__pycache__/test_jsonschema_specifications.cpython-312.pyc +0 -0
  28. lib/python3.12/site-packages/jsonschema_specifications/tests/test_jsonschema_specifications.py +41 -0
  29. lib/python3.12/site-packages/partial_json_parser-0.2.1.1.post5.dist-info/WHEEL +4 -0
  30. lib/python3.12/site-packages/partial_json_parser-0.2.1.1.post5.dist-info/entry_points.txt +5 -0
  31. lib/python3.12/site-packages/partial_json_parser-0.2.1.1.post5.dist-info/licenses/LICENSE +21 -0
  32. lib/python3.12/site-packages/regex-2024.11.6.dist-info/INSTALLER +1 -0
  33. lib/python3.12/site-packages/regex-2024.11.6.dist-info/LICENSE.txt +208 -0
  34. lib/python3.12/site-packages/regex-2024.11.6.dist-info/METADATA +1060 -0
  35. lib/python3.12/site-packages/regex-2024.11.6.dist-info/RECORD +16 -0
  36. lib/python3.12/site-packages/regex-2024.11.6.dist-info/REQUESTED +0 -0
  37. lib/python3.12/site-packages/regex-2024.11.6.dist-info/top_level.txt +1 -0
  38. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Abidjan +0 -0
  39. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Accra +0 -0
  40. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Addis_Ababa +0 -0
  41. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Algiers +0 -0
  42. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Asmara +0 -0
  43. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Asmera +0 -0
  44. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bamako +0 -0
  45. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bangui +0 -0
  46. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Banjul +0 -0
  47. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bissau +0 -0
  48. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Blantyre +0 -0
  49. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Brazzaville +0 -0
  50. lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bujumbura +0 -0
lib/python3.12/site-packages/jsonschema_specifications/__init__.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ The JSON Schema meta-schemas and vocabularies, exposed as a Registry.
3
+ """
4
+
5
+ from referencing.jsonschema import EMPTY_REGISTRY as _EMPTY_REGISTRY
6
+
7
+ from jsonschema_specifications._core import _schemas
8
+
9
+ #: A `referencing.jsonschema.SchemaRegistry` containing all of the official
10
+ #: meta-schemas and vocabularies.
11
+ REGISTRY = (_schemas() @ _EMPTY_REGISTRY).crawl()
12
+ __all__ = ["REGISTRY"]
lib/python3.12/site-packages/jsonschema_specifications/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (559 Bytes). View file
 
lib/python3.12/site-packages/jsonschema_specifications/__pycache__/_core.cpython-312.pyc ADDED
Binary file (1.48 kB). View file
 
lib/python3.12/site-packages/jsonschema_specifications/_core.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Load all the JSON Schema specification's official schemas.
3
+ """
4
+
5
+ import json
6
+
7
+ try:
8
+ from importlib.resources import files
9
+ except ImportError:
10
+ from importlib_resources import ( # type: ignore[import-not-found, no-redef]
11
+ files,
12
+ )
13
+
14
+ from referencing import Resource
15
+
16
+
17
+ def _schemas():
18
+ """
19
+ All schemas we ship.
20
+ """
21
+ # importlib.resources.abc.Traversal doesn't have nice ways to do this that
22
+ # I'm aware of...
23
+ #
24
+ # It can't recurse arbitrarily, e.g. no ``.glob()``.
25
+ #
26
+ # So this takes some liberties given the real layout of what we ship
27
+ # (only 2 levels of nesting, no directories within the second level).
28
+
29
+ for version in files(__package__).joinpath("schemas").iterdir():
30
+ if version.name.startswith("."):
31
+ continue
32
+ for child in version.iterdir():
33
+ children = [child] if child.is_file() else child.iterdir()
34
+ for path in children:
35
+ if path.name.startswith("."):
36
+ continue
37
+ contents = json.loads(path.read_text(encoding="utf-8"))
38
+ yield Resource.from_contents(contents)
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/metaschema.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/schema",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/core": true,
6
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true,
7
+ "https://json-schema.org/draft/2019-09/vocab/validation": true,
8
+ "https://json-schema.org/draft/2019-09/vocab/meta-data": true,
9
+ "https://json-schema.org/draft/2019-09/vocab/format": false,
10
+ "https://json-schema.org/draft/2019-09/vocab/content": true
11
+ },
12
+ "$recursiveAnchor": true,
13
+
14
+ "title": "Core and Validation specifications meta-schema",
15
+ "allOf": [
16
+ {"$ref": "meta/core"},
17
+ {"$ref": "meta/applicator"},
18
+ {"$ref": "meta/validation"},
19
+ {"$ref": "meta/meta-data"},
20
+ {"$ref": "meta/format"},
21
+ {"$ref": "meta/content"}
22
+ ],
23
+ "type": ["object", "boolean"],
24
+ "properties": {
25
+ "definitions": {
26
+ "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
27
+ "type": "object",
28
+ "additionalProperties": { "$recursiveRef": "#" },
29
+ "default": {}
30
+ },
31
+ "dependencies": {
32
+ "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
33
+ "type": "object",
34
+ "additionalProperties": {
35
+ "anyOf": [
36
+ { "$recursiveRef": "#" },
37
+ { "$ref": "meta/validation#/$defs/stringArray" }
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/applicator ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/meta/applicator",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true
6
+ },
7
+ "$recursiveAnchor": true,
8
+
9
+ "title": "Applicator vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "additionalItems": { "$recursiveRef": "#" },
13
+ "unevaluatedItems": { "$recursiveRef": "#" },
14
+ "items": {
15
+ "anyOf": [
16
+ { "$recursiveRef": "#" },
17
+ { "$ref": "#/$defs/schemaArray" }
18
+ ]
19
+ },
20
+ "contains": { "$recursiveRef": "#" },
21
+ "additionalProperties": { "$recursiveRef": "#" },
22
+ "unevaluatedProperties": { "$recursiveRef": "#" },
23
+ "properties": {
24
+ "type": "object",
25
+ "additionalProperties": { "$recursiveRef": "#" },
26
+ "default": {}
27
+ },
28
+ "patternProperties": {
29
+ "type": "object",
30
+ "additionalProperties": { "$recursiveRef": "#" },
31
+ "propertyNames": { "format": "regex" },
32
+ "default": {}
33
+ },
34
+ "dependentSchemas": {
35
+ "type": "object",
36
+ "additionalProperties": {
37
+ "$recursiveRef": "#"
38
+ }
39
+ },
40
+ "propertyNames": { "$recursiveRef": "#" },
41
+ "if": { "$recursiveRef": "#" },
42
+ "then": { "$recursiveRef": "#" },
43
+ "else": { "$recursiveRef": "#" },
44
+ "allOf": { "$ref": "#/$defs/schemaArray" },
45
+ "anyOf": { "$ref": "#/$defs/schemaArray" },
46
+ "oneOf": { "$ref": "#/$defs/schemaArray" },
47
+ "not": { "$recursiveRef": "#" }
48
+ },
49
+ "$defs": {
50
+ "schemaArray": {
51
+ "type": "array",
52
+ "minItems": 1,
53
+ "items": { "$recursiveRef": "#" }
54
+ }
55
+ }
56
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/content ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/meta/content",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/content": true
6
+ },
7
+ "$recursiveAnchor": true,
8
+
9
+ "title": "Content vocabulary meta-schema",
10
+
11
+ "type": ["object", "boolean"],
12
+ "properties": {
13
+ "contentMediaType": { "type": "string" },
14
+ "contentEncoding": { "type": "string" },
15
+ "contentSchema": { "$recursiveRef": "#" }
16
+ }
17
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/core ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/meta/core",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/core": true
6
+ },
7
+ "$recursiveAnchor": true,
8
+
9
+ "title": "Core vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "$id": {
13
+ "type": "string",
14
+ "format": "uri-reference",
15
+ "$comment": "Non-empty fragments not allowed.",
16
+ "pattern": "^[^#]*#?$"
17
+ },
18
+ "$schema": {
19
+ "type": "string",
20
+ "format": "uri"
21
+ },
22
+ "$anchor": {
23
+ "type": "string",
24
+ "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$"
25
+ },
26
+ "$ref": {
27
+ "type": "string",
28
+ "format": "uri-reference"
29
+ },
30
+ "$recursiveRef": {
31
+ "type": "string",
32
+ "format": "uri-reference"
33
+ },
34
+ "$recursiveAnchor": {
35
+ "type": "boolean",
36
+ "default": false
37
+ },
38
+ "$vocabulary": {
39
+ "type": "object",
40
+ "propertyNames": {
41
+ "type": "string",
42
+ "format": "uri"
43
+ },
44
+ "additionalProperties": {
45
+ "type": "boolean"
46
+ }
47
+ },
48
+ "$comment": {
49
+ "type": "string"
50
+ },
51
+ "$defs": {
52
+ "type": "object",
53
+ "additionalProperties": { "$recursiveRef": "#" },
54
+ "default": {}
55
+ }
56
+ }
57
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/format ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/meta/format",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/format": true
6
+ },
7
+ "$recursiveAnchor": true,
8
+
9
+ "title": "Format vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "format": { "type": "string" }
13
+ }
14
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/meta/meta-data",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/meta-data": true
6
+ },
7
+ "$recursiveAnchor": true,
8
+
9
+ "title": "Meta-data vocabulary meta-schema",
10
+
11
+ "type": ["object", "boolean"],
12
+ "properties": {
13
+ "title": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "default": true,
20
+ "deprecated": {
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "readOnly": {
25
+ "type": "boolean",
26
+ "default": false
27
+ },
28
+ "writeOnly": {
29
+ "type": "boolean",
30
+ "default": false
31
+ },
32
+ "examples": {
33
+ "type": "array",
34
+ "items": true
35
+ }
36
+ }
37
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/validation ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/meta/validation",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/validation": true
6
+ },
7
+ "$recursiveAnchor": true,
8
+
9
+ "title": "Validation vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "multipleOf": {
13
+ "type": "number",
14
+ "exclusiveMinimum": 0
15
+ },
16
+ "maximum": {
17
+ "type": "number"
18
+ },
19
+ "exclusiveMaximum": {
20
+ "type": "number"
21
+ },
22
+ "minimum": {
23
+ "type": "number"
24
+ },
25
+ "exclusiveMinimum": {
26
+ "type": "number"
27
+ },
28
+ "maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
29
+ "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
30
+ "pattern": {
31
+ "type": "string",
32
+ "format": "regex"
33
+ },
34
+ "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
35
+ "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
36
+ "uniqueItems": {
37
+ "type": "boolean",
38
+ "default": false
39
+ },
40
+ "maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
41
+ "minContains": {
42
+ "$ref": "#/$defs/nonNegativeInteger",
43
+ "default": 1
44
+ },
45
+ "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
46
+ "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
47
+ "required": { "$ref": "#/$defs/stringArray" },
48
+ "dependentRequired": {
49
+ "type": "object",
50
+ "additionalProperties": {
51
+ "$ref": "#/$defs/stringArray"
52
+ }
53
+ },
54
+ "const": true,
55
+ "enum": {
56
+ "type": "array",
57
+ "items": true
58
+ },
59
+ "type": {
60
+ "anyOf": [
61
+ { "$ref": "#/$defs/simpleTypes" },
62
+ {
63
+ "type": "array",
64
+ "items": { "$ref": "#/$defs/simpleTypes" },
65
+ "minItems": 1,
66
+ "uniqueItems": true
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ "$defs": {
72
+ "nonNegativeInteger": {
73
+ "type": "integer",
74
+ "minimum": 0
75
+ },
76
+ "nonNegativeIntegerDefault0": {
77
+ "$ref": "#/$defs/nonNegativeInteger",
78
+ "default": 0
79
+ },
80
+ "simpleTypes": {
81
+ "enum": [
82
+ "array",
83
+ "boolean",
84
+ "integer",
85
+ "null",
86
+ "number",
87
+ "object",
88
+ "string"
89
+ ]
90
+ },
91
+ "stringArray": {
92
+ "type": "array",
93
+ "items": { "type": "string" },
94
+ "uniqueItems": true,
95
+ "default": []
96
+ }
97
+ }
98
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/metaschema.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/schema",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
6
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
7
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
8
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
9
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
10
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
11
+ "https://json-schema.org/draft/2020-12/vocab/content": true
12
+ },
13
+ "$dynamicAnchor": "meta",
14
+
15
+ "title": "Core and Validation specifications meta-schema",
16
+ "allOf": [
17
+ {"$ref": "meta/core"},
18
+ {"$ref": "meta/applicator"},
19
+ {"$ref": "meta/unevaluated"},
20
+ {"$ref": "meta/validation"},
21
+ {"$ref": "meta/meta-data"},
22
+ {"$ref": "meta/format-annotation"},
23
+ {"$ref": "meta/content"}
24
+ ],
25
+ "type": ["object", "boolean"],
26
+ "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
27
+ "properties": {
28
+ "definitions": {
29
+ "$comment": "\"definitions\" has been replaced by \"$defs\".",
30
+ "type": "object",
31
+ "additionalProperties": { "$dynamicRef": "#meta" },
32
+ "deprecated": true,
33
+ "default": {}
34
+ },
35
+ "dependencies": {
36
+ "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
37
+ "type": "object",
38
+ "additionalProperties": {
39
+ "anyOf": [
40
+ { "$dynamicRef": "#meta" },
41
+ { "$ref": "meta/validation#/$defs/stringArray" }
42
+ ]
43
+ },
44
+ "deprecated": true,
45
+ "default": {}
46
+ },
47
+ "$recursiveAnchor": {
48
+ "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
49
+ "$ref": "meta/core#/$defs/anchorString",
50
+ "deprecated": true
51
+ },
52
+ "$recursiveRef": {
53
+ "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
54
+ "$ref": "meta/core#/$defs/uriReferenceString",
55
+ "deprecated": true
56
+ }
57
+ }
58
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/applicator ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/applicator",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Applicator vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "prefixItems": { "$ref": "#/$defs/schemaArray" },
13
+ "items": { "$dynamicRef": "#meta" },
14
+ "contains": { "$dynamicRef": "#meta" },
15
+ "additionalProperties": { "$dynamicRef": "#meta" },
16
+ "properties": {
17
+ "type": "object",
18
+ "additionalProperties": { "$dynamicRef": "#meta" },
19
+ "default": {}
20
+ },
21
+ "patternProperties": {
22
+ "type": "object",
23
+ "additionalProperties": { "$dynamicRef": "#meta" },
24
+ "propertyNames": { "format": "regex" },
25
+ "default": {}
26
+ },
27
+ "dependentSchemas": {
28
+ "type": "object",
29
+ "additionalProperties": { "$dynamicRef": "#meta" },
30
+ "default": {}
31
+ },
32
+ "propertyNames": { "$dynamicRef": "#meta" },
33
+ "if": { "$dynamicRef": "#meta" },
34
+ "then": { "$dynamicRef": "#meta" },
35
+ "else": { "$dynamicRef": "#meta" },
36
+ "allOf": { "$ref": "#/$defs/schemaArray" },
37
+ "anyOf": { "$ref": "#/$defs/schemaArray" },
38
+ "oneOf": { "$ref": "#/$defs/schemaArray" },
39
+ "not": { "$dynamicRef": "#meta" }
40
+ },
41
+ "$defs": {
42
+ "schemaArray": {
43
+ "type": "array",
44
+ "minItems": 1,
45
+ "items": { "$dynamicRef": "#meta" }
46
+ }
47
+ }
48
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/content ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/content",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/content": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Content vocabulary meta-schema",
10
+
11
+ "type": ["object", "boolean"],
12
+ "properties": {
13
+ "contentEncoding": { "type": "string" },
14
+ "contentMediaType": { "type": "string" },
15
+ "contentSchema": { "$dynamicRef": "#meta" }
16
+ }
17
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/core ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/core",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/core": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Core vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "$id": {
13
+ "$ref": "#/$defs/uriReferenceString",
14
+ "$comment": "Non-empty fragments not allowed.",
15
+ "pattern": "^[^#]*#?$"
16
+ },
17
+ "$schema": { "$ref": "#/$defs/uriString" },
18
+ "$ref": { "$ref": "#/$defs/uriReferenceString" },
19
+ "$anchor": { "$ref": "#/$defs/anchorString" },
20
+ "$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
21
+ "$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
22
+ "$vocabulary": {
23
+ "type": "object",
24
+ "propertyNames": { "$ref": "#/$defs/uriString" },
25
+ "additionalProperties": {
26
+ "type": "boolean"
27
+ }
28
+ },
29
+ "$comment": {
30
+ "type": "string"
31
+ },
32
+ "$defs": {
33
+ "type": "object",
34
+ "additionalProperties": { "$dynamicRef": "#meta" }
35
+ }
36
+ },
37
+ "$defs": {
38
+ "anchorString": {
39
+ "type": "string",
40
+ "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
41
+ },
42
+ "uriString": {
43
+ "type": "string",
44
+ "format": "uri"
45
+ },
46
+ "uriReferenceString": {
47
+ "type": "string",
48
+ "format": "uri-reference"
49
+ }
50
+ }
51
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Format vocabulary meta-schema for annotation results",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "format": { "type": "string" }
13
+ }
14
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/format-assertion": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Format vocabulary meta-schema for assertion results",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "format": { "type": "string" }
13
+ }
14
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Meta-data vocabulary meta-schema",
10
+
11
+ "type": ["object", "boolean"],
12
+ "properties": {
13
+ "title": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "default": true,
20
+ "deprecated": {
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "readOnly": {
25
+ "type": "boolean",
26
+ "default": false
27
+ },
28
+ "writeOnly": {
29
+ "type": "boolean",
30
+ "default": false
31
+ },
32
+ "examples": {
33
+ "type": "array",
34
+ "items": true
35
+ }
36
+ }
37
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Unevaluated applicator vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "unevaluatedItems": { "$dynamicRef": "#meta" },
13
+ "unevaluatedProperties": { "$dynamicRef": "#meta" }
14
+ }
15
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/validation ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/meta/validation",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
6
+ },
7
+ "$dynamicAnchor": "meta",
8
+
9
+ "title": "Validation vocabulary meta-schema",
10
+ "type": ["object", "boolean"],
11
+ "properties": {
12
+ "type": {
13
+ "anyOf": [
14
+ { "$ref": "#/$defs/simpleTypes" },
15
+ {
16
+ "type": "array",
17
+ "items": { "$ref": "#/$defs/simpleTypes" },
18
+ "minItems": 1,
19
+ "uniqueItems": true
20
+ }
21
+ ]
22
+ },
23
+ "const": true,
24
+ "enum": {
25
+ "type": "array",
26
+ "items": true
27
+ },
28
+ "multipleOf": {
29
+ "type": "number",
30
+ "exclusiveMinimum": 0
31
+ },
32
+ "maximum": {
33
+ "type": "number"
34
+ },
35
+ "exclusiveMaximum": {
36
+ "type": "number"
37
+ },
38
+ "minimum": {
39
+ "type": "number"
40
+ },
41
+ "exclusiveMinimum": {
42
+ "type": "number"
43
+ },
44
+ "maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
45
+ "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
46
+ "pattern": {
47
+ "type": "string",
48
+ "format": "regex"
49
+ },
50
+ "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
51
+ "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
52
+ "uniqueItems": {
53
+ "type": "boolean",
54
+ "default": false
55
+ },
56
+ "maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
57
+ "minContains": {
58
+ "$ref": "#/$defs/nonNegativeInteger",
59
+ "default": 1
60
+ },
61
+ "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
62
+ "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
63
+ "required": { "$ref": "#/$defs/stringArray" },
64
+ "dependentRequired": {
65
+ "type": "object",
66
+ "additionalProperties": {
67
+ "$ref": "#/$defs/stringArray"
68
+ }
69
+ }
70
+ },
71
+ "$defs": {
72
+ "nonNegativeInteger": {
73
+ "type": "integer",
74
+ "minimum": 0
75
+ },
76
+ "nonNegativeIntegerDefault0": {
77
+ "$ref": "#/$defs/nonNegativeInteger",
78
+ "default": 0
79
+ },
80
+ "simpleTypes": {
81
+ "enum": [
82
+ "array",
83
+ "boolean",
84
+ "integer",
85
+ "null",
86
+ "number",
87
+ "object",
88
+ "string"
89
+ ]
90
+ },
91
+ "stringArray": {
92
+ "type": "array",
93
+ "items": { "type": "string" },
94
+ "uniqueItems": true,
95
+ "default": []
96
+ }
97
+ }
98
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft3/metaschema.json ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema" : "http://json-schema.org/draft-03/schema#",
3
+ "id" : "http://json-schema.org/draft-03/schema#",
4
+ "type" : "object",
5
+
6
+ "properties" : {
7
+ "type" : {
8
+ "type" : ["string", "array"],
9
+ "items" : {
10
+ "type" : ["string", {"$ref" : "#"}]
11
+ },
12
+ "uniqueItems" : true,
13
+ "default" : "any"
14
+ },
15
+
16
+ "properties" : {
17
+ "type" : "object",
18
+ "additionalProperties" : {"$ref" : "#"},
19
+ "default" : {}
20
+ },
21
+
22
+ "patternProperties" : {
23
+ "type" : "object",
24
+ "additionalProperties" : {"$ref" : "#"},
25
+ "default" : {}
26
+ },
27
+
28
+ "additionalProperties" : {
29
+ "type" : [{"$ref" : "#"}, "boolean"],
30
+ "default" : {}
31
+ },
32
+
33
+ "items" : {
34
+ "type" : [{"$ref" : "#"}, "array"],
35
+ "items" : {"$ref" : "#"},
36
+ "default" : {}
37
+ },
38
+
39
+ "additionalItems" : {
40
+ "type" : [{"$ref" : "#"}, "boolean"],
41
+ "default" : {}
42
+ },
43
+
44
+ "required" : {
45
+ "type" : "boolean",
46
+ "default" : false
47
+ },
48
+
49
+ "dependencies" : {
50
+ "type" : "object",
51
+ "additionalProperties" : {
52
+ "type" : ["string", "array", {"$ref" : "#"}],
53
+ "items" : {
54
+ "type" : "string"
55
+ }
56
+ },
57
+ "default" : {}
58
+ },
59
+
60
+ "minimum" : {
61
+ "type" : "number"
62
+ },
63
+
64
+ "maximum" : {
65
+ "type" : "number"
66
+ },
67
+
68
+ "exclusiveMinimum" : {
69
+ "type" : "boolean",
70
+ "default" : false
71
+ },
72
+
73
+ "exclusiveMaximum" : {
74
+ "type" : "boolean",
75
+ "default" : false
76
+ },
77
+
78
+ "minItems" : {
79
+ "type" : "integer",
80
+ "minimum" : 0,
81
+ "default" : 0
82
+ },
83
+
84
+ "maxItems" : {
85
+ "type" : "integer",
86
+ "minimum" : 0
87
+ },
88
+
89
+ "uniqueItems" : {
90
+ "type" : "boolean",
91
+ "default" : false
92
+ },
93
+
94
+ "pattern" : {
95
+ "type" : "string",
96
+ "format" : "regex"
97
+ },
98
+
99
+ "minLength" : {
100
+ "type" : "integer",
101
+ "minimum" : 0,
102
+ "default" : 0
103
+ },
104
+
105
+ "maxLength" : {
106
+ "type" : "integer"
107
+ },
108
+
109
+ "enum" : {
110
+ "type" : "array",
111
+ "minItems" : 1,
112
+ "uniqueItems" : true
113
+ },
114
+
115
+ "default" : {
116
+ "type" : "any"
117
+ },
118
+
119
+ "title" : {
120
+ "type" : "string"
121
+ },
122
+
123
+ "description" : {
124
+ "type" : "string"
125
+ },
126
+
127
+ "format" : {
128
+ "type" : "string"
129
+ },
130
+
131
+ "divisibleBy" : {
132
+ "type" : "number",
133
+ "minimum" : 0,
134
+ "exclusiveMinimum" : true,
135
+ "default" : 1
136
+ },
137
+
138
+ "disallow" : {
139
+ "type" : ["string", "array"],
140
+ "items" : {
141
+ "type" : ["string", {"$ref" : "#"}]
142
+ },
143
+ "uniqueItems" : true
144
+ },
145
+
146
+ "extends" : {
147
+ "type" : [{"$ref" : "#"}, "array"],
148
+ "items" : {"$ref" : "#"},
149
+ "default" : {}
150
+ },
151
+
152
+ "id" : {
153
+ "type" : "string"
154
+ },
155
+
156
+ "$ref" : {
157
+ "type" : "string"
158
+ },
159
+
160
+ "$schema" : {
161
+ "type" : "string",
162
+ "format" : "uri"
163
+ }
164
+ },
165
+
166
+ "dependencies" : {
167
+ "exclusiveMinimum" : "minimum",
168
+ "exclusiveMaximum" : "maximum"
169
+ },
170
+
171
+ "default" : {}
172
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft4/metaschema.json ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "http://json-schema.org/draft-04/schema#",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "description": "Core schema meta-schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": { "$ref": "#" }
10
+ },
11
+ "positiveInteger": {
12
+ "type": "integer",
13
+ "minimum": 0
14
+ },
15
+ "positiveIntegerDefault0": {
16
+ "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
17
+ },
18
+ "simpleTypes": {
19
+ "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
20
+ },
21
+ "stringArray": {
22
+ "type": "array",
23
+ "items": { "type": "string" },
24
+ "minItems": 1,
25
+ "uniqueItems": true
26
+ }
27
+ },
28
+ "type": "object",
29
+ "properties": {
30
+ "id": {
31
+ "type": "string"
32
+ },
33
+ "$schema": {
34
+ "type": "string"
35
+ },
36
+ "title": {
37
+ "type": "string"
38
+ },
39
+ "description": {
40
+ "type": "string"
41
+ },
42
+ "default": {},
43
+ "multipleOf": {
44
+ "type": "number",
45
+ "minimum": 0,
46
+ "exclusiveMinimum": true
47
+ },
48
+ "maximum": {
49
+ "type": "number"
50
+ },
51
+ "exclusiveMaximum": {
52
+ "type": "boolean",
53
+ "default": false
54
+ },
55
+ "minimum": {
56
+ "type": "number"
57
+ },
58
+ "exclusiveMinimum": {
59
+ "type": "boolean",
60
+ "default": false
61
+ },
62
+ "maxLength": { "$ref": "#/definitions/positiveInteger" },
63
+ "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
64
+ "pattern": {
65
+ "type": "string",
66
+ "format": "regex"
67
+ },
68
+ "additionalItems": {
69
+ "anyOf": [
70
+ { "type": "boolean" },
71
+ { "$ref": "#" }
72
+ ],
73
+ "default": {}
74
+ },
75
+ "items": {
76
+ "anyOf": [
77
+ { "$ref": "#" },
78
+ { "$ref": "#/definitions/schemaArray" }
79
+ ],
80
+ "default": {}
81
+ },
82
+ "maxItems": { "$ref": "#/definitions/positiveInteger" },
83
+ "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
84
+ "uniqueItems": {
85
+ "type": "boolean",
86
+ "default": false
87
+ },
88
+ "maxProperties": { "$ref": "#/definitions/positiveInteger" },
89
+ "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
90
+ "required": { "$ref": "#/definitions/stringArray" },
91
+ "additionalProperties": {
92
+ "anyOf": [
93
+ { "type": "boolean" },
94
+ { "$ref": "#" }
95
+ ],
96
+ "default": {}
97
+ },
98
+ "definitions": {
99
+ "type": "object",
100
+ "additionalProperties": { "$ref": "#" },
101
+ "default": {}
102
+ },
103
+ "properties": {
104
+ "type": "object",
105
+ "additionalProperties": { "$ref": "#" },
106
+ "default": {}
107
+ },
108
+ "patternProperties": {
109
+ "type": "object",
110
+ "additionalProperties": { "$ref": "#" },
111
+ "default": {}
112
+ },
113
+ "dependencies": {
114
+ "type": "object",
115
+ "additionalProperties": {
116
+ "anyOf": [
117
+ { "$ref": "#" },
118
+ { "$ref": "#/definitions/stringArray" }
119
+ ]
120
+ }
121
+ },
122
+ "enum": {
123
+ "type": "array",
124
+ "minItems": 1,
125
+ "uniqueItems": true
126
+ },
127
+ "type": {
128
+ "anyOf": [
129
+ { "$ref": "#/definitions/simpleTypes" },
130
+ {
131
+ "type": "array",
132
+ "items": { "$ref": "#/definitions/simpleTypes" },
133
+ "minItems": 1,
134
+ "uniqueItems": true
135
+ }
136
+ ]
137
+ },
138
+ "format": { "type": "string" },
139
+ "allOf": { "$ref": "#/definitions/schemaArray" },
140
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
141
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
142
+ "not": { "$ref": "#" }
143
+ },
144
+ "dependencies": {
145
+ "exclusiveMaximum": [ "maximum" ],
146
+ "exclusiveMinimum": [ "minimum" ]
147
+ },
148
+ "default": {}
149
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft6/metaschema.json ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "http://json-schema.org/draft-06/schema#",
3
+ "$id": "http://json-schema.org/draft-06/schema#",
4
+ "title": "Core schema meta-schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": { "$ref": "#" }
10
+ },
11
+ "nonNegativeInteger": {
12
+ "type": "integer",
13
+ "minimum": 0
14
+ },
15
+ "nonNegativeIntegerDefault0": {
16
+ "allOf": [
17
+ { "$ref": "#/definitions/nonNegativeInteger" },
18
+ { "default": 0 }
19
+ ]
20
+ },
21
+ "simpleTypes": {
22
+ "enum": [
23
+ "array",
24
+ "boolean",
25
+ "integer",
26
+ "null",
27
+ "number",
28
+ "object",
29
+ "string"
30
+ ]
31
+ },
32
+ "stringArray": {
33
+ "type": "array",
34
+ "items": { "type": "string" },
35
+ "uniqueItems": true,
36
+ "default": []
37
+ }
38
+ },
39
+ "type": ["object", "boolean"],
40
+ "properties": {
41
+ "$id": {
42
+ "type": "string",
43
+ "format": "uri-reference"
44
+ },
45
+ "$schema": {
46
+ "type": "string",
47
+ "format": "uri"
48
+ },
49
+ "$ref": {
50
+ "type": "string",
51
+ "format": "uri-reference"
52
+ },
53
+ "title": {
54
+ "type": "string"
55
+ },
56
+ "description": {
57
+ "type": "string"
58
+ },
59
+ "default": {},
60
+ "examples": {
61
+ "type": "array",
62
+ "items": {}
63
+ },
64
+ "multipleOf": {
65
+ "type": "number",
66
+ "exclusiveMinimum": 0
67
+ },
68
+ "maximum": {
69
+ "type": "number"
70
+ },
71
+ "exclusiveMaximum": {
72
+ "type": "number"
73
+ },
74
+ "minimum": {
75
+ "type": "number"
76
+ },
77
+ "exclusiveMinimum": {
78
+ "type": "number"
79
+ },
80
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
81
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
82
+ "pattern": {
83
+ "type": "string",
84
+ "format": "regex"
85
+ },
86
+ "additionalItems": { "$ref": "#" },
87
+ "items": {
88
+ "anyOf": [
89
+ { "$ref": "#" },
90
+ { "$ref": "#/definitions/schemaArray" }
91
+ ],
92
+ "default": {}
93
+ },
94
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
95
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
96
+ "uniqueItems": {
97
+ "type": "boolean",
98
+ "default": false
99
+ },
100
+ "contains": { "$ref": "#" },
101
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
102
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
103
+ "required": { "$ref": "#/definitions/stringArray" },
104
+ "additionalProperties": { "$ref": "#" },
105
+ "definitions": {
106
+ "type": "object",
107
+ "additionalProperties": { "$ref": "#" },
108
+ "default": {}
109
+ },
110
+ "properties": {
111
+ "type": "object",
112
+ "additionalProperties": { "$ref": "#" },
113
+ "default": {}
114
+ },
115
+ "patternProperties": {
116
+ "type": "object",
117
+ "additionalProperties": { "$ref": "#" },
118
+ "propertyNames": { "format": "regex" },
119
+ "default": {}
120
+ },
121
+ "dependencies": {
122
+ "type": "object",
123
+ "additionalProperties": {
124
+ "anyOf": [
125
+ { "$ref": "#" },
126
+ { "$ref": "#/definitions/stringArray" }
127
+ ]
128
+ }
129
+ },
130
+ "propertyNames": { "$ref": "#" },
131
+ "const": {},
132
+ "enum": {
133
+ "type": "array"
134
+ },
135
+ "type": {
136
+ "anyOf": [
137
+ { "$ref": "#/definitions/simpleTypes" },
138
+ {
139
+ "type": "array",
140
+ "items": { "$ref": "#/definitions/simpleTypes" },
141
+ "minItems": 1,
142
+ "uniqueItems": true
143
+ }
144
+ ]
145
+ },
146
+ "format": { "type": "string" },
147
+ "allOf": { "$ref": "#/definitions/schemaArray" },
148
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
149
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
150
+ "not": { "$ref": "#" }
151
+ },
152
+ "default": {}
153
+ }
lib/python3.12/site-packages/jsonschema_specifications/schemas/draft7/metaschema.json ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Core schema meta-schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": { "$ref": "#" }
10
+ },
11
+ "nonNegativeInteger": {
12
+ "type": "integer",
13
+ "minimum": 0
14
+ },
15
+ "nonNegativeIntegerDefault0": {
16
+ "allOf": [
17
+ { "$ref": "#/definitions/nonNegativeInteger" },
18
+ { "default": 0 }
19
+ ]
20
+ },
21
+ "simpleTypes": {
22
+ "enum": [
23
+ "array",
24
+ "boolean",
25
+ "integer",
26
+ "null",
27
+ "number",
28
+ "object",
29
+ "string"
30
+ ]
31
+ },
32
+ "stringArray": {
33
+ "type": "array",
34
+ "items": { "type": "string" },
35
+ "uniqueItems": true,
36
+ "default": []
37
+ }
38
+ },
39
+ "type": ["object", "boolean"],
40
+ "properties": {
41
+ "$id": {
42
+ "type": "string",
43
+ "format": "uri-reference"
44
+ },
45
+ "$schema": {
46
+ "type": "string",
47
+ "format": "uri"
48
+ },
49
+ "$ref": {
50
+ "type": "string",
51
+ "format": "uri-reference"
52
+ },
53
+ "$comment": {
54
+ "type": "string"
55
+ },
56
+ "title": {
57
+ "type": "string"
58
+ },
59
+ "description": {
60
+ "type": "string"
61
+ },
62
+ "default": true,
63
+ "readOnly": {
64
+ "type": "boolean",
65
+ "default": false
66
+ },
67
+ "examples": {
68
+ "type": "array",
69
+ "items": true
70
+ },
71
+ "multipleOf": {
72
+ "type": "number",
73
+ "exclusiveMinimum": 0
74
+ },
75
+ "maximum": {
76
+ "type": "number"
77
+ },
78
+ "exclusiveMaximum": {
79
+ "type": "number"
80
+ },
81
+ "minimum": {
82
+ "type": "number"
83
+ },
84
+ "exclusiveMinimum": {
85
+ "type": "number"
86
+ },
87
+ "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
88
+ "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
89
+ "pattern": {
90
+ "type": "string",
91
+ "format": "regex"
92
+ },
93
+ "additionalItems": { "$ref": "#" },
94
+ "items": {
95
+ "anyOf": [
96
+ { "$ref": "#" },
97
+ { "$ref": "#/definitions/schemaArray" }
98
+ ],
99
+ "default": true
100
+ },
101
+ "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
102
+ "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
103
+ "uniqueItems": {
104
+ "type": "boolean",
105
+ "default": false
106
+ },
107
+ "contains": { "$ref": "#" },
108
+ "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
109
+ "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
110
+ "required": { "$ref": "#/definitions/stringArray" },
111
+ "additionalProperties": { "$ref": "#" },
112
+ "definitions": {
113
+ "type": "object",
114
+ "additionalProperties": { "$ref": "#" },
115
+ "default": {}
116
+ },
117
+ "properties": {
118
+ "type": "object",
119
+ "additionalProperties": { "$ref": "#" },
120
+ "default": {}
121
+ },
122
+ "patternProperties": {
123
+ "type": "object",
124
+ "additionalProperties": { "$ref": "#" },
125
+ "propertyNames": { "format": "regex" },
126
+ "default": {}
127
+ },
128
+ "dependencies": {
129
+ "type": "object",
130
+ "additionalProperties": {
131
+ "anyOf": [
132
+ { "$ref": "#" },
133
+ { "$ref": "#/definitions/stringArray" }
134
+ ]
135
+ }
136
+ },
137
+ "propertyNames": { "$ref": "#" },
138
+ "const": true,
139
+ "enum": {
140
+ "type": "array",
141
+ "items": true
142
+ },
143
+ "type": {
144
+ "anyOf": [
145
+ { "$ref": "#/definitions/simpleTypes" },
146
+ {
147
+ "type": "array",
148
+ "items": { "$ref": "#/definitions/simpleTypes" },
149
+ "minItems": 1,
150
+ "uniqueItems": true
151
+ }
152
+ ]
153
+ },
154
+ "format": { "type": "string" },
155
+ "contentMediaType": { "type": "string" },
156
+ "contentEncoding": { "type": "string" },
157
+ "if": {"$ref": "#"},
158
+ "then": {"$ref": "#"},
159
+ "else": {"$ref": "#"},
160
+ "allOf": { "$ref": "#/definitions/schemaArray" },
161
+ "anyOf": { "$ref": "#/definitions/schemaArray" },
162
+ "oneOf": { "$ref": "#/definitions/schemaArray" },
163
+ "not": { "$ref": "#" }
164
+ },
165
+ "default": true
166
+ }
lib/python3.12/site-packages/jsonschema_specifications/tests/__init__.py ADDED
File without changes
lib/python3.12/site-packages/jsonschema_specifications/tests/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (210 Bytes). View file
 
lib/python3.12/site-packages/jsonschema_specifications/tests/__pycache__/test_jsonschema_specifications.cpython-312.pyc ADDED
Binary file (1.95 kB). View file
 
lib/python3.12/site-packages/jsonschema_specifications/tests/test_jsonschema_specifications.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from collections.abc import Mapping
2
+ from pathlib import Path
3
+
4
+ import pytest
5
+
6
+ from jsonschema_specifications import REGISTRY
7
+
8
+
9
+ def test_it_contains_metaschemas():
10
+ schema = REGISTRY.contents("http://json-schema.org/draft-07/schema#")
11
+ assert isinstance(schema, Mapping)
12
+ assert schema["$id"] == "http://json-schema.org/draft-07/schema#"
13
+ assert schema["title"] == "Core schema meta-schema"
14
+
15
+
16
+ def test_it_is_crawled():
17
+ assert REGISTRY.crawl() == REGISTRY
18
+
19
+
20
+ @pytest.mark.parametrize(
21
+ "ignored_relative_path",
22
+ ["schemas/.DS_Store", "schemas/draft7/.DS_Store"],
23
+ )
24
+ def test_it_copes_with_dotfiles(ignored_relative_path):
25
+ """
26
+ Ignore files like .DS_Store if someone has actually caused one to exist.
27
+
28
+ We test here through the private interface as of course the global has
29
+ already loaded our schemas.
30
+ """
31
+
32
+ import jsonschema_specifications
33
+
34
+ package = Path(jsonschema_specifications.__file__).parent
35
+
36
+ ignored = package / ignored_relative_path
37
+ ignored.touch()
38
+ try:
39
+ list(jsonschema_specifications._schemas())
40
+ finally:
41
+ ignored.unlink()
lib/python3.12/site-packages/partial_json_parser-0.2.1.1.post5.dist-info/WHEEL ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: pdm-backend (2.4.3)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
lib/python3.12/site-packages/partial_json_parser-0.2.1.1.post5.dist-info/entry_points.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ [console_scripts]
2
+ json-playground = partial_json_parser.playground:main
3
+
4
+ [gui_scripts]
5
+
lib/python3.12/site-packages/partial_json_parser-0.2.1.1.post5.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Promplate
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
lib/python3.12/site-packages/regex-2024.11.6.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
lib/python3.12/site-packages/regex-2024.11.6.dist-info/LICENSE.txt ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This work was derived from the 're' module of CPython 2.6 and CPython 3.1,
2
+ copyright (c) 1998-2001 by Secret Labs AB and licensed under CNRI's Python 1.6
3
+ license.
4
+
5
+ All additions and alterations are licensed under the Apache 2.0 License.
6
+
7
+
8
+ Apache License
9
+ Version 2.0, January 2004
10
+ http://www.apache.org/licenses/
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+
14
+ 1. Definitions.
15
+
16
+ "License" shall mean the terms and conditions for use, reproduction,
17
+ and distribution as defined by Sections 1 through 9 of this document.
18
+
19
+ "Licensor" shall mean the copyright owner or entity authorized by
20
+ the copyright owner that is granting the License.
21
+
22
+ "Legal Entity" shall mean the union of the acting entity and all
23
+ other entities that control, are controlled by, or are under common
24
+ control with that entity. For the purposes of this definition,
25
+ "control" means (i) the power, direct or indirect, to cause the
26
+ direction or management of such entity, whether by contract or
27
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
28
+ outstanding shares, or (iii) beneficial ownership of such entity.
29
+
30
+ "You" (or "Your") shall mean an individual or Legal Entity
31
+ exercising permissions granted by this License.
32
+
33
+ "Source" form shall mean the preferred form for making modifications,
34
+ including but not limited to software source code, documentation
35
+ source, and configuration files.
36
+
37
+ "Object" form shall mean any form resulting from mechanical
38
+ transformation or translation of a Source form, including but
39
+ not limited to compiled object code, generated documentation,
40
+ and conversions to other media types.
41
+
42
+ "Work" shall mean the work of authorship, whether in Source or
43
+ Object form, made available under the License, as indicated by a
44
+ copyright notice that is included in or attached to the work
45
+ (an example is provided in the Appendix below).
46
+
47
+ "Derivative Works" shall mean any work, whether in Source or Object
48
+ form, that is based on (or derived from) the Work and for which the
49
+ editorial revisions, annotations, elaborations, or other modifications
50
+ represent, as a whole, an original work of authorship. For the purposes
51
+ of this License, Derivative Works shall not include works that remain
52
+ separable from, or merely link (or bind by name) to the interfaces of,
53
+ the Work and Derivative Works thereof.
54
+
55
+ "Contribution" shall mean any work of authorship, including
56
+ the original version of the Work and any modifications or additions
57
+ to that Work or Derivative Works thereof, that is intentionally
58
+ submitted to Licensor for inclusion in the Work by the copyright owner
59
+ or by an individual or Legal Entity authorized to submit on behalf of
60
+ the copyright owner. For the purposes of this definition, "submitted"
61
+ means any form of electronic, verbal, or written communication sent
62
+ to the Licensor or its representatives, including but not limited to
63
+ communication on electronic mailing lists, source code control systems,
64
+ and issue tracking systems that are managed by, or on behalf of, the
65
+ Licensor for the purpose of discussing and improving the Work, but
66
+ excluding communication that is conspicuously marked or otherwise
67
+ designated in writing by the copyright owner as "Not a Contribution."
68
+
69
+ "Contributor" shall mean Licensor and any individual or Legal Entity
70
+ on behalf of whom a Contribution has been received by Licensor and
71
+ subsequently incorporated within the Work.
72
+
73
+ 2. Grant of Copyright License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ copyright license to reproduce, prepare Derivative Works of,
77
+ publicly display, publicly perform, sublicense, and distribute the
78
+ Work and such Derivative Works in Source or Object form.
79
+
80
+ 3. Grant of Patent License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ (except as stated in this section) patent license to make, have made,
84
+ use, offer to sell, sell, import, and otherwise transfer the Work,
85
+ where such license applies only to those patent claims licensable
86
+ by such Contributor that are necessarily infringed by their
87
+ Contribution(s) alone or by combination of their Contribution(s)
88
+ with the Work to which such Contribution(s) was submitted. If You
89
+ institute patent litigation against any entity (including a
90
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
91
+ or a Contribution incorporated within the Work constitutes direct
92
+ or contributory patent infringement, then any patent licenses
93
+ granted to You under this License for that Work shall terminate
94
+ as of the date such litigation is filed.
95
+
96
+ 4. Redistribution. You may reproduce and distribute copies of the
97
+ Work or Derivative Works thereof in any medium, with or without
98
+ modifications, and in Source or Object form, provided that You
99
+ meet the following conditions:
100
+
101
+ (a) You must give any other recipients of the Work or
102
+ Derivative Works a copy of this License; and
103
+
104
+ (b) You must cause any modified files to carry prominent notices
105
+ stating that You changed the files; and
106
+
107
+ (c) You must retain, in the Source form of any Derivative Works
108
+ that You distribute, all copyright, patent, trademark, and
109
+ attribution notices from the Source form of the Work,
110
+ excluding those notices that do not pertain to any part of
111
+ the Derivative Works; and
112
+
113
+ (d) If the Work includes a "NOTICE" text file as part of its
114
+ distribution, then any Derivative Works that You distribute must
115
+ include a readable copy of the attribution notices contained
116
+ within such NOTICE file, excluding those notices that do not
117
+ pertain to any part of the Derivative Works, in at least one
118
+ of the following places: within a NOTICE text file distributed
119
+ as part of the Derivative Works; within the Source form or
120
+ documentation, if provided along with the Derivative Works; or,
121
+ within a display generated by the Derivative Works, if and
122
+ wherever such third-party notices normally appear. The contents
123
+ of the NOTICE file are for informational purposes only and
124
+ do not modify the License. You may add Your own attribution
125
+ notices within Derivative Works that You distribute, alongside
126
+ or as an addendum to the NOTICE text from the Work, provided
127
+ that such additional attribution notices cannot be construed
128
+ as modifying the License.
129
+
130
+ You may add Your own copyright statement to Your modifications and
131
+ may provide additional or different license terms and conditions
132
+ for use, reproduction, or distribution of Your modifications, or
133
+ for any such Derivative Works as a whole, provided Your use,
134
+ reproduction, and distribution of the Work otherwise complies with
135
+ the conditions stated in this License.
136
+
137
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
138
+ any Contribution intentionally submitted for inclusion in the Work
139
+ by You to the Licensor shall be under the terms and conditions of
140
+ this License, without any additional terms or conditions.
141
+ Notwithstanding the above, nothing herein shall supersede or modify
142
+ the terms of any separate license agreement you may have executed
143
+ with Licensor regarding such Contributions.
144
+
145
+ 6. Trademarks. This License does not grant permission to use the trade
146
+ names, trademarks, service marks, or product names of the Licensor,
147
+ except as required for reasonable and customary use in describing the
148
+ origin of the Work and reproducing the content of the NOTICE file.
149
+
150
+ 7. Disclaimer of Warranty. Unless required by applicable law or
151
+ agreed to in writing, Licensor provides the Work (and each
152
+ Contributor provides its Contributions) on an "AS IS" BASIS,
153
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
154
+ implied, including, without limitation, any warranties or conditions
155
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
156
+ PARTICULAR PURPOSE. You are solely responsible for determining the
157
+ appropriateness of using or redistributing the Work and assume any
158
+ risks associated with Your exercise of permissions under this License.
159
+
160
+ 8. Limitation of Liability. In no event and under no legal theory,
161
+ whether in tort (including negligence), contract, or otherwise,
162
+ unless required by applicable law (such as deliberate and grossly
163
+ negligent acts) or agreed to in writing, shall any Contributor be
164
+ liable to You for damages, including any direct, indirect, special,
165
+ incidental, or consequential damages of any character arising as a
166
+ result of this License or out of the use or inability to use the
167
+ Work (including but not limited to damages for loss of goodwill,
168
+ work stoppage, computer failure or malfunction, or any and all
169
+ other commercial damages or losses), even if such Contributor
170
+ has been advised of the possibility of such damages.
171
+
172
+ 9. Accepting Warranty or Additional Liability. While redistributing
173
+ the Work or Derivative Works thereof, You may choose to offer,
174
+ and charge a fee for, acceptance of support, warranty, indemnity,
175
+ or other liability obligations and/or rights consistent with this
176
+ License. However, in accepting such obligations, You may act only
177
+ on Your own behalf and on Your sole responsibility, not on behalf
178
+ of any other Contributor, and only if You agree to indemnify,
179
+ defend, and hold each Contributor harmless for any liability
180
+ incurred by, or claims asserted against, such Contributor by reason
181
+ of your accepting any such warranty or additional liability.
182
+
183
+ END OF TERMS AND CONDITIONS
184
+
185
+ APPENDIX: How to apply the Apache License to your work.
186
+
187
+ To apply the Apache License to your work, attach the following
188
+ boilerplate notice, with the fields enclosed by brackets "[]"
189
+ replaced with your own identifying information. (Don't include
190
+ the brackets!) The text should be enclosed in the appropriate
191
+ comment syntax for the file format. We also recommend that a
192
+ file or class name and description of purpose be included on the
193
+ same "printed page" as the copyright notice for easier
194
+ identification within third-party archives.
195
+
196
+ Copyright 2020 Matthew Barnett
197
+
198
+ Licensed under the Apache License, Version 2.0 (the "License");
199
+ you may not use this file except in compliance with the License.
200
+ You may obtain a copy of the License at
201
+
202
+ http://www.apache.org/licenses/LICENSE-2.0
203
+
204
+ Unless required by applicable law or agreed to in writing, software
205
+ distributed under the License is distributed on an "AS IS" BASIS,
206
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
207
+ See the License for the specific language governing permissions and
208
+ limitations under the License.
lib/python3.12/site-packages/regex-2024.11.6.dist-info/METADATA ADDED
@@ -0,0 +1,1060 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: regex
3
+ Version: 2024.11.6
4
+ Summary: Alternative regular expression module, to replace re.
5
+ Home-page: https://github.com/mrabarnett/mrab-regex
6
+ Author: Matthew Barnett
7
+ Author-email: regex@mrabarnett.plus.com
8
+ License: Apache Software License
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Text Processing
22
+ Classifier: Topic :: Text Processing :: General
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/x-rst
25
+ License-File: LICENSE.txt
26
+
27
+ Introduction
28
+ ------------
29
+
30
+ This regex implementation is backwards-compatible with the standard 're' module, but offers additional functionality.
31
+
32
+ Python 2
33
+ --------
34
+
35
+ Python 2 is no longer supported. The last release that supported Python 2 was 2021.11.10.
36
+
37
+ PyPy
38
+ ----
39
+
40
+ This module is targeted at CPython. It expects that all codepoints are the same width, so it won't behave properly with PyPy outside U+0000..U+007F because PyPy stores strings as UTF-8.
41
+
42
+ Multithreading
43
+ --------------
44
+
45
+ The regex module releases the GIL during matching on instances of the built-in (immutable) string classes, enabling other Python threads to run concurrently. It is also possible to force the regex module to release the GIL during matching by calling the matching methods with the keyword argument ``concurrent=True``. The behaviour is undefined if the string changes during matching, so use it *only* when it is guaranteed that that won't happen.
46
+
47
+ Unicode
48
+ -------
49
+
50
+ This module supports Unicode 16.0.0. Full Unicode case-folding is supported.
51
+
52
+ Flags
53
+ -----
54
+
55
+ There are 2 kinds of flag: scoped and global. Scoped flags can apply to only part of a pattern and can be turned on or off; global flags apply to the entire pattern and can only be turned on.
56
+
57
+ The scoped flags are: ``ASCII (?a)``, ``FULLCASE (?f)``, ``IGNORECASE (?i)``, ``LOCALE (?L)``, ``MULTILINE (?m)``, ``DOTALL (?s)``, ``UNICODE (?u)``, ``VERBOSE (?x)``, ``WORD (?w)``.
58
+
59
+ The global flags are: ``BESTMATCH (?b)``, ``ENHANCEMATCH (?e)``, ``POSIX (?p)``, ``REVERSE (?r)``, ``VERSION0 (?V0)``, ``VERSION1 (?V1)``.
60
+
61
+ If neither the ``ASCII``, ``LOCALE`` nor ``UNICODE`` flag is specified, it will default to ``UNICODE`` if the regex pattern is a Unicode string and ``ASCII`` if it's a bytestring.
62
+
63
+ The ``ENHANCEMATCH`` flag makes fuzzy matching attempt to improve the fit of the next match that it finds.
64
+
65
+ The ``BESTMATCH`` flag makes fuzzy matching search for the best match instead of the next match.
66
+
67
+ Old vs new behaviour
68
+ --------------------
69
+
70
+ In order to be compatible with the re module, this module has 2 behaviours:
71
+
72
+ * **Version 0** behaviour (old behaviour, compatible with the re module):
73
+
74
+ Please note that the re module's behaviour may change over time, and I'll endeavour to match that behaviour in version 0.
75
+
76
+ * Indicated by the ``VERSION0`` flag.
77
+
78
+ * Zero-width matches are not handled correctly in the re module before Python 3.7. The behaviour in those earlier versions is:
79
+
80
+ * ``.split`` won't split a string at a zero-width match.
81
+
82
+ * ``.sub`` will advance by one character after a zero-width match.
83
+
84
+ * Inline flags apply to the entire pattern, and they can't be turned off.
85
+
86
+ * Only simple sets are supported.
87
+
88
+ * Case-insensitive matches in Unicode use simple case-folding by default.
89
+
90
+ * **Version 1** behaviour (new behaviour, possibly different from the re module):
91
+
92
+ * Indicated by the ``VERSION1`` flag.
93
+
94
+ * Zero-width matches are handled correctly.
95
+
96
+ * Inline flags apply to the end of the group or pattern, and they can be turned off.
97
+
98
+ * Nested sets and set operations are supported.
99
+
100
+ * Case-insensitive matches in Unicode use full case-folding by default.
101
+
102
+ If no version is specified, the regex module will default to ``regex.DEFAULT_VERSION``.
103
+
104
+ Case-insensitive matches in Unicode
105
+ -----------------------------------
106
+
107
+ The regex module supports both simple and full case-folding for case-insensitive matches in Unicode. Use of full case-folding can be turned on using the ``FULLCASE`` flag. Please note that this flag affects how the ``IGNORECASE`` flag works; the ``FULLCASE`` flag itself does not turn on case-insensitive matching.
108
+
109
+ Version 0 behaviour: the flag is off by default.
110
+
111
+ Version 1 behaviour: the flag is on by default.
112
+
113
+ Nested sets and set operations
114
+ ------------------------------
115
+
116
+ It's not possible to support both simple sets, as used in the re module, and nested sets at the same time because of a difference in the meaning of an unescaped ``"["`` in a set.
117
+
118
+ For example, the pattern ``[[a-z]--[aeiou]]`` is treated in the version 0 behaviour (simple sets, compatible with the re module) as:
119
+
120
+ * Set containing "[" and the letters "a" to "z"
121
+
122
+ * Literal "--"
123
+
124
+ * Set containing letters "a", "e", "i", "o", "u"
125
+
126
+ * Literal "]"
127
+
128
+ but in the version 1 behaviour (nested sets, enhanced behaviour) as:
129
+
130
+ * Set which is:
131
+
132
+ * Set containing the letters "a" to "z"
133
+
134
+ * but excluding:
135
+
136
+ * Set containing the letters "a", "e", "i", "o", "u"
137
+
138
+ Version 0 behaviour: only simple sets are supported.
139
+
140
+ Version 1 behaviour: nested sets and set operations are supported.
141
+
142
+ Notes on named groups
143
+ ---------------------
144
+
145
+ All groups have a group number, starting from 1.
146
+
147
+ Groups with the same group name will have the same group number, and groups with a different group name will have a different group number.
148
+
149
+ The same name can be used by more than one group, with later captures 'overwriting' earlier captures. All the captures of the group will be available from the ``captures`` method of the match object.
150
+
151
+ Group numbers will be reused across different branches of a branch reset, eg. ``(?|(first)|(second))`` has only group 1. If groups have different group names then they will, of course, have different group numbers, eg. ``(?|(?P<foo>first)|(?P<bar>second))`` has group 1 ("foo") and group 2 ("bar").
152
+
153
+ In the regex ``(\s+)(?|(?P<foo>[A-Z]+)|(\w+) (?P<foo>[0-9]+)`` there are 2 groups:
154
+
155
+ * ``(\s+)`` is group 1.
156
+
157
+ * ``(?P<foo>[A-Z]+)`` is group 2, also called "foo".
158
+
159
+ * ``(\w+)`` is group 2 because of the branch reset.
160
+
161
+ * ``(?P<foo>[0-9]+)`` is group 2 because it's called "foo".
162
+
163
+ If you want to prevent ``(\w+)`` from being group 2, you need to name it (different name, different group number).
164
+
165
+ Additional features
166
+ -------------------
167
+
168
+ The issue numbers relate to the Python bug tracker, except where listed otherwise.
169
+
170
+ Added ``\p{Horiz_Space}`` and ``\p{Vert_Space}`` (`GitHub issue 477 <https://github.com/mrabarnett/mrab-regex/issues/477#issuecomment-1216779547>`_)
171
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172
+
173
+ ``\p{Horiz_Space}`` or ``\p{H}`` matches horizontal whitespace and ``\p{Vert_Space}`` or ``\p{V}`` matches vertical whitespace.
174
+
175
+ Added support for lookaround in conditional pattern (`Hg issue 163 <https://github.com/mrabarnett/mrab-regex/issues/163>`_)
176
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
177
+
178
+ The test of a conditional pattern can be a lookaround.
179
+
180
+ .. sourcecode:: python
181
+
182
+ >>> regex.match(r'(?(?=\d)\d+|\w+)', '123abc')
183
+ <regex.Match object; span=(0, 3), match='123'>
184
+ >>> regex.match(r'(?(?=\d)\d+|\w+)', 'abc123')
185
+ <regex.Match object; span=(0, 6), match='abc123'>
186
+
187
+ This is not quite the same as putting a lookaround in the first branch of a pair of alternatives.
188
+
189
+ .. sourcecode:: python
190
+
191
+ >>> print(regex.match(r'(?:(?=\d)\d+\b|\w+)', '123abc'))
192
+ <regex.Match object; span=(0, 6), match='123abc'>
193
+ >>> print(regex.match(r'(?(?=\d)\d+\b|\w+)', '123abc'))
194
+ None
195
+
196
+ In the first example, the lookaround matched, but the remainder of the first branch failed to match, and so the second branch was attempted, whereas in the second example, the lookaround matched, and the first branch failed to match, but the second branch was **not** attempted.
197
+
198
+ Added POSIX matching (leftmost longest) (`Hg issue 150 <https://github.com/mrabarnett/mrab-regex/issues/150>`_)
199
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200
+
201
+ The POSIX standard for regex is to return the leftmost longest match. This can be turned on using the ``POSIX`` flag.
202
+
203
+ .. sourcecode:: python
204
+
205
+ >>> # Normal matching.
206
+ >>> regex.search(r'Mr|Mrs', 'Mrs')
207
+ <regex.Match object; span=(0, 2), match='Mr'>
208
+ >>> regex.search(r'one(self)?(selfsufficient)?', 'oneselfsufficient')
209
+ <regex.Match object; span=(0, 7), match='oneself'>
210
+ >>> # POSIX matching.
211
+ >>> regex.search(r'(?p)Mr|Mrs', 'Mrs')
212
+ <regex.Match object; span=(0, 3), match='Mrs'>
213
+ >>> regex.search(r'(?p)one(self)?(selfsufficient)?', 'oneselfsufficient')
214
+ <regex.Match object; span=(0, 17), match='oneselfsufficient'>
215
+
216
+ Note that it will take longer to find matches because when it finds a match at a certain position, it won't return that immediately, but will keep looking to see if there's another longer match there.
217
+
218
+ Added ``(?(DEFINE)...)`` (`Hg issue 152 <https://github.com/mrabarnett/mrab-regex/issues/152>`_)
219
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220
+
221
+ If there's no group called "DEFINE", then ... will be ignored except that any groups defined within it can be called and that the normal rules for numbering groups still apply.
222
+
223
+ .. sourcecode:: python
224
+
225
+ >>> regex.search(r'(?(DEFINE)(?P<quant>\d+)(?P<item>\w+))(?&quant) (?&item)', '5 elephants')
226
+ <regex.Match object; span=(0, 11), match='5 elephants'>
227
+
228
+ Added ``(*PRUNE)``, ``(*SKIP)`` and ``(*FAIL)`` (`Hg issue 153 <https://github.com/mrabarnett/mrab-regex/issues/153>`_)
229
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230
+
231
+ ``(*PRUNE)`` discards the backtracking info up to that point. When used in an atomic group or a lookaround, it won't affect the enclosing pattern.
232
+
233
+ ``(*SKIP)`` is similar to ``(*PRUNE)``, except that it also sets where in the text the next attempt to match will start. When used in an atomic group or a lookaround, it won't affect the enclosing pattern.
234
+
235
+ ``(*FAIL)`` causes immediate backtracking. ``(*F)`` is a permitted abbreviation.
236
+
237
+ Added ``\K`` (`Hg issue 151 <https://github.com/mrabarnett/mrab-regex/issues/151>`_)
238
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
239
+
240
+ Keeps the part of the entire match after the position where ``\K`` occurred; the part before it is discarded.
241
+
242
+ It does not affect what groups return.
243
+
244
+ .. sourcecode:: python
245
+
246
+ >>> m = regex.search(r'(\w\w\K\w\w\w)', 'abcdef')
247
+ >>> m[0]
248
+ 'cde'
249
+ >>> m[1]
250
+ 'abcde'
251
+ >>>
252
+ >>> m = regex.search(r'(?r)(\w\w\K\w\w\w)', 'abcdef')
253
+ >>> m[0]
254
+ 'bc'
255
+ >>> m[1]
256
+ 'bcdef'
257
+
258
+ Added capture subscripting for ``expandf`` and ``subf``/``subfn`` (`Hg issue 133 <https://github.com/mrabarnett/mrab-regex/issues/133>`_)
259
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
260
+
261
+ You can use subscripting to get the captures of a repeated group.
262
+
263
+ .. sourcecode:: python
264
+
265
+ >>> m = regex.match(r"(\w)+", "abc")
266
+ >>> m.expandf("{1}")
267
+ 'c'
268
+ >>> m.expandf("{1[0]} {1[1]} {1[2]}")
269
+ 'a b c'
270
+ >>> m.expandf("{1[-1]} {1[-2]} {1[-3]}")
271
+ 'c b a'
272
+ >>>
273
+ >>> m = regex.match(r"(?P<letter>\w)+", "abc")
274
+ >>> m.expandf("{letter}")
275
+ 'c'
276
+ >>> m.expandf("{letter[0]} {letter[1]} {letter[2]}")
277
+ 'a b c'
278
+ >>> m.expandf("{letter[-1]} {letter[-2]} {letter[-3]}")
279
+ 'c b a'
280
+
281
+ Added support for referring to a group by number using ``(?P=...)``
282
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
283
+
284
+ This is in addition to the existing ``\g<...>``.
285
+
286
+ Fixed the handling of locale-sensitive regexes
287
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
288
+
289
+ The ``LOCALE`` flag is intended for legacy code and has limited support. You're still recommended to use Unicode instead.
290
+
291
+ Added partial matches (`Hg issue 102 <https://github.com/mrabarnett/mrab-regex/issues/102>`_)
292
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
293
+
294
+ A partial match is one that matches up to the end of string, but that string has been truncated and you want to know whether a complete match could be possible if the string had not been truncated.
295
+
296
+ Partial matches are supported by ``match``, ``search``, ``fullmatch`` and ``finditer`` with the ``partial`` keyword argument.
297
+
298
+ Match objects have a ``partial`` attribute, which is ``True`` if it's a partial match.
299
+
300
+ For example, if you wanted a user to enter a 4-digit number and check it character by character as it was being entered:
301
+
302
+ .. sourcecode:: python
303
+
304
+ >>> pattern = regex.compile(r'\d{4}')
305
+
306
+ >>> # Initially, nothing has been entered:
307
+ >>> print(pattern.fullmatch('', partial=True))
308
+ <regex.Match object; span=(0, 0), match='', partial=True>
309
+
310
+ >>> # An empty string is OK, but it's only a partial match.
311
+ >>> # The user enters a letter:
312
+ >>> print(pattern.fullmatch('a', partial=True))
313
+ None
314
+ >>> # It'll never match.
315
+
316
+ >>> # The user deletes that and enters a digit:
317
+ >>> print(pattern.fullmatch('1', partial=True))
318
+ <regex.Match object; span=(0, 1), match='1', partial=True>
319
+ >>> # It matches this far, but it's only a partial match.
320
+
321
+ >>> # The user enters 2 more digits:
322
+ >>> print(pattern.fullmatch('123', partial=True))
323
+ <regex.Match object; span=(0, 3), match='123', partial=True>
324
+ >>> # It matches this far, but it's only a partial match.
325
+
326
+ >>> # The user enters another digit:
327
+ >>> print(pattern.fullmatch('1234', partial=True))
328
+ <regex.Match object; span=(0, 4), match='1234'>
329
+ >>> # It's a complete match.
330
+
331
+ >>> # If the user enters another digit:
332
+ >>> print(pattern.fullmatch('12345', partial=True))
333
+ None
334
+ >>> # It's no longer a match.
335
+
336
+ >>> # This is a partial match:
337
+ >>> pattern.match('123', partial=True).partial
338
+ True
339
+
340
+ >>> # This is a complete match:
341
+ >>> pattern.match('1233', partial=True).partial
342
+ False
343
+
344
+ ``*`` operator not working correctly with sub() (`Hg issue 106 <https://github.com/mrabarnett/mrab-regex/issues/106>`_)
345
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
346
+
347
+ Sometimes it's not clear how zero-width matches should be handled. For example, should ``.*`` match 0 characters directly after matching >0 characters?
348
+
349
+ .. sourcecode:: python
350
+
351
+ >>> regex.sub('.*', 'x', 'test')
352
+ 'xx'
353
+ >>> regex.sub('.*?', '|', 'test')
354
+ '|||||||||'
355
+
356
+ Added ``capturesdict`` (`Hg issue 86 <https://github.com/mrabarnett/mrab-regex/issues/86>`_)
357
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
358
+
359
+ ``capturesdict`` is a combination of ``groupdict`` and ``captures``:
360
+
361
+ ``groupdict`` returns a dict of the named groups and the last capture of those groups.
362
+
363
+ ``captures`` returns a list of all the captures of a group
364
+
365
+ ``capturesdict`` returns a dict of the named groups and lists of all the captures of those groups.
366
+
367
+ .. sourcecode:: python
368
+
369
+ >>> m = regex.match(r"(?:(?P<word>\w+) (?P<digits>\d+)\n)+", "one 1\ntwo 2\nthree 3\n")
370
+ >>> m.groupdict()
371
+ {'word': 'three', 'digits': '3'}
372
+ >>> m.captures("word")
373
+ ['one', 'two', 'three']
374
+ >>> m.captures("digits")
375
+ ['1', '2', '3']
376
+ >>> m.capturesdict()
377
+ {'word': ['one', 'two', 'three'], 'digits': ['1', '2', '3']}
378
+
379
+ Added ``allcaptures`` and ``allspans`` (`Git issue 474 <https://github.com/mrabarnett/mrab-regex/issues/474>`_)
380
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
381
+
382
+ ``allcaptures`` returns a list of all the captures of all the groups.
383
+
384
+ ``allspans`` returns a list of all the spans of the all captures of all the groups.
385
+
386
+ .. sourcecode:: python
387
+
388
+ >>> m = regex.match(r"(?:(?P<word>\w+) (?P<digits>\d+)\n)+", "one 1\ntwo 2\nthree 3\n")
389
+ >>> m.allcaptures()
390
+ (['one 1\ntwo 2\nthree 3\n'], ['one', 'two', 'three'], ['1', '2', '3'])
391
+ >>> m.allspans()
392
+ ([(0, 20)], [(0, 3), (6, 9), (12, 17)], [(4, 5), (10, 11), (18, 19)])
393
+
394
+ Allow duplicate names of groups (`Hg issue 87 <https://github.com/mrabarnett/mrab-regex/issues/87>`_)
395
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
396
+
397
+ Group names can be duplicated.
398
+
399
+ .. sourcecode:: python
400
+
401
+ >>> # With optional groups:
402
+ >>>
403
+ >>> # Both groups capture, the second capture 'overwriting' the first.
404
+ >>> m = regex.match(r"(?P<item>\w+)? or (?P<item>\w+)?", "first or second")
405
+ >>> m.group("item")
406
+ 'second'
407
+ >>> m.captures("item")
408
+ ['first', 'second']
409
+ >>> # Only the second group captures.
410
+ >>> m = regex.match(r"(?P<item>\w+)? or (?P<item>\w+)?", " or second")
411
+ >>> m.group("item")
412
+ 'second'
413
+ >>> m.captures("item")
414
+ ['second']
415
+ >>> # Only the first group captures.
416
+ >>> m = regex.match(r"(?P<item>\w+)? or (?P<item>\w+)?", "first or ")
417
+ >>> m.group("item")
418
+ 'first'
419
+ >>> m.captures("item")
420
+ ['first']
421
+ >>>
422
+ >>> # With mandatory groups:
423
+ >>>
424
+ >>> # Both groups capture, the second capture 'overwriting' the first.
425
+ >>> m = regex.match(r"(?P<item>\w*) or (?P<item>\w*)?", "first or second")
426
+ >>> m.group("item")
427
+ 'second'
428
+ >>> m.captures("item")
429
+ ['first', 'second']
430
+ >>> # Again, both groups capture, the second capture 'overwriting' the first.
431
+ >>> m = regex.match(r"(?P<item>\w*) or (?P<item>\w*)", " or second")
432
+ >>> m.group("item")
433
+ 'second'
434
+ >>> m.captures("item")
435
+ ['', 'second']
436
+ >>> # And yet again, both groups capture, the second capture 'overwriting' the first.
437
+ >>> m = regex.match(r"(?P<item>\w*) or (?P<item>\w*)", "first or ")
438
+ >>> m.group("item")
439
+ ''
440
+ >>> m.captures("item")
441
+ ['first', '']
442
+
443
+ Added ``fullmatch`` (`issue #16203 <https://bugs.python.org/issue16203>`_)
444
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
445
+
446
+ ``fullmatch`` behaves like ``match``, except that it must match all of the string.
447
+
448
+ .. sourcecode:: python
449
+
450
+ >>> print(regex.fullmatch(r"abc", "abc").span())
451
+ (0, 3)
452
+ >>> print(regex.fullmatch(r"abc", "abcx"))
453
+ None
454
+ >>> print(regex.fullmatch(r"abc", "abcx", endpos=3).span())
455
+ (0, 3)
456
+ >>> print(regex.fullmatch(r"abc", "xabcy", pos=1, endpos=4).span())
457
+ (1, 4)
458
+ >>>
459
+ >>> regex.match(r"a.*?", "abcd").group(0)
460
+ 'a'
461
+ >>> regex.fullmatch(r"a.*?", "abcd").group(0)
462
+ 'abcd'
463
+
464
+ Added ``subf`` and ``subfn``
465
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
466
+
467
+ ``subf`` and ``subfn`` are alternatives to ``sub`` and ``subn`` respectively. When passed a replacement string, they treat it as a format string.
468
+
469
+ .. sourcecode:: python
470
+
471
+ >>> regex.subf(r"(\w+) (\w+)", "{0} => {2} {1}", "foo bar")
472
+ 'foo bar => bar foo'
473
+ >>> regex.subf(r"(?P<word1>\w+) (?P<word2>\w+)", "{word2} {word1}", "foo bar")
474
+ 'bar foo'
475
+
476
+ Added ``expandf`` to match object
477
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
478
+
479
+ ``expandf`` is an alternative to ``expand``. When passed a replacement string, it treats it as a format string.
480
+
481
+ .. sourcecode:: python
482
+
483
+ >>> m = regex.match(r"(\w+) (\w+)", "foo bar")
484
+ >>> m.expandf("{0} => {2} {1}")
485
+ 'foo bar => bar foo'
486
+ >>>
487
+ >>> m = regex.match(r"(?P<word1>\w+) (?P<word2>\w+)", "foo bar")
488
+ >>> m.expandf("{word2} {word1}")
489
+ 'bar foo'
490
+
491
+ Detach searched string
492
+ ^^^^^^^^^^^^^^^^^^^^^^
493
+
494
+ A match object contains a reference to the string that was searched, via its ``string`` attribute. The ``detach_string`` method will 'detach' that string, making it available for garbage collection, which might save valuable memory if that string is very large.
495
+
496
+ .. sourcecode:: python
497
+
498
+ >>> m = regex.search(r"\w+", "Hello world")
499
+ >>> print(m.group())
500
+ Hello
501
+ >>> print(m.string)
502
+ Hello world
503
+ >>> m.detach_string()
504
+ >>> print(m.group())
505
+ Hello
506
+ >>> print(m.string)
507
+ None
508
+
509
+ Recursive patterns (`Hg issue 27 <https://github.com/mrabarnett/mrab-regex/issues/27>`_)
510
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
511
+
512
+ Recursive and repeated patterns are supported.
513
+
514
+ ``(?R)`` or ``(?0)`` tries to match the entire regex recursively. ``(?1)``, ``(?2)``, etc, try to match the relevant group.
515
+
516
+ ``(?&name)`` tries to match the named group.
517
+
518
+ .. sourcecode:: python
519
+
520
+ >>> regex.match(r"(Tarzan|Jane) loves (?1)", "Tarzan loves Jane").groups()
521
+ ('Tarzan',)
522
+ >>> regex.match(r"(Tarzan|Jane) loves (?1)", "Jane loves Tarzan").groups()
523
+ ('Jane',)
524
+
525
+ >>> m = regex.search(r"(\w)(?:(?R)|(\w?))\1", "kayak")
526
+ >>> m.group(0, 1, 2)
527
+ ('kayak', 'k', None)
528
+
529
+ The first two examples show how the subpattern within the group is reused, but is _not_ itself a group. In other words, ``"(Tarzan|Jane) loves (?1)"`` is equivalent to ``"(Tarzan|Jane) loves (?:Tarzan|Jane)"``.
530
+
531
+ It's possible to backtrack into a recursed or repeated group.
532
+
533
+ You can't call a group if there is more than one group with that group name or group number (``"ambiguous group reference"``).
534
+
535
+ The alternative forms ``(?P>name)`` and ``(?P&name)`` are also supported.
536
+
537
+ Full Unicode case-folding is supported
538
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
539
+
540
+ In version 1 behaviour, the regex module uses full case-folding when performing case-insensitive matches in Unicode.
541
+
542
+ .. sourcecode:: python
543
+
544
+ >>> regex.match(r"(?iV1)strasse", "stra\N{LATIN SMALL LETTER SHARP S}e").span()
545
+ (0, 6)
546
+ >>> regex.match(r"(?iV1)stra\N{LATIN SMALL LETTER SHARP S}e", "STRASSE").span()
547
+ (0, 7)
548
+
549
+ In version 0 behaviour, it uses simple case-folding for backward compatibility with the re module.
550
+
551
+ Approximate "fuzzy" matching (`Hg issue 12 <https://github.com/mrabarnett/mrab-regex/issues/12>`_, `Hg issue 41 <https://github.com/mrabarnett/mrab-regex/issues/41>`_, `Hg issue 109 <https://github.com/mrabarnett/mrab-regex/issues/109>`_)
552
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
553
+
554
+ Regex usually attempts an exact match, but sometimes an approximate, or "fuzzy", match is needed, for those cases where the text being searched may contain errors in the form of inserted, deleted or substituted characters.
555
+
556
+ A fuzzy regex specifies which types of errors are permitted, and, optionally, either the minimum and maximum or only the maximum permitted number of each type. (You cannot specify only a minimum.)
557
+
558
+ The 3 types of error are:
559
+
560
+ * Insertion, indicated by "i"
561
+
562
+ * Deletion, indicated by "d"
563
+
564
+ * Substitution, indicated by "s"
565
+
566
+ In addition, "e" indicates any type of error.
567
+
568
+ The fuzziness of a regex item is specified between "{" and "}" after the item.
569
+
570
+ Examples:
571
+
572
+ * ``foo`` match "foo" exactly
573
+
574
+ * ``(?:foo){i}`` match "foo", permitting insertions
575
+
576
+ * ``(?:foo){d}`` match "foo", permitting deletions
577
+
578
+ * ``(?:foo){s}`` match "foo", permitting substitutions
579
+
580
+ * ``(?:foo){i,s}`` match "foo", permitting insertions and substitutions
581
+
582
+ * ``(?:foo){e}`` match "foo", permitting errors
583
+
584
+ If a certain type of error is specified, then any type not specified will **not** be permitted.
585
+
586
+ In the following examples I'll omit the item and write only the fuzziness:
587
+
588
+ * ``{d<=3}`` permit at most 3 deletions, but no other types
589
+
590
+ * ``{i<=1,s<=2}`` permit at most 1 insertion and at most 2 substitutions, but no deletions
591
+
592
+ * ``{1<=e<=3}`` permit at least 1 and at most 3 errors
593
+
594
+ * ``{i<=2,d<=2,e<=3}`` permit at most 2 insertions, at most 2 deletions, at most 3 errors in total, but no substitutions
595
+
596
+ It's also possible to state the costs of each type of error and the maximum permitted total cost.
597
+
598
+ Examples:
599
+
600
+ * ``{2i+2d+1s<=4}`` each insertion costs 2, each deletion costs 2, each substitution costs 1, the total cost must not exceed 4
601
+
602
+ * ``{i<=1,d<=1,s<=1,2i+2d+1s<=4}`` at most 1 insertion, at most 1 deletion, at most 1 substitution; each insertion costs 2, each deletion costs 2, each substitution costs 1, the total cost must not exceed 4
603
+
604
+ You can also use "<" instead of "<=" if you want an exclusive minimum or maximum.
605
+
606
+ You can add a test to perform on a character that's substituted or inserted.
607
+
608
+ Examples:
609
+
610
+ * ``{s<=2:[a-z]}`` at most 2 substitutions, which must be in the character set ``[a-z]``.
611
+
612
+ * ``{s<=2,i<=3:\d}`` at most 2 substitutions, at most 3 insertions, which must be digits.
613
+
614
+ By default, fuzzy matching searches for the first match that meets the given constraints. The ``ENHANCEMATCH`` flag will cause it to attempt to improve the fit (i.e. reduce the number of errors) of the match that it has found.
615
+
616
+ The ``BESTMATCH`` flag will make it search for the best match instead.
617
+
618
+ Further examples to note:
619
+
620
+ * ``regex.search("(dog){e}", "cat and dog")[1]`` returns ``"cat"`` because that matches ``"dog"`` with 3 errors (an unlimited number of errors is permitted).
621
+
622
+ * ``regex.search("(dog){e<=1}", "cat and dog")[1]`` returns ``" dog"`` (with a leading space) because that matches ``"dog"`` with 1 error, which is within the limit.
623
+
624
+ * ``regex.search("(?e)(dog){e<=1}", "cat and dog")[1]`` returns ``"dog"`` (without a leading space) because the fuzzy search matches ``" dog"`` with 1 error, which is within the limit, and the ``(?e)`` then it attempts a better fit.
625
+
626
+ In the first two examples there are perfect matches later in the string, but in neither case is it the first possible match.
627
+
628
+ The match object has an attribute ``fuzzy_counts`` which gives the total number of substitutions, insertions and deletions.
629
+
630
+ .. sourcecode:: python
631
+
632
+ >>> # A 'raw' fuzzy match:
633
+ >>> regex.fullmatch(r"(?:cats|cat){e<=1}", "cat").fuzzy_counts
634
+ (0, 0, 1)
635
+ >>> # 0 substitutions, 0 insertions, 1 deletion.
636
+
637
+ >>> # A better match might be possible if the ENHANCEMATCH flag used:
638
+ >>> regex.fullmatch(r"(?e)(?:cats|cat){e<=1}", "cat").fuzzy_counts
639
+ (0, 0, 0)
640
+ >>> # 0 substitutions, 0 insertions, 0 deletions.
641
+
642
+ The match object also has an attribute ``fuzzy_changes`` which gives a tuple of the positions of the substitutions, insertions and deletions.
643
+
644
+ .. sourcecode:: python
645
+
646
+ >>> m = regex.search('(fuu){i<=2,d<=2,e<=5}', 'anaconda foo bar')
647
+ >>> m
648
+ <regex.Match object; span=(7, 10), match='a f', fuzzy_counts=(0, 2, 2)>
649
+ >>> m.fuzzy_changes
650
+ ([], [7, 8], [10, 11])
651
+
652
+ What this means is that if the matched part of the string had been:
653
+
654
+ .. sourcecode:: python
655
+
656
+ 'anacondfuuoo bar'
657
+
658
+ it would've been an exact match.
659
+
660
+ However, there were insertions at positions 7 and 8:
661
+
662
+ .. sourcecode:: python
663
+
664
+ 'anaconda fuuoo bar'
665
+ ^^
666
+
667
+ and deletions at positions 10 and 11:
668
+
669
+ .. sourcecode:: python
670
+
671
+ 'anaconda f~~oo bar'
672
+ ^^
673
+
674
+ So the actual string was:
675
+
676
+ .. sourcecode:: python
677
+
678
+ 'anaconda foo bar'
679
+
680
+ Named lists ``\L<name>`` (`Hg issue 11 <https://github.com/mrabarnett/mrab-regex/issues/11>`_)
681
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
682
+
683
+ There are occasions where you may want to include a list (actually, a set) of options in a regex.
684
+
685
+ One way is to build the pattern like this:
686
+
687
+ .. sourcecode:: python
688
+
689
+ >>> p = regex.compile(r"first|second|third|fourth|fifth")
690
+
691
+ but if the list is large, parsing the resulting regex can take considerable time, and care must also be taken that the strings are properly escaped and properly ordered, for example, "cats" before "cat".
692
+
693
+ The new alternative is to use a named list:
694
+
695
+ .. sourcecode:: python
696
+
697
+ >>> option_set = ["first", "second", "third", "fourth", "fifth"]
698
+ >>> p = regex.compile(r"\L<options>", options=option_set)
699
+
700
+ The order of the items is irrelevant, they are treated as a set. The named lists are available as the ``.named_lists`` attribute of the pattern object :
701
+
702
+ .. sourcecode:: python
703
+
704
+ >>> print(p.named_lists)
705
+ {'options': frozenset({'third', 'first', 'fifth', 'fourth', 'second'})}
706
+
707
+ If there are any unused keyword arguments, ``ValueError`` will be raised unless you tell it otherwise:
708
+
709
+ .. sourcecode:: python
710
+
711
+ >>> option_set = ["first", "second", "third", "fourth", "fifth"]
712
+ >>> p = regex.compile(r"\L<options>", options=option_set, other_options=[])
713
+ Traceback (most recent call last):
714
+ File "<stdin>", line 1, in <module>
715
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 353, in compile
716
+ return _compile(pattern, flags, ignore_unused, kwargs, cache_pattern)
717
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 500, in _compile
718
+ complain_unused_args()
719
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 483, in complain_unused_args
720
+ raise ValueError('unused keyword argument {!a}'.format(any_one))
721
+ ValueError: unused keyword argument 'other_options'
722
+ >>> p = regex.compile(r"\L<options>", options=option_set, other_options=[], ignore_unused=True)
723
+ >>> p = regex.compile(r"\L<options>", options=option_set, other_options=[], ignore_unused=False)
724
+ Traceback (most recent call last):
725
+ File "<stdin>", line 1, in <module>
726
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 353, in compile
727
+ return _compile(pattern, flags, ignore_unused, kwargs, cache_pattern)
728
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 500, in _compile
729
+ complain_unused_args()
730
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 483, in complain_unused_args
731
+ raise ValueError('unused keyword argument {!a}'.format(any_one))
732
+ ValueError: unused keyword argument 'other_options'
733
+ >>>
734
+
735
+ Start and end of word
736
+ ^^^^^^^^^^^^^^^^^^^^^
737
+
738
+ ``\m`` matches at the start of a word.
739
+
740
+ ``\M`` matches at the end of a word.
741
+
742
+ Compare with ``\b``, which matches at the start or end of a word.
743
+
744
+ Unicode line separators
745
+ ^^^^^^^^^^^^^^^^^^^^^^^
746
+
747
+ Normally the only line separator is ``\n`` (``\x0A``), but if the ``WORD`` flag is turned on then the line separators are ``\x0D\x0A``, ``\x0A``, ``\x0B``, ``\x0C`` and ``\x0D``, plus ``\x85``, ``\u2028`` and ``\u2029`` when working with Unicode.
748
+
749
+ This affects the regex dot ``"."``, which, with the ``DOTALL`` flag turned off, matches any character except a line separator. It also affects the line anchors ``^`` and ``$`` (in multiline mode).
750
+
751
+ Set operators
752
+ ^^^^^^^^^^^^^
753
+
754
+ **Version 1 behaviour only**
755
+
756
+ Set operators have been added, and a set ``[...]`` can include nested sets.
757
+
758
+ The operators, in order of increasing precedence, are:
759
+
760
+ * ``||`` for union ("x||y" means "x or y")
761
+
762
+ * ``~~`` (double tilde) for symmetric difference ("x~~y" means "x or y, but not both")
763
+
764
+ * ``&&`` for intersection ("x&&y" means "x and y")
765
+
766
+ * ``--`` (double dash) for difference ("x--y" means "x but not y")
767
+
768
+ Implicit union, ie, simple juxtaposition like in ``[ab]``, has the highest precedence. Thus, ``[ab&&cd]`` is the same as ``[[a||b]&&[c||d]]``.
769
+
770
+ Examples:
771
+
772
+ * ``[ab]`` # Set containing 'a' and 'b'
773
+
774
+ * ``[a-z]`` # Set containing 'a' .. 'z'
775
+
776
+ * ``[[a-z]--[qw]]`` # Set containing 'a' .. 'z', but not 'q' or 'w'
777
+
778
+ * ``[a-z--qw]`` # Same as above
779
+
780
+ * ``[\p{L}--QW]`` # Set containing all letters except 'Q' and 'W'
781
+
782
+ * ``[\p{N}--[0-9]]`` # Set containing all numbers except '0' .. '9'
783
+
784
+ * ``[\p{ASCII}&&\p{Letter}]`` # Set containing all characters which are ASCII and letter
785
+
786
+ regex.escape (`issue #2650 <https://bugs.python.org/issue2650>`_)
787
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
788
+
789
+ regex.escape has an additional keyword parameter ``special_only``. When True, only 'special' regex characters, such as '?', are escaped.
790
+
791
+ .. sourcecode:: python
792
+
793
+ >>> regex.escape("foo!?", special_only=False)
794
+ 'foo\\!\\?'
795
+ >>> regex.escape("foo!?", special_only=True)
796
+ 'foo!\\?'
797
+
798
+ regex.escape (`Hg issue 249 <https://github.com/mrabarnett/mrab-regex/issues/249>`_)
799
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
800
+
801
+ regex.escape has an additional keyword parameter ``literal_spaces``. When True, spaces are not escaped.
802
+
803
+ .. sourcecode:: python
804
+
805
+ >>> regex.escape("foo bar!?", literal_spaces=False)
806
+ 'foo\\ bar!\\?'
807
+ >>> regex.escape("foo bar!?", literal_spaces=True)
808
+ 'foo bar!\\?'
809
+
810
+ Repeated captures (`issue #7132 <https://bugs.python.org/issue7132>`_)
811
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
812
+
813
+ A match object has additional methods which return information on all the successful matches of a repeated group. These methods are:
814
+
815
+ * ``matchobject.captures([group1, ...])``
816
+
817
+ * Returns a list of the strings matched in a group or groups. Compare with ``matchobject.group([group1, ...])``.
818
+
819
+ * ``matchobject.starts([group])``
820
+
821
+ * Returns a list of the start positions. Compare with ``matchobject.start([group])``.
822
+
823
+ * ``matchobject.ends([group])``
824
+
825
+ * Returns a list of the end positions. Compare with ``matchobject.end([group])``.
826
+
827
+ * ``matchobject.spans([group])``
828
+
829
+ * Returns a list of the spans. Compare with ``matchobject.span([group])``.
830
+
831
+ .. sourcecode:: python
832
+
833
+ >>> m = regex.search(r"(\w{3})+", "123456789")
834
+ >>> m.group(1)
835
+ '789'
836
+ >>> m.captures(1)
837
+ ['123', '456', '789']
838
+ >>> m.start(1)
839
+ 6
840
+ >>> m.starts(1)
841
+ [0, 3, 6]
842
+ >>> m.end(1)
843
+ 9
844
+ >>> m.ends(1)
845
+ [3, 6, 9]
846
+ >>> m.span(1)
847
+ (6, 9)
848
+ >>> m.spans(1)
849
+ [(0, 3), (3, 6), (6, 9)]
850
+
851
+ Atomic grouping ``(?>...)`` (`issue #433030 <https://bugs.python.org/issue433030>`_)
852
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
853
+
854
+ If the following pattern subsequently fails, then the subpattern as a whole will fail.
855
+
856
+ Possessive quantifiers
857
+ ^^^^^^^^^^^^^^^^^^^^^^
858
+
859
+ ``(?:...)?+`` ; ``(?:...)*+`` ; ``(?:...)++`` ; ``(?:...){min,max}+``
860
+
861
+ The subpattern is matched up to 'max' times. If the following pattern subsequently fails, then all the repeated subpatterns will fail as a whole. For example, ``(?:...)++`` is equivalent to ``(?>(?:...)+)``.
862
+
863
+ Scoped flags (`issue #433028 <https://bugs.python.org/issue433028>`_)
864
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
865
+
866
+ ``(?flags-flags:...)``
867
+
868
+ The flags will apply only to the subpattern. Flags can be turned on or off.
869
+
870
+ Definition of 'word' character (`issue #1693050 <https://bugs.python.org/issue1693050>`_)
871
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
872
+
873
+ The definition of a 'word' character has been expanded for Unicode. It conforms to the Unicode specification at ``http://www.unicode.org/reports/tr29/``.
874
+
875
+ Variable-length lookbehind
876
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
877
+
878
+ A lookbehind can match a variable-length string.
879
+
880
+ Flags argument for regex.split, regex.sub and regex.subn (`issue #3482 <https://bugs.python.org/issue3482>`_)
881
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
882
+
883
+ ``regex.split``, ``regex.sub`` and ``regex.subn`` support a 'flags' argument.
884
+
885
+ Pos and endpos arguments for regex.sub and regex.subn
886
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
887
+
888
+ ``regex.sub`` and ``regex.subn`` support 'pos' and 'endpos' arguments.
889
+
890
+ 'Overlapped' argument for regex.findall and regex.finditer
891
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
892
+
893
+ ``regex.findall`` and ``regex.finditer`` support an 'overlapped' flag which permits overlapped matches.
894
+
895
+ Splititer
896
+ ^^^^^^^^^
897
+
898
+ ``regex.splititer`` has been added. It's a generator equivalent of ``regex.split``.
899
+
900
+ Subscripting match objects for groups
901
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
902
+
903
+ A match object accepts access to the groups via subscripting and slicing:
904
+
905
+ .. sourcecode:: python
906
+
907
+ >>> m = regex.search(r"(?P<before>.*?)(?P<num>\d+)(?P<after>.*)", "pqr123stu")
908
+ >>> print(m["before"])
909
+ pqr
910
+ >>> print(len(m))
911
+ 4
912
+ >>> print(m[:])
913
+ ('pqr123stu', 'pqr', '123', 'stu')
914
+
915
+ Named groups
916
+ ^^^^^^^^^^^^
917
+
918
+ Groups can be named with ``(?<name>...)`` as well as the existing ``(?P<name>...)``.
919
+
920
+ Group references
921
+ ^^^^^^^^^^^^^^^^
922
+
923
+ Groups can be referenced within a pattern with ``\g<name>``. This also allows there to be more than 99 groups.
924
+
925
+ Named characters ``\N{name}``
926
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
927
+
928
+ Named characters are supported. Note that only those known by Python's Unicode database will be recognised.
929
+
930
+ Unicode codepoint properties, including scripts and blocks
931
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
932
+
933
+ ``\p{property=value}``; ``\P{property=value}``; ``\p{value}`` ; ``\P{value}``
934
+
935
+ Many Unicode properties are supported, including blocks and scripts. ``\p{property=value}`` or ``\p{property:value}`` matches a character whose property ``property`` has value ``value``. The inverse of ``\p{property=value}`` is ``\P{property=value}`` or ``\p{^property=value}``.
936
+
937
+ If the short form ``\p{value}`` is used, the properties are checked in the order: ``General_Category``, ``Script``, ``Block``, binary property:
938
+
939
+ * ``Latin``, the 'Latin' script (``Script=Latin``).
940
+
941
+ * ``BasicLatin``, the 'BasicLatin' block (``Block=BasicLatin``).
942
+
943
+ * ``Alphabetic``, the 'Alphabetic' binary property (``Alphabetic=Yes``).
944
+
945
+ A short form starting with ``Is`` indicates a script or binary property:
946
+
947
+ * ``IsLatin``, the 'Latin' script (``Script=Latin``).
948
+
949
+ * ``IsAlphabetic``, the 'Alphabetic' binary property (``Alphabetic=Yes``).
950
+
951
+ A short form starting with ``In`` indicates a block property:
952
+
953
+ * ``InBasicLatin``, the 'BasicLatin' block (``Block=BasicLatin``).
954
+
955
+ POSIX character classes
956
+ ^^^^^^^^^^^^^^^^^^^^^^^
957
+
958
+ ``[[:alpha:]]``; ``[[:^alpha:]]``
959
+
960
+ POSIX character classes are supported. These are normally treated as an alternative form of ``\p{...}``.
961
+
962
+ The exceptions are ``alnum``, ``digit``, ``punct`` and ``xdigit``, whose definitions are different from those of Unicode.
963
+
964
+ ``[[:alnum:]]`` is equivalent to ``\p{posix_alnum}``.
965
+
966
+ ``[[:digit:]]`` is equivalent to ``\p{posix_digit}``.
967
+
968
+ ``[[:punct:]]`` is equivalent to ``\p{posix_punct}``.
969
+
970
+ ``[[:xdigit:]]`` is equivalent to ``\p{posix_xdigit}``.
971
+
972
+ Search anchor ``\G``
973
+ ^^^^^^^^^^^^^^^^^^^^
974
+
975
+ A search anchor has been added. It matches at the position where each search started/continued and can be used for contiguous matches or in negative variable-length lookbehinds to limit how far back the lookbehind goes:
976
+
977
+ .. sourcecode:: python
978
+
979
+ >>> regex.findall(r"\w{2}", "abcd ef")
980
+ ['ab', 'cd', 'ef']
981
+ >>> regex.findall(r"\G\w{2}", "abcd ef")
982
+ ['ab', 'cd']
983
+
984
+ * The search starts at position 0 and matches 'ab'.
985
+
986
+ * The search continues at position 2 and matches 'cd'.
987
+
988
+ * The search continues at position 4 and fails to match any letters.
989
+
990
+ * The anchor stops the search start position from being advanced, so there are no more results.
991
+
992
+ Reverse searching
993
+ ^^^^^^^^^^^^^^^^^
994
+
995
+ Searches can also work backwards:
996
+
997
+ .. sourcecode:: python
998
+
999
+ >>> regex.findall(r".", "abc")
1000
+ ['a', 'b', 'c']
1001
+ >>> regex.findall(r"(?r).", "abc")
1002
+ ['c', 'b', 'a']
1003
+
1004
+ Note that the result of a reverse search is not necessarily the reverse of a forward search:
1005
+
1006
+ .. sourcecode:: python
1007
+
1008
+ >>> regex.findall(r"..", "abcde")
1009
+ ['ab', 'cd']
1010
+ >>> regex.findall(r"(?r)..", "abcde")
1011
+ ['de', 'bc']
1012
+
1013
+ Matching a single grapheme ``\X``
1014
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1015
+
1016
+ The grapheme matcher is supported. It conforms to the Unicode specification at ``http://www.unicode.org/reports/tr29/``.
1017
+
1018
+ Branch reset ``(?|...|...)``
1019
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1020
+
1021
+ Group numbers will be reused across the alternatives, but groups with different names will have different group numbers.
1022
+
1023
+ .. sourcecode:: python
1024
+
1025
+ >>> regex.match(r"(?|(first)|(second))", "first").groups()
1026
+ ('first',)
1027
+ >>> regex.match(r"(?|(first)|(second))", "second").groups()
1028
+ ('second',)
1029
+
1030
+ Note that there is only one group.
1031
+
1032
+ Default Unicode word boundary
1033
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1034
+
1035
+ The ``WORD`` flag changes the definition of a 'word boundary' to that of a default Unicode word boundary. This applies to ``\b`` and ``\B``.
1036
+
1037
+ Timeout
1038
+ ^^^^^^^
1039
+
1040
+ The matching methods and functions support timeouts. The timeout (in seconds) applies to the entire operation:
1041
+
1042
+ .. sourcecode:: python
1043
+
1044
+ >>> from time import sleep
1045
+ >>>
1046
+ >>> def fast_replace(m):
1047
+ ... return 'X'
1048
+ ...
1049
+ >>> def slow_replace(m):
1050
+ ... sleep(0.5)
1051
+ ... return 'X'
1052
+ ...
1053
+ >>> regex.sub(r'[a-z]', fast_replace, 'abcde', timeout=2)
1054
+ 'XXXXX'
1055
+ >>> regex.sub(r'[a-z]', slow_replace, 'abcde', timeout=2)
1056
+ Traceback (most recent call last):
1057
+ File "<stdin>", line 1, in <module>
1058
+ File "C:\Python310\lib\site-packages\regex\regex.py", line 278, in sub
1059
+ return pat.sub(repl, string, count, pos, endpos, concurrent, timeout)
1060
+ TimeoutError: regex timed out
lib/python3.12/site-packages/regex-2024.11.6.dist-info/RECORD ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ regex-2024.11.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2
+ regex-2024.11.6.dist-info/LICENSE.txt,sha256=v_Ve9M3MjBTOJZ-OirYOJkQYRA1jNfTcE4Jz-9UGFE0,11584
3
+ regex-2024.11.6.dist-info/METADATA,sha256=g01OaInJKSZgaE-sd6S4Bawc-xS2fg0yHRbrU1OXzpg,40487
4
+ regex-2024.11.6.dist-info/RECORD,,
5
+ regex-2024.11.6.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ regex-2024.11.6.dist-info/WHEEL,sha256=mIXbsg-cAyeYqDkjHdCRXNw3PfO3jjESCxdFVt6S9zI,151
7
+ regex-2024.11.6.dist-info/top_level.txt,sha256=aQmiDMhNTF26cCK4_7D-qaVvhbxClG0wyCTnEhkzYBs,6
8
+ regex/__init__.py,sha256=9slNQEb4SCZ9LncNzcQvqmkyxXlcOAF7QwAwigxWjsw,65
9
+ regex/__pycache__/__init__.cpython-312.pyc,,
10
+ regex/__pycache__/_regex_core.cpython-312.pyc,,
11
+ regex/__pycache__/regex.cpython-312.pyc,,
12
+ regex/__pycache__/test_regex.cpython-312.pyc,,
13
+ regex/_regex.cpython-312-x86_64-linux-gnu.so,sha256=NupR53EP-Dniymvj2j7XFQpsxNDWr_VQHQiqBeFJRGI,2605512
14
+ regex/_regex_core.py,sha256=MI8nzE7gBEUTDDrao8aOHg7_QhhDzE07VoKFl_WSxCM,141028
15
+ regex/regex.py,sha256=gzxSPPegvGU13Hl64L5aviFexrkXVvu390FTG5aEEWs,32683
16
+ regex/test_regex.py,sha256=x_FfGHpd7hT0BFQ_jCetdxv7GxdziBZHgsT8X0FVTOM,222040
lib/python3.12/site-packages/regex-2024.11.6.dist-info/REQUESTED ADDED
File without changes
lib/python3.12/site-packages/regex-2024.11.6.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ regex
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Abidjan ADDED
Binary file (130 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Accra ADDED
Binary file (130 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Addis_Ababa ADDED
Binary file (191 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Algiers ADDED
Binary file (470 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Asmara ADDED
Binary file (191 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Asmera ADDED
Binary file (191 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bamako ADDED
Binary file (130 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bangui ADDED
Binary file (180 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Banjul ADDED
Binary file (130 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bissau ADDED
Binary file (149 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Blantyre ADDED
Binary file (131 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Brazzaville ADDED
Binary file (180 Bytes). View file
 
lib/python3.12/site-packages/tzdata/zoneinfo/Africa/Bujumbura ADDED
Binary file (131 Bytes). View file