pkg-about 2.1.0__tar.gz → 2.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {pkg_about-2.1.0 → pkg_about-2.1.2}/CHANGES.rst +2 -1
  2. {pkg_about-2.1.0/src/pkg_about.egg-info → pkg_about-2.1.2}/PKG-INFO +1 -1
  3. {pkg_about-2.1.0 → pkg_about-2.1.2}/noxfile.py +16 -26
  4. {pkg_about-2.1.0 → pkg_about-2.1.2}/pyproject.toml +7 -7
  5. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about/_about.py +7 -2
  6. {pkg_about-2.1.0 → pkg_about-2.1.2/src/pkg_about.egg-info}/PKG-INFO +1 -1
  7. {pkg_about-2.1.0 → pkg_about-2.1.2}/LICENSE +0 -0
  8. {pkg_about-2.1.0 → pkg_about-2.1.2}/MANIFEST.in +0 -0
  9. {pkg_about-2.1.0 → pkg_about-2.1.2}/README.rst +0 -0
  10. {pkg_about-2.1.0 → pkg_about-2.1.2}/docs/CHANGES.rst +0 -0
  11. {pkg_about-2.1.0 → pkg_about-2.1.2}/docs/README.rst +0 -0
  12. {pkg_about-2.1.0 → pkg_about-2.1.2}/docs/_static/.keep +0 -0
  13. {pkg_about-2.1.0 → pkg_about-2.1.2}/docs/_templates/.keep +0 -0
  14. {pkg_about-2.1.0 → pkg_about-2.1.2}/docs/conf.py +0 -0
  15. {pkg_about-2.1.0 → pkg_about-2.1.2}/docs/index.rst +0 -0
  16. {pkg_about-2.1.0 → pkg_about-2.1.2}/setup.cfg +0 -0
  17. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about/__about__.py +0 -0
  18. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about/__init__.py +0 -0
  19. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about/py.typed +0 -0
  20. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about.egg-info/SOURCES.txt +0 -0
  21. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about.egg-info/dependency_links.txt +0 -0
  22. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about.egg-info/requires.txt +0 -0
  23. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about.egg-info/top_level.txt +0 -0
  24. {pkg_about-2.1.0 → pkg_about-2.1.2}/src/pkg_about.egg-info/zip-safe +0 -0
  25. {pkg_about-2.1.0 → pkg_about-2.1.2}/tests/__init__.py +0 -0
  26. {pkg_about-2.1.0 → pkg_about-2.1.2}/tests/__main__.py +0 -0
  27. {pkg_about-2.1.0 → pkg_about-2.1.2}/tests/data/setup.cfg +0 -0
  28. {pkg_about-2.1.0 → pkg_about-2.1.2}/tests/test_main.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- 2.1.0 (2026-01-20)
4
+ 2.1.2 (2026-01-27)
5
5
  ------------------
6
6
  - | Now about() and about_from_setup() return an instance of the 'adict'
7
7
  | dictionary with about info (but backward compatibility is preserved).
@@ -24,6 +24,7 @@ Changelog
24
24
  - The documentation has been moved from Read the Docs to GitHub Pages.
25
25
  - Added the nox's 'cleanup' test environment.
26
26
  - Setup update (mainly dependencies) and bug fixes.
27
+ - Fixes for typing.
27
28
 
28
29
  1.5.0 (2025-09-01)
29
30
  ------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkg_about
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Unified access to Python package metadata at runtime.
5
5
  Author-email: Adam Karpierz <adam@karpierz.net>
6
6
  Maintainer-email: Adam Karpierz <adam@karpierz.net>
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: Zlib
3
3
 
4
4
  # /// script
5
- # dependencies = ["nox>=2025.11.12", "packaging>=26.0.0"]
5
+ # dependencies = ["nox>=2025.11.12", "nox_ext", "nox_lib"]
6
6
  # ///
7
7
 
8
8
  from __future__ import annotations
@@ -18,9 +18,7 @@ import warnings
18
18
 
19
19
  import nox
20
20
  import nox_ext
21
- import packaging.version
22
- from rich.pretty import pprint
23
- from rich import print
21
+ from nox_ext import print, pprint
24
22
 
25
23
  here = Path(__file__).resolve().parent
26
24
  env = os.environ
@@ -33,8 +31,6 @@ PYPROJECT = nox.project.load_toml("pyproject.toml")
33
31
  PY_VERSIONS = nox.project.python_versions(PYPROJECT)
34
32
  PY_DEFAULT = "3.13"
35
33
 
