extreqs 1.2.1__tar.gz → 1.3.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.
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: extreqs
3
- Version: 1.2.1
3
+ Version: 1.3.0
4
4
  Summary: Parse python requirements.txt files into setuptools extras
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
7
7
  Classifier: Development Status :: 3 - Alpha
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Programming Language :: Python :: 3
10
- Classifier: Programming Language :: Python :: 3.10
11
10
  Classifier: Programming Language :: Python :: 3.11
12
11
  Classifier: Programming Language :: Python :: 3.12
13
12
  Classifier: Programming Language :: Python :: 3.13
14
13
  Classifier: Programming Language :: Python :: 3.14
15
- Requires-Dist: requirements-parser>=0.13.0
14
+ Classifier: Programming Language :: Python :: 3.15
15
+ Requires-Dist: requirements-parser>=0.13.1
16
16
  Requires-Python: >=3.10, <4.0
17
17
  Description-Content-Type: text/markdown
18
18
 
@@ -0,0 +1,31 @@
1
+ [project]
2
+ name = "extreqs"
3
+ version = "1.3.0"
4
+ description = "Parse python requirements.txt files into setuptools extras"
5
+ requires-python = ">=3.10,<4.0"
6
+ readme = "README.md"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ classifiers = [
10
+ "Development Status :: 3 - Alpha",
11
+ "License :: OSI Approved :: MIT License",
12
+ "Programming Language :: Python :: 3",
13
+ "Programming Language :: Python :: 3.11",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Programming Language :: Python :: 3.14",
17
+ "Programming Language :: Python :: 3.15",
18
+ ]
19
+ dependencies = ["requirements-parser>=0.13.1"]
20
+
21
+ [build-system]
22
+ requires = ["uv_build>=0.13.4,<0.14"]
23
+ build-backend = "uv_build"
24
+
25
+ [dependency-groups]
26
+ dev = [
27
+ "mypy>=2.4",
28
+ "pdoc>=16",
29
+ "pytest>=9.1",
30
+ "ruff>=0.17.1",
31
+ ]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "extreqs"
3
- version = "1.2.1"
3
+ version = "1.3.0"
4
4
  description = "Parse python requirements.txt files into setuptools extras"
5
5
  requires-python = ">=3.10,<4.0"
6
6
  readme = "README.md"
@@ -10,25 +10,25 @@ classifiers = [
10
10
  "Development Status :: 3 - Alpha",
11
11
  "License :: OSI Approved :: MIT License",
12
12
  "Programming Language :: Python :: 3",
13
- "Programming Language :: Python :: 3.10",
14
13
  "Programming Language :: Python :: 3.11",
15
14
  "Programming Language :: Python :: 3.12",
16
15
  "Programming Language :: Python :: 3.13",
17
16
  "Programming Language :: Python :: 3.14",
17
+ "Programming Language :: Python :: 3.15",
18
18
  ]
19
19
 
20
20
  dependencies = [
21
- "requirements-parser>=0.13.0",
21
+ "requirements-parser>=0.13.1",
22
22
  ]
23
23
 
24
24
  [build-system]
25
- requires = ["uv_build>=0.10.0,<0.11.0"]
25
+ requires = ["uv_build>=0.13.4,<0.14"]
26
26
  build-backend = "uv_build"
27
27
 
28
28
  [dependency-groups]
29
29
  dev = [
30
- "mypy>=1.19.1",
31
- "pdoc3>=0.11.6",
32
- "pytest>=9.0.2",
33
- "ruff>=0.15.0",
30
+ "mypy>=2.4",
31
+ "pdoc>=16",
32
+ "pytest>=9.1",
33
+ "ruff>=0.17.1",
34
34
  ]
@@ -2,9 +2,10 @@
2
2
  # extreqs package
3
3
  """
4
4
 
5
- from .main import parse_requirement_files, parse_requirement_files_dict
6
5
  from importlib.metadata import version as _version
7
6
 
7
+ from .main import parse_requirement_files, parse_requirement_files_dict
8
+
8
9
  __version__ = _version("extreqs")
9
10
 
10
11
  __all__ = ["parse_requirement_files", "parse_requirement_files_dict"]
@@ -1,5 +1,4 @@
1
1
  import logging
2
- import sys
3
2
  import typing as tp
4
3
  from collections import defaultdict
5
4
  from pathlib import Path
@@ -9,7 +8,7 @@ from requirements.requirement import Requirement
9
8
  logger = logging.getLogger(__name__)
10
9
 
11
10
 
12
- def str_as_list(s: tp.Optional[tp.Union[str, tp.List[str]]]) -> tp.List[str]:
11
+ def str_as_list(s: str | list[str] | None) -> list[str]:
13
12
  if s is None:
14
13
  return []
15
14
  if isinstance(s, str):
@@ -23,7 +22,7 @@ UNSUPPORTED_VCS = {"git", "hg", "svn", "bzr"}
23
22
  class Parser:
24
23
  def __init__(self, fpath, file_context=None) -> None:
25
24
  self.file_context = str_as_list(file_context)
26
- self.block_context: tp.List[str] = []
25
+ self.block_context: list[str] = []
27
26
  self.fpath = fpath
28
27
  self.line_num = -1
29
28
 
@@ -117,7 +116,7 @@ def merge_install_extras(*install_extras):
117
116
  def parse_requirement_files(
118
117
  *req_files: Path,
119
118
  **extra_req_files: Path,
120
- ) -> tp.Tuple[tp.List[str], tp.Dict[str, tp.List[str]]]:
119
+ ) -> tuple[list[str], dict[str, list[str]]]:
121
120
  """Parse requirements files into setuptools requirements.
122
121
 
123
122
  Requirements files whose listed dependencies all belong to
@@ -144,13 +143,9 @@ def parse_requirement_files(
144
143
  return (d["install_requires"], d["extras_require"])
145
144
 
146
145
 
147
- if sys.version_info < (3, 8):
148
- ParsedFiles = dict
149
- else:
150
-
151
- class ParsedFiles(tp.TypedDict):
152
- install_requires: tp.List[str]
153
- extras_require: tp.Dict[str, tp.List[str]]
146
+ class ParsedFiles(tp.TypedDict):
147
+ install_requires: list[str]
148
+ extras_require: dict[str, list[str]]
154
149
 
155
150
 
156
151
  def parse_requirement_files_dict(
File without changes
File without changes