python-inspector 0.14.4__py3-none-any.whl → 0.15.0__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.
@@ -123,10 +123,10 @@ def node_to_value(node, body):
123
123
  if isinstance(node, ast.Constant):
124
124
  return node.value
125
125
 
126
- if isinstance(node, ast.Str):
126
+ if isinstance(node, ast.Constant) and isinstance(node.value, str):
127
127
  return node.s
128
128
 
129
- if isinstance(node, ast.Num):
129
+ if isinstance(node, ast.Constant) and isinstance(node.value, int):
130
130
  return node.n
131
131
 
132
132
  if isinstance(node, (ast.List, ast.Tuple, ast.Set,)):
@@ -121,6 +121,7 @@ def iter_requirements(level, extras, setup_file):
121
121
 
122
122
  mock_args, mock_kwargs = mock_setup.call_args
123
123
  install_requires = mock_kwargs.get("install_requires", install_requires)
124
+ install_requires = [req for req in install_requires if req]
124
125
 
125
126
  requires_extras = mock_kwargs.get("extras_require", requires_extras)
126
127
  test_requires = mock_kwargs.get("test_requires", test_requires)
@@ -110,7 +110,7 @@ TRACE_DEEP = False
110
110
  TRACE_ULTRA_DEEP = False
111
111
 
112
112
  # Supported environments
113
- PYTHON_VERSIONS = "27", "36", "37", "38", "39", "310", "311", "312", "313"
113
+ PYTHON_VERSIONS = "27", "36", "37", "38", "39", "310", "311", "312", "313", "3.14"
114
114
 