36
- PKG_TOP_LEVELS = ["pkg_about"]
37
-
38
34
  # Prevent Python from writing bytecode
39
35
  env["PYTHONDONTWRITEBYTECODE"] = "1"
40
36
  # env["PKG_INITIAL_BUILD"] = "1"
@@ -47,14 +43,13 @@ rmtree = partial(shutil.rmtree, ignore_errors=True)
47
43
  # Sessions
48
44
 
49
45
  @nox.session(python=[PY_DEFAULT], default=False,
50
- tags=["prepare"], requires=["cleanup"])
46
+ requires=["cleanup"])
51
47
  def prepare(session: nox.Session) -> None:
52
48
  """Preparing the repository"""
53
49
  cmd = here/".aprep.cmd"
54
50
  if cmd.is_file(): subprocess.run([cmd])
55
51
 
56
- @nox.session(python=[PY_DEFAULT], default=False,
57
- tags=["cleanup"])
52
+ @nox.session(python=[PY_DEFAULT], default=False)
58
53
  def cleanup(session: nox.Session) -> None:
59
54
  """Cleaning the repository"""
60
55
  #no_package = true
@@ -75,8 +70,7 @@ def tests(session: nox.Session) -> None:
75
70
  session.py("--version")
76
71
  session.py("-m", "tests", *session.posargs)
77
72
 
78
- @nox.session(python=[PY_DEFAULT],
79
- tags=["coverage"])
73
+ @nox.session(python=[PY_DEFAULT])
80
74
  def coverage(session: nox.Session) -> None:
81
75
  """Running code coverage analysis"""
82
76
  session.install(".", "--group=coverage")
@@ -85,22 +79,21 @@ def coverage(session: nox.Session) -> None:
85
79
  session.py("-m", "coverage", "html", success_codes=range(0, 256))
86
80
  session.py("-m", "coverage", "report")
87
81
 
88
- @nox.session(python=[PY_DEFAULT],
89
- tags=["docs"])
82
+ @nox.session(python=[PY_DEFAULT])
90
83
  def docs(session: nox.Session) -> None:
91
84
  """Building documentation and running doc tests"""
92
85
  session.install(".", "--group=docs")
93
- html_path = here/"build/docs/html"
86
+ html_dir = here/"build/docs/html"
94
87
  session.py("-m", "sphinxlint", "-i", "#arch", "-i", ".nox", "-i", ".tox",
95
88
  "-i", "build", "-i", "dist", "-i", ".mypy_cache")
96
89
  #session.run("python","-m", "sphinx.apidoc", "-f", *[session.site_packages/f"{item}/"
97
- # for item in PKG_TOP_LEVELS])
98
- session.py("-m", "sphinx.cmd.build", "-W", "-a", "-b", "html", "-E", here/"docs", here/"build/docs/html")
99
- session.py("-m", "sphinx.cmd.build", "-W", "-a", "-b", "doctest", here/"docs", here/"build/docs/html")
100
- session.py("-m", "sphinx.cmd.build", "-W", "-a", "-b", "linkcheck", here/"docs", here/"build/docs/html")
90
+ # for item in PKG.TOP_LEVELS])
91
+ session.py("-m", "sphinx.cmd.build", "-W", "-a", "-b", "html", "-E", here/"docs", html_dir)
92
+ session.py("-m", "sphinx.cmd.build", "-W", "-a", "-b", "doctest", here/"docs", html_dir)
93
+ session.py("-m", "sphinx.cmd.build", "-W", "-a", "-b", "linkcheck", here/"docs", html_dir)
101
94
 
102
95
  @nox.session(python=[PY_DEFAULT], default=False,
103
- tags=["build"], requires=[f"{tests.name}-{item}" for item in tests.python] + ["docs"])
96
+ requires=["tests", "docs"])
104
97
  def build(session: nox.Session) -> None:
105
98
  """Building the package"""
106
99
  session.install("--group=build")
@@ -110,7 +103,7 @@ def build(session: nox.Session) -> None:
110
103
  session.py("-m", "twine", "check", "dist/*")
111
104
 
112
105
  @nox.session(python=[PY_DEFAULT], default=False,
113
- tags=["publish"], requires=["build"])
106
+ requires=["build"])
114
107
  def publish(session: nox.Session) -> None:
115
108
  """Publishing the package and documentation"""
116
109
  session.install("--group=publish")
@@ -143,17 +136,14 @@ def publish(session: nox.Session) -> None:
143
136
  rmtree(gh_pages_dir)
144
137
  session.run("git", "worktree", "prune")
145
138
 
