links-notation 0.25.2__tar.gz → 0.27.0__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.
- {links_notation-0.25.2/links_notation.egg-info → links_notation-0.27.0}/PKG-INFO +5 -9
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/__init__.py +5 -9
- {links_notation-0.25.2 → links_notation-0.27.0/links_notation.egg-info}/PKG-INFO +5 -9
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation.egg-info/SOURCES.txt +2 -1
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation.egg-info/requires.txt +1 -5
- {links_notation-0.25.2 → links_notation-0.27.0}/pyproject.toml +7 -14
- links_notation-0.27.0/tests/test_version.py +27 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/LICENSE +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/MANIFEST.in +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/README.md +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/README.ru.md +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/binary.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/comments.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/format_config.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/formatter.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/link.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/quotes.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/reference_literal.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation/stream_parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation.egg-info/dependency_links.txt +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/links_notation.egg-info/top_level.txt +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/setup.cfg +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_api.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_binary.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_comments.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_edge_case_parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_empty_reference.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_format_config.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_indentation_consistency.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_indented_id_nested_values.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_indented_id_syntax.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_link.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_links_group.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_mixed_indentation_modes.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_multi_quote_parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_multiline_parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_multiline_quoted_string.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_nested_indentation.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_nested_parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_nested_self_reference.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_nesting_limit.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_reference_fidelity.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_shared_text_parity.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_single_line_parser.py +0 -0
- {links_notation-0.25.2 → links_notation-0.27.0}/tests/test_stream_parser.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: links-notation
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.0
|
|
4
4
|
Summary: Python implementation of the Links Notation parser
|
|
5
5
|
Author-email: "Link.Foundation" <drakonard@gmail.com>
|
|
6
6
|
License-Expression: Unlicense
|
|
@@ -11,14 +11,14 @@ Keywords: lino,parser,links,notation,protocol
|
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
20
|
Classifier: Topic :: Text Processing
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Provides-Extra: test
|
|
@@ -29,11 +29,7 @@ Requires-Dist: black>=26.10.1; extra == "lint"
|
|
|
29
29
|
Requires-Dist: isort>=9.0.2; extra == "lint"
|
|
30
30
|
Requires-Dist: flake8>=7.4.1; extra == "lint"
|
|
31
31
|
Provides-Extra: dev
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
|
|
34
|
-
Requires-Dist: black>=26.10.1; extra == "dev"
|
|
35
|
-
Requires-Dist: isort>=9.0.2; extra == "dev"
|
|
36
|
-
Requires-Dist: flake8>=7.4.1; extra == "dev"
|
|
32
|
+
Requires-Dist: links-notation[lint,test]; extra == "dev"
|
|
37
33
|
Dynamic: license-file
|
|
38
34
|
|
|
39
35
|
# Links Notation Parser for Python
|
|
@@ -5,7 +5,7 @@ Lino (Links Notation) is a simple, intuitive format for representing
|
|
|
5
5
|
structured data as links between references.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import tomllib
|
|
9
9
|
from importlib.metadata import PackageNotFoundError
|
|
10
10
|
from importlib.metadata import version as _distribution_version
|
|
11
11
|
from pathlib import Path
|
|
@@ -37,9 +37,7 @@ def _read_version() -> str:
|
|
|
37
37
|
released 0.16.1, so ``links_notation.__version__`` answered for a release
|
|
38
38
|
nine minor versions old. pyproject.toml is the one place the version is
|
|
39
39
|
written; when the package is imported from a source checkout that was never
|
|
40
|
-
installed, that file is still next to us, so read it there.
|
|
41
|
-
regex rather than tomllib because this package supports Python 3.9, and
|
|
42
|
-
tomllib arrived in 3.11.
|
|
40
|
+
installed, that file is still next to us, so read it there.
|
|
43
41
|
"""
|
|
44
42
|
try:
|
|
45
43
|
return _distribution_version("links-notation")
|
|
@@ -48,13 +46,11 @@ def _read_version() -> str:
|
|
|
48
46
|
|
|
49
47
|
pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
|
|
50
48
|
try:
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
with pyproject.open("rb") as file:
|
|
50
|
+
return tomllib.load(file)["project"]["version"]
|
|
51
|
+
except (OSError, tomllib.TOMLDecodeError, KeyError):
|
|
53
52
|
return "unknown"
|
|
54
53
|
|
|
55
|
-
found = re.search(r'^version\s*=\s*"([^"]+)"', text, re.MULTILINE)
|
|
56
|
-
return found.group(1) if found else "unknown"
|
|
57
|
-
|
|
58
54
|
|
|
59
55
|
__version__ = _read_version()
|
|
60
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: links-notation
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.0
|
|
4
4
|
Summary: Python implementation of the Links Notation parser
|
|
5
5
|
Author-email: "Link.Foundation" <drakonard@gmail.com>
|
|
6
6
|
License-Expression: Unlicense
|
|
@@ -11,14 +11,14 @@ Keywords: lino,parser,links,notation,protocol
|
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
20
|
Classifier: Topic :: Text Processing
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Provides-Extra: test
|
|
@@ -29,11 +29,7 @@ Requires-Dist: black>=26.10.1; extra == "lint"
|
|
|
29
29
|
Requires-Dist: isort>=9.0.2; extra == "lint"
|
|
30
30
|
Requires-Dist: flake8>=7.4.1; extra == "lint"
|
|
31
31
|
Provides-Extra: dev
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
|
|
34
|
-
Requires-Dist: black>=26.10.1; extra == "dev"
|
|
35
|
-
Requires-Dist: isort>=9.0.2; extra == "dev"
|
|
36
|
-
Requires-Dist: flake8>=7.4.1; extra == "dev"
|
|
32
|
+
Requires-Dist: links-notation[lint,test]; extra == "dev"
|
|
37
33
|
Dynamic: license-file
|
|
38
34
|
|
|
39
35
|
# Links Notation Parser for Python
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = [
|
|
3
|
-
"setuptools>=84.0.0; python_version >= '3.10'",
|
|
4
|
-
"setuptools>=82.0.1; python_version < '3.10'",
|
|
5
|
-
]
|
|
2
|
+
requires = ["setuptools>=84.0.0"]
|
|
6
3
|
build-backend = "setuptools.build_meta"
|
|
7
4
|
|
|
8
5
|
[project]
|
|
9
6
|
name = "links-notation"
|
|
10
|
-
version = "0.
|
|
7
|
+
version = "0.27.0"
|
|
11
8
|
description = "Python implementation of the Links Notation parser"
|
|
12
9
|
readme = "README.md"
|
|
13
10
|
license = "Unlicense"
|
|
@@ -20,21 +17,21 @@ classifiers = [
|
|
|
20
17
|
"Development Status :: 4 - Beta",
|
|
21
18
|
"Intended Audience :: Developers",
|
|
22
19
|
"Programming Language :: Python :: 3",
|
|
23
|
-
"Programming Language :: Python :: 3.9",
|
|
24
|
-
"Programming Language :: Python :: 3.10",
|
|
25
20
|
"Programming Language :: Python :: 3.11",
|
|
26
21
|
"Programming Language :: Python :: 3.12",
|
|
27
22
|
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.14",
|
|
24
|
+
"Programming Language :: Python :: 3.15",
|
|
28
25
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
26
|
"Topic :: Text Processing",
|
|
30
27
|
]
|
|
31
|
-
requires-python = ">=3.
|
|
28
|
+
requires-python = ">=3.11"
|
|
32
29
|
dependencies = []
|
|
33
30
|
|
|
34
31
|
[project.optional-dependencies]
|
|
35
32
|
test = ["pytest>=9.1.1", "pytest-timeout>=2.4.0"]
|
|
36
33
|
lint = ["black>=26.10.1", "isort>=9.0.2", "flake8>=7.4.1"]
|
|
37
|
-
dev = ["
|
|
34
|
+
dev = ["links-notation[test,lint]"]
|
|
38
35
|
|
|
39
36
|
[project.urls]
|
|
40
37
|
Homepage = "https://github.com/link-foundation/links-notation"
|
|
@@ -54,12 +51,8 @@ timeout_func_only = true
|
|
|
54
51
|
|
|
55
52
|
[tool.black]
|
|
56
53
|
line-length = 120
|
|
57
|
-
target-version = ["
|
|
54
|
+
target-version = ["py311", "py312", "py313", "py314", "py315"]
|
|
58
55
|
|
|
59
56
|
[tool.isort]
|
|
60
57
|
profile = "black"
|
|
61
58
|
line_length = 120
|
|
62
|
-
|
|
63
|
-
[tool.flake8]
|
|
64
|
-
max-line-length = 120
|
|
65
|
-
extend-ignore = ["E203", "W503"]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""The reported version must match pyproject.toml, installed or not."""
|
|
2
|
+
|
|
3
|
+
import tomllib
|
|
4
|
+
from importlib.metadata import PackageNotFoundError
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from unittest.mock import patch
|
|
7
|
+
|
|
8
|
+
import links_notation
|
|
9
|
+
|
|
10
|
+
PYPROJECT = Path(__file__).resolve().parent.parent / "pyproject.toml"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def declared_version():
|
|
14
|
+
with PYPROJECT.open("rb") as file:
|
|
15
|
+
return tomllib.load(file)["project"]["version"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_version_matches_pyproject():
|
|
19
|
+
assert links_notation.__version__ == declared_version()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def test_uninstalled_checkout_reads_pyproject():
|
|
23
|
+
def missing(name):
|
|
24
|
+
raise PackageNotFoundError(name)
|
|
25
|
+
|
|
26
|
+
with patch("links_notation._distribution_version", side_effect=missing):
|
|
27
|
+
assert links_notation._read_version() == declared_version()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{links_notation-0.25.2 → links_notation-0.27.0}/links_notation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|