tigrcorn-compat 0.3.16.dev5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,157 @@
1
+ """Compatibility helpers and conformance surfaces."""
2
+
3
+ __all__ = [
4
+ "AioquicAdapterPreflightError",
5
+ "run_aioquic_adapter_preflight",
6
+ "write_aioquic_preflight_status_documents",
7
+ "InteropResult",
8
+ "InteropVector",
9
+ "load_results",
10
+ "load_vectors",
11
+ "summarize_results",
12
+ "ExternalInteropRunner",
13
+ "INTEROP_ARTIFACT_SCHEMA_VERSION",
14
+ "INTEROP_BUNDLE_REQUIRED_FILES",
15
+ "INTEROP_SCENARIO_REQUIRED_FILES",
16
+ "InteropMatrix",
17
+ "InteropProcessResult",
18
+ "InteropProcessSpec",
19
+ "InteropRunSummary",
20
+ "InteropScenario",
21
+ "InteropScenarioResult",
22
+ "build_environment_manifest",
23
+ "detect_source_revision",
24
+ "evaluate_assertions",
25
+ "generate_observer_qlog",
26
+ "load_external_matrix",
27
+ "run_external_matrix",
28
+ "summarize_matrix_dimensions",
29
+ "INDEPENDENT_BUNDLE_REQUIRED_ROOT_FILES",
30
+ "INDEPENDENT_BUNDLE_REQUIRED_SCENARIO_FILES",
31
+ "IndependentBundleReport",
32
+ "PromotionSectionReport",
33
+ "PromotionTargetError",
34
+ "PromotionTargetReport",
35
+ "ReleaseGateError",
36
+ "ReleaseGateReport",
37
+ "assert_independent_certification_bundle_ready",
38
+ "assert_promotion_target_ready",
39
+ "assert_release_ready",
40
+ "evaluate_promotion_target",
41
+ "evaluate_release_gates",
42
+ "load_certification_boundary",
43
+ "load_promotion_target",
44
+ "validate_independent_certification_bundle",
45
+ ]
46
+
47
+
48
+ def __getattr__(name: str):
49
+ if name in {
50
+ "AioquicAdapterPreflightError",
51
+ "run_aioquic_adapter_preflight",
52
+ "write_aioquic_preflight_status_documents",
53
+ }:
54
+ from tigrcorn_certification.aioquic_preflight import (
55
+ AioquicAdapterPreflightError,
56
+ run_aioquic_adapter_preflight,
57
+ write_status_documents,
58
+ )
59
+
60
+ mapping = {
61
+ "AioquicAdapterPreflightError": AioquicAdapterPreflightError,
62
+ "run_aioquic_adapter_preflight": run_aioquic_adapter_preflight,
63
+ "write_aioquic_preflight_status_documents": write_status_documents,
64
+ }
65
+ return mapping[name]
66
+ if name in {"InteropResult", "InteropVector", "load_results", "load_vectors", "summarize_results"}:
67
+ from .interop import InteropResult, InteropVector, load_results, load_vectors, summarize_results
68
+
69
+ mapping = {
70
+ "InteropResult": InteropResult,
71
+ "InteropVector": InteropVector,
72
+ "load_results": load_results,
73
+ "load_vectors": load_vectors,
74
+ "summarize_results": summarize_results,
75
+ }
76
+ return mapping[name]
77
+ if name in {
78
+ "ExternalInteropRunner",
79
+ "INTEROP_ARTIFACT_SCHEMA_VERSION",
80
+ "INTEROP_BUNDLE_REQUIRED_FILES",
81
+ "INTEROP_SCENARIO_REQUIRED_FILES",
82
+ "InteropMatrix",
83
+ "InteropProcessResult",
84
+ "InteropProcessSpec",
85
+ "InteropRunSummary",
86
+ "InteropScenario",
87
+ "InteropScenarioResult",
88
+ "build_environment_manifest",
89
+ "detect_source_revision",
90
+ "evaluate_assertions",
91
+ "generate_observer_qlog",
92
+ "load_external_matrix",
93
+ "run_external_matrix",
94
+ "summarize_matrix_dimensions",
95
+ }:
96
+ from tigrcorn_certification.interop_runner import (
97
+ ExternalInteropRunner,
98
+ INTEROP_ARTIFACT_SCHEMA_VERSION,
99
+ INTEROP_BUNDLE_REQUIRED_FILES,
100
+ INTEROP_SCENARIO_REQUIRED_FILES,
101
+ InteropMatrix,
102
+ InteropProcessResult,
103
+ InteropProcessSpec,
104
+ InteropRunSummary,
105
+ InteropScenario,
106
+ InteropScenarioResult,
107
+ build_environment_manifest,
108
+ detect_source_revision,
109
+ evaluate_assertions,
110
+ generate_observer_qlog,
111
+ load_external_matrix,
112
+ run_external_matrix,
113
+ summarize_matrix_dimensions,
114
+ )
115
+
116
+ mapping = locals().copy()
117
+ return mapping[name]
118
+ if name in {
119
+ "INDEPENDENT_BUNDLE_REQUIRED_ROOT_FILES",
120
+ "INDEPENDENT_BUNDLE_REQUIRED_SCENARIO_FILES",
121
+ "IndependentBundleReport",
122
+ "PromotionSectionReport",
123
+ "PromotionTargetError",
124
+ "PromotionTargetReport",
125
+ "ReleaseGateError",
126
+ "ReleaseGateReport",
127
+ "assert_independent_certification_bundle_ready",
128
+ "assert_promotion_target_ready",
129
+ "assert_release_ready",
130
+ "evaluate_promotion_target",
131
+ "evaluate_release_gates",
132
+ "load_certification_boundary",
133
+ "load_promotion_target",
134
+ "validate_independent_certification_bundle",
135
+ }:
136
+ from tigrcorn_certification.release_gates import (
137
+ INDEPENDENT_BUNDLE_REQUIRED_ROOT_FILES,
138
+ INDEPENDENT_BUNDLE_REQUIRED_SCENARIO_FILES,
139
+ IndependentBundleReport,
140
+ PromotionSectionReport,
141
+ PromotionTargetError,
142
+ PromotionTargetReport,
143
+ ReleaseGateError,
144
+ ReleaseGateReport,
145
+ assert_independent_certification_bundle_ready,
146
+ assert_promotion_target_ready,
147
+ assert_release_ready,
148
+ evaluate_promotion_target,
149
+ evaluate_release_gates,
150
+ load_certification_boundary,
151
+ load_promotion_target,
152
+ validate_independent_certification_bundle,
153
+ )
154
+
155
+ mapping = locals().copy()
156
+ return mapping[name]
157
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -0,0 +1,46 @@
1
+ from __future__ import annotations
2
+
3
+ import inspect
4
+ from dataclasses import dataclass
5
+
6
+ from tigrcorn_core.types import ASGIApp, Message, Scope
7
+
8
+
9
+ @dataclass(slots=True)
10
+ class ASGI3Signature:
11
+ parameter_count: int
12
+ is_async: bool
13
+
14
+
15
+ def describe_app(app: ASGIApp) -> ASGI3Signature:
16
+ target = app.__call__ if not inspect.iscoroutinefunction(app) and hasattr(app, '__call__') else app
17
+ try:
18
+ sig = inspect.signature(target)
19
+ except (TypeError, ValueError):
20
+ return ASGI3Signature(parameter_count=3, is_async=True)
21
+ is_async = inspect.iscoroutinefunction(target)
22
+ return ASGI3Signature(parameter_count=len(sig.parameters), is_async=is_async)
23
+
24
+
25
+ def assert_asgi3_app(app: ASGIApp) -> None:
26
+ if not callable(app):
27
+ raise TypeError('application object must be callable')
28
+ signature = describe_app(app)
29
+ if signature.parameter_count != 3:
30
+ raise TypeError('ASGI 3 application must accept exactly (scope, receive, send)')
31
+
32
+
33
+ def is_http_scope(scope: Scope) -> bool:
34
+ return scope.get('type') == 'http'
35
+
36
+
37
+ def is_websocket_scope(scope: Scope) -> bool:
38
+ return scope.get('type') == 'websocket'
39
+
40
+
41
+ def is_lifespan_scope(scope: Scope) -> bool:
42
+ return scope.get('type') == 'lifespan'
43
+
44
+
45
+ def is_http_event(message: Message) -> bool:
46
+ return str(message.get('type', '')).startswith('http.')
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from .uvicorn import CompatProfile
4
+
5
+
6
+ HYPERCORN_COMPAT = CompatProfile(
7
+ server_name='hypercorn',
8
+ boundary='ASGI3 callable(scope, receive, send)',
9
+ http1=True,
10
+ http2=True,
11
+ websocket=True,
12
+ lifespan=True,
13
+ )
@@ -0,0 +1,40 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from dataclasses import dataclass
5
+ from pathlib import Path
6
+
7
+
8
+ @dataclass(slots=True)
9
+ class InteropVector:
10
+ name: str
11
+ protocol: str
12
+ rfc: str
13
+ description: str
14
+ fixture: str
15
+
16
+
17
+ @dataclass(slots=True)
18
+ class InteropResult:
19
+ vector: str
20
+ passed: bool
21
+ runner: str
22
+ notes: str = ''
23
+
24
+
25
+ def load_vectors(path: str | Path) -> list[InteropVector]:
26
+ payload = json.loads(Path(path).read_text())
27
+ return [InteropVector(**entry) for entry in payload['vectors']]
28
+
29
+
30
+ def load_results(path: str | Path) -> list[InteropResult]:
31
+ payload = json.loads(Path(path).read_text())
32
+ return [InteropResult(**entry) for entry in payload['results']]
33
+
34
+
35
+ def summarize_results(results: list[InteropResult]) -> dict[str, int]:
36
+ return {
37
+ 'total': len(results),
38
+ 'passed': sum(1 for item in results if item.passed),
39
+ 'failed': sum(1 for item in results if not item.passed),
40
+ }
@@ -0,0 +1,170 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ import os
5
+ from pathlib import Path
6
+ from typing import Any, Iterable
7
+
8
+
9
+ def _env_path(name: str) -> Path | None:
10
+ value = os.environ.get(name)
11
+ if not value:
12
+ return None
13
+ return Path(value)
14
+
15
+
16
+ def _write_json(path: Path | None, payload: dict[str, Any]) -> None:
17
+ if path is None:
18
+ return
19
+ path.parent.mkdir(parents=True, exist_ok=True)
20
+ tmp_path = path.with_suffix(path.suffix + '.tmp')
21
+ tmp_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + '\n', encoding='utf-8')
22
+ tmp_path.replace(path)
23
+
24
+
25
+ def header_pairs_to_text(headers: Iterable[tuple[bytes, bytes]]) -> list[list[str]]:
26
+ pairs: list[list[str]] = []
27
+ for raw_name, raw_value in headers:
28
+ pairs.append([
29
+ raw_name.decode('latin1', errors='replace'),
30
+ raw_value.decode('latin1', errors='replace'),
31
+ ])
32
+ return pairs
33
+
34
+
35
+ def first_header_value(headers: Iterable[tuple[bytes, bytes]], name: bytes) -> str | None:
36
+ needle = name.lower()
37
+ for raw_name, raw_value in headers:
38
+ if raw_name.lower() == needle:
39
+ return raw_value.decode('latin1', errors='replace')
40
+ return None
41
+
42
+
43
+ class WebSocketInteropCapture:
44
+ def __init__(
45
+ self,
46
+ *,
47
+ protocol: str,
48
+ path: str,
49
+ request_headers: Iterable[tuple[bytes, bytes]],
50
+ scheme: str,
51
+ compression_config: str,
52
+ compression_requested: str,
53
+ connect_protocol_enabled: bool,
54
+ ) -> None:
55
+ self.transcript_path = _env_path('INTEROP_TRANSCRIPT_PATH')
56
+ self.negotiation_path = _env_path('INTEROP_NEGOTIATION_PATH')
57
+ self.enabled = self.transcript_path is not None or self.negotiation_path is not None
58
+ request_header_pairs = list(request_headers)
59
+ authority = first_header_value(request_header_pairs, b':authority') or first_header_value(request_header_pairs, b'host') or ''
60
+ self.transcript: dict[str, Any] = {
61
+ 'request': {
62
+ 'path': path,
63
+ 'scheme': scheme,
64
+ 'authority': authority,
65
+ 'headers': header_pairs_to_text(request_header_pairs),
66
+ 'compression': compression_requested,
67
+ 'text': None,
68
+ 'bytes_length': None,
69
+ 'close_code': None,
70
+ 'close_reason': None,
71
+ },
72
+ 'response': {
73
+ 'status': None,
74
+ 'headers': [],
75
+ 'subprotocol': None,
76
+ 'extension_header': '',
77
+ 'text': None,
78
+ 'bytes_length': None,
79
+ 'close_code': None,
80
+ 'close_reason': None,
81
+ },
82
+ }
83
+ self.negotiation: dict[str, Any] = {
84
+ 'implementation': 'tigrcorn',
85
+ 'protocol': protocol,
86
+ 'scheme': scheme,
87
+ 'path': path,
88
+ 'server_name': authority,
89
+ 'handshake_complete': False,
90
+ 'connect_protocol_enabled': connect_protocol_enabled,
91
+ 'compression_configured': compression_config,
92
+ 'compression_requested': compression_requested,
93
+ 'permessage_deflate_offered': compression_requested == 'permessage-deflate',
94
+ 'negotiated_extensions': [],
95
+ 'response_extension_header': '',
96
+ 'response_subprotocol': None,
97
+ 'response_status': None,
98
+ }
99
+
100
+ def _flush(self) -> None:
101
+ if not self.enabled:
102
+ return
103
+ _write_json(self.transcript_path, self.transcript)
104
+ _write_json(self.negotiation_path, self.negotiation)
105
+
106
+ def record_accept(
107
+ self,
108
+ *,
109
+ status: int,
110
+ response_headers: Iterable[tuple[bytes, bytes]],
111
+ negotiated_extensions: list[str],
112
+ selected_subprotocol: str | None,
113
+ ) -> None:
114
+ header_pairs = list(response_headers)
115
+ extension_header = first_header_value(header_pairs, b'sec-websocket-extensions') or ''
116
+ self.transcript['response']['status'] = int(status)
117
+ self.transcript['response']['headers'] = header_pairs_to_text(header_pairs)
118
+ self.transcript['response']['subprotocol'] = selected_subprotocol
119
+ self.transcript['response']['extension_header'] = extension_header
120
+ self.negotiation['handshake_complete'] = True
121
+ self.negotiation['response_status'] = int(status)
122
+ self.negotiation['negotiated_extensions'] = list(negotiated_extensions)
123
+ self.negotiation['response_extension_header'] = extension_header
124
+ self.negotiation['response_subprotocol'] = selected_subprotocol
125
+ self._flush()
126
+
127
+ def record_denial(self, *, status: int, response_headers: Iterable[tuple[bytes, bytes]]) -> None:
128
+ header_pairs = list(response_headers)
129
+ self.transcript['response']['status'] = int(status)
130
+ self.transcript['response']['headers'] = header_pairs_to_text(header_pairs)
131
+ self.negotiation['handshake_complete'] = False
132
+ self.negotiation['response_status'] = int(status)
133
+ self.negotiation['negotiated_extensions'] = []
134
+ self.negotiation['response_extension_header'] = ''
135
+ self.negotiation['response_subprotocol'] = None
136
+ self._flush()
137
+
138
+ def record_request_text(self, text: str) -> None:
139
+ self.transcript['request']['text'] = text
140
+ self.transcript['request']['bytes_length'] = len(text.encode('utf-8'))
141
+ self._flush()
142
+
143
+ def record_request_bytes(self, data: bytes) -> None:
144
+ self.transcript['request']['bytes_length'] = len(data)
145
+ self._flush()
146
+
147
+ def record_response_text(self, text: str) -> None:
148
+ self.transcript['response']['text'] = text
149
+ self.transcript['response']['bytes_length'] = len(text.encode('utf-8'))
150
+ self._flush()
151
+
152
+ def record_response_bytes(self, data: bytes) -> None:
153
+ self.transcript['response']['bytes_length'] = len(data)
154
+ self._flush()
155
+
156
+ def record_request_close(self, code: int, reason: str) -> None:
157
+ self.transcript['request']['close_code'] = int(code)
158
+ self.transcript['request']['close_reason'] = reason
159
+ self._flush()
160
+
161
+ def record_response_close(self, code: int, reason: str) -> None:
162
+ self.transcript['response']['close_code'] = int(code)
163
+ self.transcript['response']['close_reason'] = reason
164
+ self._flush()
165
+
166
+ def record_disconnect(self, code: int, reason: str) -> None:
167
+ if self.transcript['response']['close_code'] is None:
168
+ self.record_response_close(code, reason)
169
+ else:
170
+ self._flush()
@@ -0,0 +1,34 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+
5
+ from tigrcorn_certification.interop_runner import run_external_matrix
6
+
7
+
8
+
9
+ def build_parser() -> argparse.ArgumentParser:
10
+ parser = argparse.ArgumentParser(prog='tigrcorn-interop', description='Run the tigrcorn external interoperability matrix and write evidence bundles')
11
+ parser.add_argument('--matrix', required=True, help='Path to the external interop matrix JSON file')
12
+ parser.add_argument('--output', required=True, help='Root directory for result bundles')
13
+ parser.add_argument('--source-root', default='.', help='Repository root used for manifest hashing and commit detection')
14
+ parser.add_argument('--only', action='append', dest='scenario_ids', help='Run only the named scenario id (may be given multiple times)')
15
+ parser.add_argument('--strict', action='store_true', help='Stop after the first failed scenario')
16
+ return parser
17
+
18
+
19
+
20
+ def main(argv: list[str] | None = None) -> int:
21
+ parser = build_parser()
22
+ ns = parser.parse_args(argv)
23
+ summary = run_external_matrix(
24
+ ns.matrix,
25
+ artifact_root=ns.output,
26
+ source_root=ns.source_root,
27
+ scenario_ids=ns.scenario_ids,
28
+ strict=ns.strict,
29
+ )
30
+ return 0 if summary.failed == 0 else 1
31
+
32
+
33
+ if __name__ == '__main__':
34
+ raise SystemExit(main())
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,23 @@
1
+ from __future__ import annotations
2
+
3
+ from dataclasses import dataclass
4
+
5
+
6
+ @dataclass(frozen=True, slots=True)
7
+ class CompatProfile:
8
+ server_name: str
9
+ boundary: str
10
+ http1: bool
11
+ http2: bool
12
+ websocket: bool
13
+ lifespan: bool
14
+
15
+
16
+ UVICORN_COMPAT = CompatProfile(
17
+ server_name='uvicorn',
18
+ boundary='ASGI3 callable(scope, receive, send)',
19
+ http1=True,
20
+ http2=False,
21
+ websocket=True,
22
+ lifespan=True,
23
+ )
@@ -0,0 +1,237 @@
1
+ Metadata-Version: 2.4
2
+ Name: tigrcorn-compat
3
+ Version: 0.3.16.dev5
4
+ Summary: Compatibility and interoperability helpers for Tigrcorn ASGI3 conformance, external peers, and Python web server release gates.
5
+ Author-email: Jacob Stewart <jacob@swarmauri.com>
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction, and
15
+ distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by the
18
+ copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all other
21
+ entities that control, are controlled by, or are under common control with
22
+ that entity. For the purposes of this definition, "control" means (i) the
23
+ power, direct or indirect, to cause the direction or management of such
24
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
25
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
26
+ such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
29
+ permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation source, and
33
+ configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical transformation
36
+ or translation of a Source form, including but not limited to compiled object
37
+ code, generated documentation, and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or Object form,
40
+ made available under the License, as indicated by a copyright notice that is
41
+ included in or attached to the work (an example is provided in the Appendix
42
+ below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object form,
45
+ that is based on (or derived from) the Work and for which the editorial
46
+ revisions, annotations, elaborations, or other modifications represent, as a
47
+ whole, an original work of authorship. For the purposes of this License,
48
+ Derivative Works shall not include works that remain separable from, or
49
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
50
+ Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including the original
53
+ version of the Work and any modifications or additions to that Work or
54
+ Derivative Works thereof, that is intentionally submitted to Licensor for
55
+ inclusion in the Work by the copyright owner or by an individual or Legal
56
+ Entity authorized to submit on behalf of the copyright owner. For the
57
+ purposes of this definition, "submitted" means any form of electronic,
58
+ verbal, or written communication sent to the Licensor or its representatives,
59
+ including but not limited to communication on electronic mailing lists,
60
+ source code control systems, and issue tracking systems that are managed by,
61
+ or on behalf of, the Licensor for the purpose of discussing and improving the
62
+ Work, but excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
66
+ behalf of whom a Contribution has been received by Licensor and subsequently
67
+ incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
70
+ License, each Contributor hereby grants to You a perpetual, worldwide,
71
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
72
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
73
+ sublicense, and distribute the Work and such Derivative Works in Source or
74
+ Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of this
77
+ License, each Contributor hereby grants to You a perpetual, worldwide,
78
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
79
+ section) patent license to make, have made, use, offer to sell, sell, import,
80
+ and otherwise transfer the Work, where such license applies only to those
81
+ patent claims licensable by such Contributor that are necessarily infringed by
82
+ their Contribution(s) alone or by combination of their Contribution(s) with
83
+ the Work to which such Contribution(s) was submitted. If You institute patent
84
+ litigation against any entity (including a cross-claim or counterclaim in a
85
+ lawsuit) alleging that the Work or a Contribution incorporated within the Work
86
+ constitutes direct or contributory patent infringement, then any patent
87
+ licenses granted to You under this License for that Work shall terminate as of
88
+ the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
91
+ Derivative Works thereof in any medium, with or without modifications, and in
92
+ Source or Object form, provided that You meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative Works a copy
95
+ of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices stating that
98
+ You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works that You
101
+ distribute, all copyright, patent, trademark, and attribution notices
102
+ from the Source form of the Work, excluding those notices that do not
103
+ pertain to any part of the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
106
+ then any Derivative Works that You distribute must include a readable copy
107
+ of the attribution notices contained within such NOTICE file, excluding
108
+ those notices that do not pertain to any part of the Derivative Works, in
109
+ at least one of the following places: within a NOTICE text file distributed
110
+ as part of the Derivative Works; within the Source form or documentation,
111
+ if provided along with the Derivative Works; or, within a display generated
112
+ by the Derivative Works, if and wherever such third-party notices normally
113
+ appear. The contents of the NOTICE file are for informational purposes only
114
+ and do not modify the License. You may add Your own attribution notices
115
+ within Derivative Works that You distribute, alongside or as an addendum to
116
+ the NOTICE text from the Work, provided that such additional attribution
117
+ notices cannot be construed as modifying the License.
118
+
119
+ You may add Your own copyright statement to Your modifications and may provide
120
+ additional or different license terms and conditions for use, reproduction, or
121
+ distribution of Your modifications, or for any such Derivative Works as a
122
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
123
+ complies with the conditions stated in this License.
124
+
125
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
126
+ Contribution intentionally submitted for inclusion in the Work by You to the
127
+ Licensor shall be under the terms and conditions of this License, without any
128
+ additional terms or conditions. Notwithstanding the above, nothing herein
129
+ shall supersede or modify the terms of any separate license agreement you may
130
+ have executed with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade names,
133
+ trademarks, service marks, or product names of the Licensor, except as
134
+ required for reasonable and customary use in describing the origin of the Work
135
+ and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
138
+ writing, Licensor provides the Work (and each Contributor provides its
139
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
140
+ KIND, either express or implied, including, without limitation, any warranties
141
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
142
+ PARTICULAR PURPOSE. You are solely responsible for determining the
143
+ appropriateness of using or redistributing the Work and assume any risks
144
+ associated with Your exercise of permissions under this License.
145
+
146
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
147
+ tort (including negligence), contract, or otherwise, unless required by
148
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
149
+ writing, shall any Contributor be liable to You for damages, including any
150
+ direct, indirect, special, incidental, or consequential damages of any
151
+ character arising as a result of this License or out of the use or inability
152
+ to use the Work (including but not limited to damages for loss of goodwill,
153
+ work stoppage, computer failure or malfunction, or any and all other
154
+ commercial damages or losses), even if such Contributor has been advised of
155
+ the possibility of such damages.
156
+
157
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
158
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
159
+ acceptance of support, warranty, indemnity, or other liability obligations
160
+ and/or rights consistent with this License. However, in accepting such
161
+ obligations, You may act only on Your own behalf and on Your sole
162
+ responsibility, not on behalf of any other Contributor, and only if You agree
163
+ to indemnify, defend, and hold each Contributor harmless for any liability
164
+ incurred by, or claims asserted against, such Contributor by reason of your
165
+ accepting any such warranty or additional liability.
166
+
167
+ END OF TERMS AND CONDITIONS
168
+
169
+
170
+ Keywords: tigrcorn,compatibility,interop,asgi3,conformance,release-gates,python-web-server
171
+ Classifier: Development Status :: 3 - Alpha
172
+ Classifier: Framework :: AsyncIO
173
+ Classifier: Intended Audience :: Developers
174
+ Classifier: License :: OSI Approved :: Apache Software License
175
+ Classifier: Operating System :: OS Independent
176
+ Classifier: Programming Language :: Python :: 3
177
+ Classifier: Programming Language :: Python :: 3 :: Only
178
+ Classifier: Programming Language :: Python :: 3.11
179
+ Classifier: Programming Language :: Python :: 3.12
180
+ Classifier: Programming Language :: Python :: 3.13
181
+ Classifier: Topic :: Internet :: WWW/HTTP
182
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
183
+ Classifier: Typing :: Typed
184
+ Requires-Python: >=3.11
185
+ Description-Content-Type: text/markdown
186
+ License-File: LICENSE
187
+ Requires-Dist: tigrcorn-core==0.3.16.dev5
188
+ Requires-Dist: tigrcorn-asgi==0.3.16.dev5
189
+ Requires-Dist: tigrcorn-runtime==0.3.16.dev5
190
+ Dynamic: license-file
191
+
192
+ <div align="center">
193
+ <h1>tigrcorn-compat</h1>
194
+
195
+ <p><strong>Compatibility and interoperability helpers for Tigrcorn ASGI3 conformance, external peers, and Python web server release gates.</strong></p>
196
+
197
+ <a href="https://pypi.org/project/tigrcorn-compat/"><img alt="PyPI version for tigrcorn-compat" src="https://img.shields.io/pypi/v/tigrcorn-compat?label=PyPI"></a>
198
+ <a href="https://pypi.org/project/tigrcorn-compat/"><img alt="tigrcorn-compat package on PyPI" src="https://img.shields.io/badge/package-PyPI-blue"></a>
199
+ <a href="LICENSE"><img alt="Apache 2.0 license" src="https://img.shields.io/badge/license-Apache%202.0-525252"></a>
200
+ <a href="pyproject.toml"><img alt="Python 3.11 supported" src="https://img.shields.io/badge/python-3.11-3776ab"></a>
201
+ <a href="pyproject.toml"><img alt="Python 3.12 supported" src="https://img.shields.io/badge/python-3.12-3776ab"></a>
202
+ <a href="pyproject.toml"><img alt="Python 3.13 supported" src="https://img.shields.io/badge/python-3.13-3776ab"></a>
203
+ <a href="src/tigrcorn_compat/py.typed"><img alt="typed package" src="https://img.shields.io/badge/typed-py.typed-2f7ed8"></a>
204
+ <a href="https://pypi.org/project/tigrcorn-compat/"><img alt="compat role package" src="https://img.shields.io/badge/role-compat-0a7f5a"></a>
205
+ </div>
206
+
207
+ ## Install
208
+
209
+ ~~~bash
210
+ pip install tigrcorn-compat
211
+ ~~~
212
+
213
+ Use the aggregate [tigrcorn](https://pypi.org/project/tigrcorn/) distribution when you want the full ASGI3 Python web server stack. Install <code>tigrcorn-compat</code> directly when you want only this package boundary and its declared dependencies.
214
+
215
+ ## What It Owns
216
+
217
+ <code>tigrcorn-compat</code> owns uvicorn interop, hypercorn interop, ASGI3 probes, conformance helpers, and interop CLI support. Its import package is <code>tigrcorn_compat</code>, and its declared package dependencies are: tigrcorn-core, tigrcorn-asgi, tigrcorn-runtime.
218
+
219
+ This package page is written for developers searching for Tigrcorn ASGI3 server components, Python web server packages, HTTP/3 and QUIC support, WebSocket and WebTransport runtime surfaces, typed package boundaries, and Apache 2.0 licensed infrastructure.
220
+
221
+ ## Use It When
222
+
223
+ Use <code>tigrcorn-compat</code> when you need compatibility checks, ASGI3 conformance probes, or interop evidence against supported Python ASGI server peers. It is part of Tigrcorn's split-package architecture, so it can be installed independently while remaining linked to the rest of the Tigrcorn package family on PyPI.
224
+
225
+ ## Import Surface
226
+
227
+ ~~~python
228
+ import tigrcorn_compat
229
+
230
+ print(tigrcorn_compat.__name__)
231
+ ~~~
232
+
233
+ The package exposes its supported public surface through the <code>tigrcorn_compat</code> namespace. The root [tigrcorn](https://pypi.org/project/tigrcorn/) package keeps compatibility shims for users who install the full server distribution.
234
+
235
+ ## Package Graph
236
+
237
+ [tigrcorn](https://pypi.org/project/tigrcorn/) | [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
@@ -0,0 +1,13 @@
1
+ tigrcorn_compat/__init__.py,sha256=ODGIFTad3jwq-M9_i9V5jlMJp5pcCj4H6BmcsGlMnv4,5373
2
+ tigrcorn_compat/asgi3.py,sha256=vpMOStVQFn8HMDCTaATpcMQHli1NRq2kqnjHeand6h8,1339
3
+ tigrcorn_compat/hypercorn.py,sha256=IjduCa5JpSvkgr5axhzL1jT9d83EJbLcKoxS4a-715w,262
4
+ tigrcorn_compat/interop.py,sha256=SRjXUZQI1WYTN9n_ZHp7-PW6FF2Y6A5reO-dmDs0_pA,956
5
+ tigrcorn_compat/interop_capture.py,sha256=QP5evPr0fKuEJm43x1L3F3PF6BR6lgixhi40mDyWPdU,6588
6
+ tigrcorn_compat/interop_cli.py,sha256=dMWe0o6U34AsPsHHIg6MdvZZPRmarmBRwar0nUQBz1I,1317
7
+ tigrcorn_compat/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
8
+ tigrcorn_compat/uvicorn.py,sha256=Vzc8ixlA_ebXnC5ZJhhzua2cyZZZ73_VujtpwnOMNvg,427
9
+ tigrcorn_compat-0.3.16.dev5.dist-info/licenses/LICENSE,sha256=xhBSirl227aDQNeQ8tk2v_yiU9nbQpJ4EZp6OtATX-s,9591
10
+ tigrcorn_compat-0.3.16.dev5.dist-info/METADATA,sha256=ljBz1UNa3aA8LDRzz5bQeUvKMTYInuzeHkwQmoLospE,15828
11
+ tigrcorn_compat-0.3.16.dev5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
+ tigrcorn_compat-0.3.16.dev5.dist-info/top_level.txt,sha256=LtHzDP8AoWhz-fXysXr2mAJb7poaDGI7ujSqSp45Fo0,16
13
+ tigrcorn_compat-0.3.16.dev5.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,163 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation
31
+ or translation of a Source form, including but not limited to compiled object
32
+ code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work (an example is provided in the Appendix
37
+ below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object form,
40
+ that is based on (or derived from) the Work and for which the editorial
41
+ revisions, annotations, elaborations, or other modifications represent, as a
42
+ whole, an original work of authorship. For the purposes of this License,
43
+ Derivative Works shall not include works that remain separable from, or
44
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
45
+ Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the original
48
+ version of the Work and any modifications or additions to that Work or
49
+ Derivative Works thereof, that is intentionally submitted to Licensor for
50
+ inclusion in the Work by the copyright owner or by an individual or Legal
51
+ Entity authorized to submit on behalf of the copyright owner. For the
52
+ purposes of this definition, "submitted" means any form of electronic,
53
+ verbal, or written communication sent to the Licensor or its representatives,
54
+ including but not limited to communication on electronic mailing lists,
55
+ source code control systems, and issue tracking systems that are managed by,
56
+ or on behalf of, the Licensor for the purpose of discussing and improving the
57
+ Work, but excluding communication that is conspicuously marked or otherwise
58
+ designated in writing by the copyright owner as "Not a Contribution."
59
+
60
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
61
+ behalf of whom a Contribution has been received by Licensor and subsequently
62
+ incorporated within the Work.
63
+
64
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
65
+ License, each Contributor hereby grants to You a perpetual, worldwide,
66
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
67
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
68
+ sublicense, and distribute the Work and such Derivative Works in Source or
69
+ Object form.
70
+
71
+ 3. Grant of Patent License. Subject to the terms and conditions of this
72
+ License, each Contributor hereby grants to You a perpetual, worldwide,
73
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
74
+ section) patent license to make, have made, use, offer to sell, sell, import,
75
+ and otherwise transfer the Work, where such license applies only to those
76
+ patent claims licensable by such Contributor that are necessarily infringed by
77
+ their Contribution(s) alone or by combination of their Contribution(s) with
78
+ the Work to which such Contribution(s) was submitted. If You institute patent
79
+ litigation against any entity (including a cross-claim or counterclaim in a
80
+ lawsuit) alleging that the Work or a Contribution incorporated within the Work
81
+ constitutes direct or contributory patent infringement, then any patent
82
+ licenses granted to You under this License for that Work shall terminate as of
83
+ the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
86
+ Derivative Works thereof in any medium, with or without modifications, and in
87
+ Source or Object form, provided that You meet the following conditions:
88
+
89
+ (a) You must give any other recipients of the Work or Derivative Works a copy
90
+ of this License; and
91
+
92
+ (b) You must cause any modified files to carry prominent notices stating that
93
+ You changed the files; and
94
+
95
+ (c) You must retain, in the Source form of any Derivative Works that You
96
+ distribute, all copyright, patent, trademark, and attribution notices
97
+ from the Source form of the Work, excluding those notices that do not
98
+ pertain to any part of the Derivative Works; and
99
+
100
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
101
+ then any Derivative Works that You distribute must include a readable copy
102
+ of the attribution notices contained within such NOTICE file, excluding
103
+ those notices that do not pertain to any part of the Derivative Works, in
104
+ at least one of the following places: within a NOTICE text file distributed
105
+ as part of the Derivative Works; within the Source form or documentation,
106
+ if provided along with the Derivative Works; or, within a display generated
107
+ by the Derivative Works, if and wherever such third-party notices normally
108
+ appear. The contents of the NOTICE file are for informational purposes only
109
+ and do not modify the License. You may add Your own attribution notices
110
+ within Derivative Works that You distribute, alongside or as an addendum to
111
+ the NOTICE text from the Work, provided that such additional attribution
112
+ notices cannot be construed as modifying the License.
113
+
114
+ You may add Your own copyright statement to Your modifications and may provide
115
+ additional or different license terms and conditions for use, reproduction, or
116
+ distribution of Your modifications, or for any such Derivative Works as a
117
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
118
+ complies with the conditions stated in this License.
119
+
120
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
121
+ Contribution intentionally submitted for inclusion in the Work by You to the
122
+ Licensor shall be under the terms and conditions of this License, without any
123
+ additional terms or conditions. Notwithstanding the above, nothing herein
124
+ shall supersede or modify the terms of any separate license agreement you may
125
+ have executed with Licensor regarding such Contributions.
126
+
127
+ 6. Trademarks. This License does not grant permission to use the trade names,
128
+ trademarks, service marks, or product names of the Licensor, except as
129
+ required for reasonable and customary use in describing the origin of the Work
130
+ and reproducing the content of the NOTICE file.
131
+
132
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
133
+ writing, Licensor provides the Work (and each Contributor provides its
134
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
135
+ KIND, either express or implied, including, without limitation, any warranties
136
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137
+ PARTICULAR PURPOSE. You are solely responsible for determining the
138
+ appropriateness of using or redistributing the Work and assume any risks
139
+ associated with Your exercise of permissions under this License.
140
+
141
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
142
+ tort (including negligence), contract, or otherwise, unless required by
143
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
144
+ writing, shall any Contributor be liable to You for damages, including any
145
+ direct, indirect, special, incidental, or consequential damages of any
146
+ character arising as a result of this License or out of the use or inability
147
+ to use the Work (including but not limited to damages for loss of goodwill,
148
+ work stoppage, computer failure or malfunction, or any and all other
149
+ commercial damages or losses), even if such Contributor has been advised of
150
+ the possibility of such damages.
151
+
152
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
153
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
154
+ acceptance of support, warranty, indemnity, or other liability obligations
155
+ and/or rights consistent with this License. However, in accepting such
156
+ obligations, You may act only on Your own behalf and on Your sole
157
+ responsibility, not on behalf of any other Contributor, and only if You agree
158
+ to indemnify, defend, and hold each Contributor harmless for any liability
159
+ incurred by, or claims asserted against, such Contributor by reason of your
160
+ accepting any such warranty or additional liability.
161
+
162
+ END OF TERMS AND CONDITIONS
163
+
@@ -0,0 +1 @@
1
+ tigrcorn_compat