146
- @nox.session(python=[PY_DEFAULT],
147
- tags=["typing"])
139
+ @nox.session(python=[PY_DEFAULT])
148
140
  def typing(session: nox.Session) -> None:
149
141
  """Static type checking"""
150
142
  session.install(".", "--group=typing")
151
143
  session.py("-m", "mypy")
152
144
 
153
- @nox.session(python=[PY_DEFAULT],
154
- tags=["lint"])
145
+ @nox.session(python=[PY_DEFAULT])
155
146
  def lint(session: nox.Session) -> None:
156
147
  """Checking code style and quality"""
157
148
  session.install(".", "--group=lint")
158
- session.py("-m", "flake8", *[session.site_packages/f"{item}/"
159
- for item in PKG_TOP_LEVELS])
149
+ session.py("-m", "flake8", here/"src/")
@@ -2,12 +2,12 @@
2
2
  # SPDX-License-Identifier: Zlib
3
3
 
4
4
  [build-system]
5
- requires = ['setuptools>=80.10.1', 'packaging>=26.0.0']
5
+ requires = ['setuptools>=80.10.2', 'packaging>=26.0.0']
6
6
  build-backend = 'setuptools.build_meta'
7
7
 
8
8
  [project]
9
9
  name = 'pkg_about'
10
- version = '2.1.0'
10
+ version = '2.1.2'
11
11
  description = 'Unified access to Python package metadata at runtime.'
12
12
  authors = [
13
13
  { name = 'Adam Karpierz', email = 'adam@karpierz.net' },
@@ -60,18 +60,18 @@ dynamic = ['readme']
60
60
  [dependency-groups]
61
61
  base = [
62
62
  'pip>=25.3',
63
- 'setuptools>=80.10.1',
63
+ 'setuptools>=80.10.2',
64
64
  ]
65
65
  test = [
66
66
  { include-group = 'base' },
67
- 'deepdiff>=8.6.1',
68
- 'rich>=14.2.0',
69
67
  'tomli>=2.4.0 ; python_version < "3.11"',
68
+ 'deepdiff>=8.6.1',
69
+ 'rich>=14.3.1',
70
70
  'appdirs==1.4.4',
71
71
  ]
72
72
  coverage = [
73
73
  { include-group = 'test' },
74
- 'coverage>=7.13.1',
74
+ 'coverage>=7.13.2',
75
75
  'covdefaults>=2.3.0',
76
76
  'diff-cover>=10.2.0',
77
77
  ]
@@ -102,7 +102,7 @@ typing = [
102
102
  { include-group = 'base' },
103
103
  'mypy>=1.19.1',
104
104
  'mypy_extensions>=1.1.0',
105
- 'types-setuptools>=80.9.0.20251223',
105
+ 'types-setuptools>=80.10.0.20260124',
106
106
  ]
107
107
  lint = [
108
108
  { include-group = 'test' },
@@ -6,6 +6,7 @@ from __future__ import annotations
6
6
  __all__ = ('about', 'about_from_setup')
7
7
 
8
8
  import sys
9
+ import os
9
10
  from typing import Any, NamedTuple
10
11
  from typing_extensions import Self
11
12
  from pathlib import Path
@@ -78,9 +79,11 @@ def about(package: str | None = None) -> adict:
78
79
  return pkg_metadata
79
80
 
80
81
 
81
- __sentinel = object()
82
+ class __Sentinel: pass # noqa: E305
83
+ __sentinel = __Sentinel() # noqa: E305
82
84
 
83
- def about_from_setup(package_path: Path | str | None = __sentinel) -> adict:
85
+ def about_from_setup(package_path: Path | str | int | None
86
+ | __Sentinel = __sentinel) -> adict:
84
87
  no_arg = (package_path is __sentinel)
85
88
  level = (1 if no_arg else
86
89
  # Potential backward incompatibility.
@@ -93,6 +96,8 @@ def about_from_setup(package_path: Path | str | None = __sentinel) -> adict:
93
96
  if level is not None:
94
97
  package_path = Path(pkg_globals["__file__"]).resolve().parents[level]
95
98
 
99
+ assert isinstance(package_path, (str, os.PathLike))
100
+
96
101
  metadata = build.util.project_wheel_metadata(package_path)
97
102
  version = packaging.version.parse(metadata["Version"])
98
103
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkg_about
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Unified access to Python package metadata at runtime.
5
5
  Author-email: Adam Karpierz <adam@karpierz.net>
6
6
  Maintainer-email: Adam Karpierz <adam@karpierz.net>
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