115
115
  PYTHON_DOT_VERSIONS_BY_VER = {
116
116
  "27": "2.7",
@@ -122,6 +122,7 @@ PYTHON_DOT_VERSIONS_BY_VER = {
122
122
  "311": "3.11",
123
123
  "312": "3.12",
124
124
  "313": "3.13",
125
+ "314": "3.14",
125
126
  }
126
127
 
127
128
  valid_python_versions = list(PYTHON_DOT_VERSIONS_BY_VER.keys())
@@ -145,6 +146,7 @@ ABIS_BY_PYTHON_VERSION = {
145
146
  "311": ["cp311", "cp311m", "abi3"],
146
147
  "312": ["cp312", "cp312m", "abi3"],
147
148
  "313": ["cp313", "cp313m", "abi3"],
149
+ "314": ["cp314", "cp314m", "abi3"],
148
150
  }
149
151
 
150
152
  PLATFORMS_BY_OS = {
@@ -1694,7 +1696,14 @@ class Cache:
1694
1696
  cached = os.path.join(self.directory, cache_key)
1695
1697
  lock_file = f"{cached}.lockfile"
1696
1698
 
1697
- if force or not os.path.exists(cached):
1699
+ cache_valid = os.path.exists(cached) and os.path.getsize(cached) > 0
1700
+
1701
+ if force or not cache_valid:
1702
+ if not cache_valid and os.path.exists(cached):
1703
+ if TRACE_DEEP:
1704
+ print(f" FILE CACHE INVALID (empty file): {path_or_url}")
1705
+ os.remove(cached)
1706
+
1698
1707
  if TRACE_DEEP:
1699
1708
  print(f" FILE CACHE MISS: {path_or_url}")
1700
1709
  content = await get_file_content(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-inspector
3
- Version: 0.14.4
3
+ Version: 0.15.0
4
4
  Summary: python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies.
5
5
  Home-page: https://github.com/aboutcode-org/python-inspector
6
6
  Author: nexB. Inc. and others
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
14
  Classifier: Topic :: Software Development
15
15
  Classifier: Topic :: Utilities
16
- Requires-Python: >=3.9
16
+ Requires-Python: >=3.10
17
17
  Description-Content-Type: text/x-rst
18
18
  License-File: apache-2.0.LICENSE
19
19
  License-File: NOTICE
@@ -49,7 +49,7 @@ Requires-Dist: twine; extra == "dev"
49
49
  Requires-Dist: ruff; extra == "dev"
50
50
  Requires-Dist: pytest-rerunfailures; extra == "dev"
51
51
  Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
52
- Requires-Dist: Sphinx>=5.0.2; extra == "dev"
52
+ Requires-Dist: Sphinx>=6.2.0; extra == "dev"
53
53
  Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
54
54
  Requires-Dist: sphinx-reredirects>=0.1.2; extra == "dev"
55
55
  Requires-Dist: doc8>=0.11.2; extra == "dev"
@@ -3,7 +3,7 @@ _packagedcode/models.py,sha256=n2xL9HSLfC0QQwQlH1yzOPZjjHOcfTCJ36E8t45Qxis,48917
3
3
  _packagedcode/pypi.py,sha256=dxEg2GYUa8ChUFL3tyZVjXjufZZ655BMEaPZEKIn89Q,70217
4
4
  _packagedcode/pypi.py.ABOUT,sha256=rqbtXJyYak0Sg-NCM3qDF7-JxCKXN5HEoU-qse_IqKA,551
5
5
  _packagedcode/pypi.py.NOTICE,sha256=QtJl8lok4abmslH7UT1UaOPFsuZPwM7hjd58UASQJ7o,1884
6
- _packagedcode/pypi_setup_py.py,sha256=8uXo28HFZeIQL9cbZZxkk98jrYzgvWKASRgjRi8D3Vo,5785
6
+ _packagedcode/pypi_setup_py.py,sha256=vEiYW8vQie5HKFmgRnBcFMvD6leuIODwHpmg43qSCN0,5859
7
7
  _packagedcode/pypi_setup_py.py.ABOUT,sha256=7FLC7R73YDfzEu47fij39PxteCqmojKSexChYZYpQlQ,300
8
8
  _packagedcode/pypi_setup_py.py.LICENSE,sha256=EsVAqcPMzlhNkyJ3j6EW_yF02WLs94p0w2igJYrUcxs,1077
9
9
  _packagedcode/utils.py,sha256=uxkWaSeZRY69LinSFdVFHirpuyLI4YcvYb2wLztU6T4,6970
@@ -19,24 +19,24 @@ python_inspector/resolution.py.ABOUT,sha256=tYLeHLgyo4zZrPlMXlVF59EjC-GGDaQeFKog
19
19
  python_inspector/resolution.py.LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
20
20
  python_inspector/resolve_cli.py,sha256=Z_UEGO6EXb7mTLuw85oF1uvQVkSc1W4lX6NJ3OkY79Q,12129
21
21
  python_inspector/settings.py,sha256=r4711MS_nFyXU4pWWhLtXt3mGo3QJBIZV28IttZT7gI,2304
22
- python_inspector/setup_py_live_eval.py,sha256=6uJLJT_Aw5SEeybe8JEaEiWCHOTbpsJ0BinN4mlprUE,7601
22
+ python_inspector/setup_py_live_eval.py,sha256=ZMhOvqf8djKFTBC0pq8HFsgpZDOuhnaJoGqoT_eTtCQ,7665
23
23
  python_inspector/setup_py_live_eval.py.ABOUT,sha256=ecRsdi0Z--mX8gnSwQzE2OqucpmD0AsmPlojp70uPxI,396
24
24
  python_inspector/setup_py_live_eval.py.LICENSE,sha256=5wfEqJLf5ANizw20WUURuTgoZOzMRK_4iGA39BApyRk,1643
25
25
  python_inspector/utils.py,sha256=cQWtdVT0RZ8XGj_sxYu_lX_sg-Iz3NCCtsg-haYbwiM,3541
26
26
  python_inspector/utils_pip_compatibility_tags.py,sha256=8ZQkXLldhqqO4sJ0aVXQwWYdw3Qo1_C9MhntShVlgE8,6831
27
27
  python_inspector/utils_pip_compatibility_tags.py.ABOUT,sha256=tFhzj7qUEA9H-Tg6K1BI5QBtmQEq0vHg0X2Ws7t073U,540
28
- python_inspector/utils_pypi.py,sha256=mNRufXI6_AcqI4eWG4BZr6akTg-ORSYMM7RxRbIIkr8,59018
28
+ python_inspector/utils_pypi.py,sha256=cT2FCKOqbaxQucDScTs_lAdgNqbEGWIRyoroX3cxcuU,59362
29
29
  python_inspector/utils_pypi.py.ABOUT,sha256=7s9WCNmS-qJJgHC979fI4whrM5Y41-Ar-LZoIfZXPVU,635
30
30
  python_inspector/utils_pypi_supported_tags.py,sha256=SdbIlKoCgyqBZIesEdrFhVMnYikBirvSDvPUPIomTSo,2850
31
31
  python_inspector/utils_pypi_supported_tags.py.ABOUT,sha256=ndJ1kQS6u7caYmLc6XVnNIdKfpnvGjKepxpmhQJWJyA,741
32
- python_inspector-0.14.4.dist-info/licenses/AUTHORS.rst,sha256=cLH597eiqyd4cSHJ9Ny_CcbSWzTT7_VTCg3Zw43b4Ns,107
33
- python_inspector-0.14.4.dist-info/licenses/CHANGELOG.rst,sha256=80u-zOpevH1F_JsvTjb3n3xi09vkpOPzJid4HPVzouc,6121
34
- python_inspector-0.14.4.dist-info/licenses/CODE_OF_CONDUCT.rst,sha256=xXDTFpYY3Y7JoxrWADihieUvhGlwJc_oxsbmLJaBvE4,3422
35
- python_inspector-0.14.4.dist-info/licenses/NOTICE,sha256=fkLIlzyP8zWNnPbFSXkTInNgYl35THH5-J8vMKuNzhc,761
36
- python_inspector-0.14.4.dist-info/licenses/README.rst,sha256=ucUCSQt39WlNfVdOl_1WbuvBqEN0NZm_h5o_vltNFps,7033
37
- python_inspector-0.14.4.dist-info/licenses/apache-2.0.LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
38
- python_inspector-0.14.4.dist-info/METADATA,sha256=e22S9yx9gcmgBzLRUiMvYbbWKtMMVzi26S41z4qeT7Q,9380
39
- python_inspector-0.14.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- python_inspector-0.14.4.dist-info/entry_points.txt,sha256=2s9F95rPWbgz3cOnKN3Z7PwzglPt2EsX2qf7W0Xubpk,87
41
- python_inspector-0.14.4.dist-info/top_level.txt,sha256=C-KAHTL8C6jd7QULvFk83YjOBVxDrnyefG3RikRHRlw,31
42
- python_inspector-0.14.4.dist-info/RECORD,,
32
+ python_inspector-0.15.0.dist-info/licenses/AUTHORS.rst,sha256=cLH597eiqyd4cSHJ9Ny_CcbSWzTT7_VTCg3Zw43b4Ns,107
33
+ python_inspector-0.15.0.dist-info/licenses/CHANGELOG.rst,sha256=pqXm6Y962ADyckNliN4bjPs2Z-iHce5-poMAxj4LWyY,6419
34
+ python_inspector-0.15.0.dist-info/licenses/CODE_OF_CONDUCT.rst,sha256=xXDTFpYY3Y7JoxrWADihieUvhGlwJc_oxsbmLJaBvE4,3422
35
+ python_inspector-0.15.0.dist-info/licenses/NOTICE,sha256=fkLIlzyP8zWNnPbFSXkTInNgYl35THH5-J8vMKuNzhc,761
36
+ python_inspector-0.15.0.dist-info/licenses/README.rst,sha256=ucUCSQt39WlNfVdOl_1WbuvBqEN0NZm_h5o_vltNFps,7033
37
+ python_inspector-0.15.0.dist-info/licenses/apache-2.0.LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
38
+ python_inspector-0.15.0.dist-info/METADATA,sha256=MF4_8Jdalv3aNviIrcIty7lbhBhyT7EJ5aZKdSHOh0U,9381
39
+ python_inspector-0.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
+ python_inspector-0.15.0.dist-info/entry_points.txt,sha256=2s9F95rPWbgz3cOnKN3Z7PwzglPt2EsX2qf7W0Xubpk,87
41
+ python_inspector-0.15.0.dist-info/top_level.txt,sha256=C-KAHTL8C6jd7QULvFk83YjOBVxDrnyefG3RikRHRlw,31
42
+ python_inspector-0.15.0.dist-info/RECORD,,
@@ -1,6 +1,13 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ v0.15.0
5
+ -----------
6
+
7
+ - Drop support for python3.9 and add support for python3.14
8
+ - Ensure that cached file is not empty before use https://github.com/aboutcode-org/python-inspector/pull/251
9
+ - Filter out empty values from install_requires https://github.com/aboutcode-org/python-inspector/pull/250
10
+
4
11
  v0.14.4
5
12
  -----------
6
13