asnkit-gen-python 2.0.0rc4__tar.gz → 2.0.0rc6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/PKG-INFO +4 -6
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/README.rst +2 -4
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/pyproject.toml +2 -2
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/pyproject.toml.orig +2 -2
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/src/asnkit_gen_python/generate.py +5 -17
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/src/asnkit_gen_python/version.py +1 -1
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/LICENSE-COMPILER +0 -0
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/src/asnkit_gen_python/__init__.py +0 -0
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/src/asnkit_gen_python/__main__.py +0 -0
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/src/asnkit_gen_python/cli.py +0 -0
- {asnkit_gen_python-2.0.0rc4 → asnkit_gen_python-2.0.0rc6}/src/asnkit_gen_python/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: asnkit-gen-python
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0rc6
|
|
4
4
|
Summary: asnkit plugin that makes Python code with data classes from ASN.1
|
|
5
5
|
Author: xadaemon
|
|
6
6
|
Author-email: xadaemon <mxavier@boxtheta.com>
|
|
@@ -10,7 +10,7 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Topic :: Software Development :: Code Generators
|
|
13
|
-
Requires-Dist: asnkitrt==2.0.
|
|
13
|
+
Requires-Dist: asnkitrt==2.0.0rc6
|
|
14
14
|
Requires-Python: >=3.13
|
|
15
15
|
Project-URL: source, https://github.com/boxtheta/asnkit
|
|
16
16
|
Description-Content-Type: text/x-rst
|
|
@@ -48,10 +48,8 @@ Options, given with ``--plugin-opt KEY=VALUE``:
|
|
|
48
48
|
``embed``
|
|
49
49
|
``false`` to leave the compiled specification out of the module, as
|
|
50
50
|
for one distributed separately. The module then has
|
|
51
|
-
``use_asni(data
|
|
52
|
-
|
|
53
|
-
once and uses it for every codec. By default it accepts only unbound
|
|
54
|
-
files; give ``bound_to`` for an expected binding. Until it
|
|
51
|
+
``use_asni(data)``, which takes the contents of a version 2 ``.asni``
|
|
52
|
+
file, checks its CRC-32 once and uses it for every codec. Until it
|
|
55
53
|
is called, encoding and decoding raise ``RuntimeError``. The file has
|
|
56
54
|
to be compiled from the same specification. Default: ``true``.
|
|
57
55
|
|
|
@@ -31,10 +31,8 @@ Options, given with ``--plugin-opt KEY=VALUE``:
|
|
|
31
31
|
``embed``
|
|
32
32
|
``false`` to leave the compiled specification out of the module, as
|
|
33
33
|
for one distributed separately. The module then has
|
|
34
|
-
``use_asni(data
|
|
35
|
-
|
|
36
|
-
once and uses it for every codec. By default it accepts only unbound
|
|
37
|
-
files; give ``bound_to`` for an expected binding. Until it
|
|
34
|
+
``use_asni(data)``, which takes the contents of a version 2 ``.asni``
|
|
35
|
+
file, checks its CRC-32 once and uses it for every codec. Until it
|
|
38
36
|
is called, encoding and decoding raise ``RuntimeError``. The file has
|
|
39
37
|
to be compiled from the same specification. Default: ``true``.
|
|
40
38
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "asnkit-gen-python"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.0rc6"
|
|
4
4
|
description = "asnkit plugin that makes Python code with data classes from ASN.1"
|
|
5
5
|
readme = "README.rst"
|
|
6
6
|
requires-python = ">=3.13"
|
|
7
|
-
dependencies = ["asnkitrt==2.0.
|
|
7
|
+
dependencies = ["asnkitrt==2.0.0rc6"]
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
license-files = ["LICENSE-COMPILER"]
|
|
10
10
|
classifiers = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "asnkit-gen-python"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.0rc6"
|
|
4
4
|
description = "asnkit plugin that makes Python code with data classes from ASN.1"
|
|
5
5
|
readme = "README.rst"
|
|
6
6
|
authors = [
|
|
@@ -8,7 +8,7 @@ authors = [
|
|
|
8
8
|
]
|
|
9
9
|
requires-python = ">=3.13"
|
|
10
10
|
dependencies = [
|
|
11
|
-
"asnkitrt==2.0.
|
|
11
|
+
"asnkitrt==2.0.0rc6",
|
|
12
12
|
]
|
|
13
13
|
license = "Apache-2.0"
|
|
14
14
|
license-files = ["LICENSE-COMPILER"]
|
|
@@ -771,23 +771,15 @@ NOT_EMBEDDED = """\
|
|
|
771
771
|
_SPECIFICATION: asnkitrt.syntax.CompiledSpecification | None = None
|
|
772
772
|
|
|
773
773
|
|
|
774
|
-
def use_asni(
|
|
775
|
-
data: bytes | bytearray,
|
|
776
|
-
*,
|
|
777
|
-
bound_to: str | None = None,
|
|
778
|
-
accept_any_binding: bool = False,
|
|
779
|
-
) -> None:
|
|
774
|
+
def use_asni(data: bytes | bytearray) -> None:
|
|
780
775
|
\"\"\"Uses the contents of an .asni file, made from the specification this
|
|
781
|
-
module is made from, for all codecs.
|
|
782
|
-
options of asnkitrt.load_asni().
|
|
776
|
+
module is made from, for all codecs. Its CRC-32 is checked once, here.
|
|
783
777
|
|
|
784
778
|
\"\"\"
|
|
785
779
|
|
|
786
780
|
global _SPECIFICATION
|
|
787
781
|
|
|
788
|
-
_SPECIFICATION = asnkitrt.syntax.from_asni(
|
|
789
|
-
data, bound_to=bound_to, accept_any_binding=accept_any_binding
|
|
790
|
-
)
|
|
782
|
+
_SPECIFICATION = asnkitrt.syntax.from_asni(data)
|
|
791
783
|
spec.cache_clear()
|
|
792
784
|
|
|
793
785
|
|
|
@@ -829,8 +821,7 @@ def generate(
|
|
|
829
821
|
embed: bool = True,
|
|
830
822
|
) -> str:
|
|
831
823
|
"""Returns the text of a Python module for given contents of an
|
|
832
|
-
``.asni`` file, which
|
|
833
|
-
embedded in the module and loaded without checking that. `sources`
|
|
824
|
+
``.asni`` file, which may be embedded in the module. `sources`
|
|
834
825
|
are the names of the files it was made from, and `codec` is what
|
|
835
826
|
the module encodes and decodes with if not told otherwise. Without
|
|
836
827
|
`embed`, the module does not have the specification in it, and is
|
|
@@ -841,9 +832,6 @@ def generate(
|
|
|
841
832
|
try:
|
|
842
833
|
compiled = syntax.from_asni(asni)
|
|
843
834
|
except Exception as error:
|
|
844
|
-
raise GenerateError(
|
|
845
|
-
"Expected a compiled specification that is not bound to something, "
|
|
846
|
-
"but: {}".format(error)
|
|
847
|
-
)
|
|
835
|
+
raise GenerateError("Expected a compiled specification, but: {}".format(error))
|
|
848
836
|
|
|
849
837
|
return Generator(compiled, asni, sources or [], codec, embed).run()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|