python-inspector 0.11.0__py3-none-any.whl → 0.12.1__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.
_packagedcode/__init__.py CHANGED
@@ -3,6 +3,6 @@
3
3
  # ScanCode is a trademark of nexB Inc.
4
4
  # SPDX-License-Identifier: Apache-2.0
5
5
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6
- # See https://github.com/nexB/scancode-toolkit for support or download.
6
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
7
7
  # See https://aboutcode.org for more information about nexB OSS projects.
8
8
  #
_packagedcode/models.py CHANGED
@@ -3,7 +3,7 @@
3
3
  # ScanCode is a trademark of nexB Inc.
4
4
  # SPDX-License-Identifier: Apache-2.0
5
5
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6
- # See https://github.com/nexB/scancode-toolkit for support or download.
6
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
7
7
  # See https://aboutcode.org for more information about nexB OSS projects.
8
8
  #
9
9
 
@@ -373,7 +373,7 @@ class DependentPackage(ModelMixin):
373
373
  'either from the datafile or collected from another source. Some '
374
374
  'lockfiles for Composer or Cargo contain extra dependency data.'
375
375
  )
376
-
376
+
377
377
  extra_data = Mapping(
378
378
  label='extra data',
379
379
  help='A mapping of arbitrary extra data.',
_packagedcode/pypi.py CHANGED
@@ -4,7 +4,7 @@
4
4
  # ScanCode is a trademark of nexB Inc.
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7
- # See https://github.com/nexB/scancode-toolkit for support or download.
7
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
8
8
  # See https://aboutcode.org for more information about nexB OSS projects.
9
9
  #
10
10
 
@@ -457,7 +457,7 @@ def parse_metadata(location, datasource_id, package_type):
457
457
  name=name,
458
458
  version=version,
459
459
  description=get_description(metainfo=meta, location=str(location)),
460
- #TODO: https://github.com/nexB/scancode-toolkit/issues/3014
460
+ #TODO: https://github.com/aboutcode-org/scancode-toolkit/issues/3014
461
461
  declared_license=get_declared_license(meta),
462
462
  keywords=get_keywords(meta),
463
463
  parties=get_parties(meta),
@@ -781,7 +781,7 @@ class SetupCfgHandler(BaseExtractedPythonLayout):
781
781
  def parse_reqs(cls, reqs, scope):
782
782
  """
783
783
  Parse a list of requirements and return a list of dependencies
784
- """
784
+ """
785
785
  dependent_packages = []
786
786
  for req in reqs:
787
787
  req_parsed = packaging.requirements.Requirement(str(req))
@@ -816,7 +816,7 @@ def get_resolved_purl(purl: PackageURL, specifiers: SpecifierSet):
816
816
  return ResolvedPurl(
817
817
  purl=purl,
818
818
  is_resolved=is_resolved,
819
- )
819
+ )
820
820
 
821
821
  class PipfileHandler(BaseDependencyFileHandler):
822
822
  datasource_id = 'pipfile'
@@ -918,7 +918,7 @@ def get_requirements_txt_dependencies(location, include_nested=False):
918
918
  if isinstance(value, list):
919
919
  extra_data[name].extend(value)
920
920
  else:
921
- extra_data[name] = value
921
+ extra_data[name] = value
922
922
  dependent_packages = []
923
923
  for req in req_file.requirements:
924
924
 
@@ -987,7 +987,7 @@ def can_process_dependent_package(dep: models.DependentPackage):
987
987
  requirement_flags.pop("hash_options", None)
988
988
  if not requirement_flags:
989
989
  return True
990
- # we can not process the requirement if it has any flag set
990
+ # we can not process the requirement if it has any flag set
991
991
  # because this means it is not a standard specifier
992
992
  # but rather some pip specific option of sorts
993
993
  return not any(requirement_flags.values())
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) Gram and others.
3
3
  # This code is copied and modified from dephell_setuptools https://github.com/pypa/setuptools
4
4
  # SPDX-License-Identifier: MIT
5
- # See https://github.com/nexB/scancode-toolkit for support or download.
5
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
6
6
  # See https://aboutcode.org for more information about nexB OSS projects.
7
7
  #
8
8
 
@@ -192,11 +192,11 @@ def clean_setup(data):
192
192
  Return a cleaned mapping from a setup ``data`` mapping.
193
193
  """
194
194
  result = {k: v
195
- for k, v in data.items()
196
- if k in FIELDS
197
- and (v and v is not False)
198
- and str(v) != 'UNKNOWN'
199
- }
195
+ for k, v in data.items()
196
+ if k in FIELDS
197
+ and (v and v is not False)
198
+ and str(v) != 'UNKNOWN'
199
+ }
200
200
 
201
201
  # split keywords in words
202
202
  keywords = result.get('keywords')
_packagedcode/utils.py CHANGED
@@ -3,7 +3,7 @@
3
3
  # ScanCode is a trademark of nexB Inc.
4
4
  # SPDX-License-Identifier: Apache-2.0
5
5
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6
- # See https://github.com/nexB/scancode-toolkit for support or download.
6
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
7
7
  # See https://aboutcode.org for more information about nexB OSS projects.
8
8
  #
9
9
 
@@ -123,7 +123,7 @@ def build_description(summary, description):
123
123
  description = summary
124
124
  else:
125
125
  if summary and summary not in description:
126
- description = '\n'.join([summary , description])
126
+ description = '\n'.join([summary, description])
127
127
 
128
128
  return description
129
129
 
@@ -142,7 +142,8 @@ def combine_expressions(
142
142
  license ``expressions`` strings or LicenseExpression objects.
143
143
  """
144
144
  if not licensing:
145
- raise Exception('combine_expressions: cannot combine combine_expressions without license_expression package.')
145
+ raise Exception(
146
+ 'combine_expressions: cannot combine combine_expressions without license_expression package.')
146
147
  return expressions and str(le_combine_expressions(expressions, relation, unique, licensing)) or None
147
148
 
148
149
 
@@ -3,7 +3,7 @@
3
3
  # ScanCode is a trademark of nexB Inc.
4
4
  # SPDX-License-Identifier: Apache-2.0
5
5
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6
- # See https://github.com/nexB/scancode-toolkit for support or download.
6
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
7
7
  # See https://aboutcode.org for more information about nexB OSS projects.
8
8
  #
9
9
 
python_inspector/api.py CHANGED
@@ -5,7 +5,7 @@
5
5
  # ScanCode is a trademark of nexB Inc.
6
6
  # SPDX-License-Identifier: Apache-2.0
7
7
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8
- # See https://github.com/nexB/python-inspector for support or download.
8
+ # See https://aboutcode-orgnexB/python-inspector for support or download.
9
9
  # See https://aboutcode.org for more information about nexB OSS projects.
10
10
  #
11
11
 
@@ -64,7 +64,8 @@ class Resolution(NamedTuple):
64
64
  # clean file paths
65
65
  for file in files:
66
66
  path = file["path"]
67
- file["path"] = utils.remove_test_data_dir_variable_prefix(path=path)
67
+ file["path"] = utils.remove_test_data_dir_variable_prefix(
68
+ path=path)
68
69
  return {
69
70
  "files": files,
70
71
  "packages": [package for package in self.packages],
@@ -151,16 +152,20 @@ def resolve_dependencies(
151
152
 
152
153
  # requirements
153
154
  for req_file in requirement_files:
154
- deps = dependencies.get_dependencies_from_requirements(requirements_file=req_file)
155
+ deps = dependencies.get_dependencies_from_requirements(
156
+ requirements_file=req_file)
155
157
  for extra_data in dependencies.get_extra_data_from_requirements(requirements_file=req_file):
156
- index_urls = (*index_urls, *tuple(extra_data.get("extra_index_urls") or []))
157
- index_urls = (*index_urls, *tuple(extra_data.get("index_url") or []))
158
+ index_urls = (
159
+ *index_urls, *tuple(extra_data.get("extra_index_urls") or []))
160
+ index_urls = (
161
+ *index_urls, *tuple(extra_data.get("index_url") or []))
158
162
  direct_dependencies.extend(deps)
159
163
  package_data = [
160
164
  pkg_data.to_dict() for pkg_data in PipRequirementsFileHandler.parse(location=req_file)
161
165
  ]
162
166
  if generic_paths:
163
- req_file = utils.remove_test_data_dir_variable_prefix(path=req_file)
167
+ req_file = utils.remove_test_data_dir_variable_prefix(
168
+ path=req_file)
164
169
 
165
170
  files.append(
166
171
  dict(
@@ -213,13 +218,15 @@ def resolve_dependencies(
213
218
  files=[setup_py_file],
214
219
  analyze_setup_py_insecurely=analyze_setup_py_insecurely,
215
220
  )
216
- setup_py_file_deps = list(get_dependent_packages_from_reqs(reqs))
221
+ setup_py_file_deps = list(
222
+ get_dependent_packages_from_reqs(reqs))
217
223
  direct_dependencies.extend(setup_py_file_deps)
218
224
 
219
225
  package_data.dependencies = setup_py_file_deps
220
226
  file_package_data = [package_data.to_dict()]
221
227
  if generic_paths:
222
- setup_py_file = utils.remove_test_data_dir_variable_prefix(path=setup_py_file)
228
+ setup_py_file = utils.remove_test_data_dir_variable_prefix(
229
+ path=setup_py_file)
223
230
  files.append(
224
231
  dict(
225
232
  type="file",
@@ -260,9 +267,11 @@ def resolve_dependencies(
260
267
  else:
261
268
  credentials = None
262
269
  if parsed_netrc:
263
- login, password = utils.get_netrc_auth(index_url, parsed_netrc)
270
+ login, password = utils.get_netrc_auth(
271
+ index_url, parsed_netrc)
264
272
  credentials = (
265
- dict(login=login, password=password) if login and password else None
273
+ dict(login=login,
274
+ password=password) if login and password else None
266
275
  )
267
276
  repo = utils_pypi.PypiSimpleRepository(
268
277
  index_url=index_url,
@@ -382,7 +391,8 @@ def get_resolved_dependencies(
382
391
  ),
383
392
  reporter=BaseReporter(),
384
393
  )
385
- resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
394
+ resolver_results = resolver.resolve(
395
+ requirements=requirements, max_rounds=max_rounds)
386
396
  package_list = get_package_list(results=resolver_results)
387
397
  if pdt_output:
388
398
  return (format_pdt_tree(resolver_results), package_list)
@@ -401,7 +411,7 @@ def get_requirements_from_direct_dependencies(
401
411
  for dependency in direct_dependencies:
402
412
  # FIXME We are skipping editable requirements
403
413
  # and other pip options for now
404
- # https://github.com/nexB/python-inspector/issues/41
414
+ # https://github.com/aboutcode-org/python-inspector/issues/41
405
415
  if not can_process_dependent_package(dependency):
406
416
  continue
407
417
  req = Requirement(requirement_string=dependency.extracted_requirement)
@@ -3,7 +3,7 @@
3
3
  # ScanCode is a trademark of nexB Inc.
4
4
  # SPDX-License-Identifier: Apache-2.0
5
5
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6
- # See https://github.com/nexB/scancode-toolkit for support or download.
6
+ # See https://github.com/aboutcode-org/scancode-toolkit for support or download.
7
7
  # See https://aboutcode.org for more information about nexB OSS projects.
8
8
  #
9
9
 
@@ -21,12 +21,13 @@ class FileOptionType(click.File):
21
21
 
22
22
  def convert(self, value, param, ctx):
23
23
  known_opts = set(
24
- chain.from_iterable(p.opts for p in ctx.command.params if isinstance(p, click.Option))
24
+ chain.from_iterable(
25
+ p.opts for p in ctx.command.params if isinstance(p, click.Option))
25
26
  )
26
27
  if value in known_opts:
27
28
  self.fail(
28
29
  "Illegal file name conflicting with an option name: "
29
- f"{ os.fsdecode(value)}. "
30
+ f"{os.fsdecode(value)}. "
30
31
  'Use the special "-" file name to print results on screen/stdout.',
31
32
  param,
32
33
  ctx,
python_inspector/error.py CHANGED
@@ -5,7 +5,7 @@
5
5
  # ScanCode is a trademark of nexB Inc.
6
6
  # SPDX-License-Identifier: Apache-2.0
7
7
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8
- # See https://github.com/nexB/python-inspector for support or download.
8
+ # See https://github.com/aboutcode-org/python-inspector for support or download.
9
9
  # See https://aboutcode.org for more information about nexB OSS projects.
10
10
  #
11
11
 
@@ -5,7 +5,7 @@
5
5
  # ScanCode is a trademark of nexB Inc.
6
6
  # SPDX-License-Identifier: Apache-2.0
7
7
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8
- # See https://github.com/nexB/python-inspector for support or download.
8
+ # See https://github.com/aboutcode-org/python-inspector for support or download.
9
9
  # See https://aboutcode.org for more information about nexB OSS projects.
10
10
  #
11
11
 
@@ -53,7 +53,8 @@ def get_pypi_data_from_purl(
53
53
  project_urls = info.get("project_urls") or {}
54
54
  code_view_url = get_pypi_codeview_url(project_urls)
55
55
  bug_tracking_url = get_pypi_bugtracker_url(project_urls)
56
- python_version = get_python_version_from_env_tag(python_version=environment.python_version)
56
+ python_version = get_python_version_from_env_tag(
57
+ python_version=environment.python_version)
57
58
  valid_distribution_urls = []
58
59
 
59
60
  valid_distribution_urls.append(
@@ -3,7 +3,7 @@
3
3
  # SPDX-License-Identifier: ISC AND Apache-2.0
4
4
  # derived and heavily modified from https://github.com/sarugaku/resolvelib
5
5
 
6
- # See https://github.com/nexB/python-inspector for support or download.
6
+ # See https://github.com/aboutcode-org/python-inspector for support or download.
7
7
  # See https://aboutcode.org for more information about nexB OSS projects.
8
8
  #
9
9
 
@@ -210,13 +210,15 @@ def get_sdist_file_path_from_filename(sdist):
210
210
  sdist_file = sdist.rstrip(".tar.gz")
211
211
  with tarfile.open(os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, sdist)) as file:
212
212
  file.extractall(
213
- os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, "extracted_sdists", sdist_file)
213
+ os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR,
214
+ "extracted_sdists", sdist_file)
214
215
  )
215
216
  elif sdist.endswith(".zip"):
216
217
  sdist_file = sdist.rstrip(".zip")
217
218
  with ZipFile(os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, sdist)) as zip:
218
219
  zip.extractall(
219
- os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, "extracted_sdists", sdist_file)
220
+ os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR,
221
+ "extracted_sdists", sdist_file)
220
222
  )
221
223
 
222
224
  else:
@@ -241,7 +243,7 @@ def get_requirements_from_dependencies(
241
243
 
242
244
  # FIXME We are skipping editable requirements
243
245
  # and other pip options for now
244
- # https://github.com/nexB/python-inspector/issues/41
246
+ # https://github.com/aboutcode-org/python-inspector/issues/41
245
247
  if can_process_dependent_package(dep):
246
248
  yield Requirement(str(dep.extracted_requirement))
247
249
 
@@ -359,7 +361,8 @@ class PythonInputProvider(AbstractProvider):
359
361
  ignore_errors=False,
360
362
  ):
361
363
  self.environment = environment
362
- self.environment_marker = get_environment_marker_from_environment(self.environment)
364
+ self.environment_marker = get_environment_marker_from_environment(
365
+ self.environment)
363
366
  self.repos = repos or []
364
367
  self.versions_by_package = {}
365
368
  self.dependencies_by_purl = {}
@@ -408,9 +411,11 @@ class PythonInputProvider(AbstractProvider):
408
411
  versions = []
409
412
  for version, package in repo.get_package_versions(name).items():
410
413
  python_version = parse_version(
411
- get_python_version_from_env_tag(python_version=self.environment.python_version)
414
+ get_python_version_from_env_tag(
415
+ python_version=self.environment.python_version)
412
416
  )
413
- wheels = list(package.get_supported_wheels(environment=self.environment))
417
+ wheels = list(package.get_supported_wheels(
418
+ environment=self.environment))
414
419
  valid_wheel_present = False
415
420
  pypi_valid_python_version = False
416
421
  if wheels:
@@ -459,7 +464,8 @@ class PythonInputProvider(AbstractProvider):
459
464
  Return requirements for a package from the simple repositories.
460
465
  """
461
466
  python_version = parse_version(
462
- get_python_version_from_env_tag(python_version=self.environment.python_version)
467
+ get_python_version_from_env_tag(
468
+ python_version=self.environment.python_version)
463
469
  )
464
470
 
465
471
  wheels = utils_pypi.download_wheel(
@@ -472,7 +478,8 @@ class PythonInputProvider(AbstractProvider):
472
478
 
473
479
  if wheels:
474
480
  for wheel in wheels:
475
- wheel_location = os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, wheel)
481
+ wheel_location = os.path.join(
482
+ utils_pypi.CACHE_THIRDPARTY_DIR, wheel)
476
483
  requirements = get_requirements_from_distribution(
477
484
  handler=PypiWheelHandler,
478
485
  location=wheel_location,
@@ -564,7 +571,8 @@ class PythonInputProvider(AbstractProvider):
564
571
  ):
565
572
  valid_versions.append(parsed_version)
566
573
  if not all(version.is_prerelease for version in valid_versions):
567
- valid_versions = [version for version in valid_versions if not version.is_prerelease]
574
+ valid_versions = [
575
+ version for version in valid_versions if not version.is_prerelease]
568
576
  for version in valid_versions:
569
577
  yield Candidate(name=name, version=version, extras=extras)
570
578
 
@@ -585,7 +593,8 @@ class PythonInputProvider(AbstractProvider):
585
593
  versions.extend(self.get_versions_for_package(name=name))
586
594
  else:
587
595
  for repo in self.repos:
588
- versions.extend(self.get_versions_for_package(name=name, repo=repo))
596
+ versions.extend(
597
+ self.get_versions_for_package(name=name, repo=repo))
589
598
 
590
599
  if not versions:
591
600
  if self.ignore_errors:
@@ -629,7 +638,7 @@ class PythonInputProvider(AbstractProvider):
629
638
  Yield dependencies for the given candidate.
630
639
  """
631
640
  name = packvers.utils.canonicalize_name(candidate.name)
632
- # TODO: handle extras https://github.com/nexB/python-inspector/issues/10
641
+ # TODO: handle extras https://github.com/aboutcode-org/python-inspector/issues/10
633
642
  if candidate.extras:
634
643
  r = f"{name}=={candidate.version}"
635
644
  yield Requirement(r)
@@ -676,7 +685,8 @@ def dfs(mapping: Dict, graph: DirectedGraph, src: str):
676
685
 
677
686
  return dict(
678
687
  package=str(src_purl),
679
- dependencies=sorted([dfs(mapping, graph, c) for c in children], key=lambda d: d["package"]),
688
+ dependencies=sorted([dfs(mapping, graph, c)
689
+ for c in children], key=lambda d: d["package"]),
680
690
  )
681
691
 
682
692
 
@@ -794,7 +804,8 @@ def get_setup_requirements(sdist_location: str, setup_py_location: str, setup_cf
794
804
  """
795
805
 
796
806
  if not os.path.exists(setup_py_location) and not os.path.exists(setup_cfg_location):
797
- raise Exception(f"No setup.py or setup.cfg found in pypi sdist {sdist_location}")
807
+ raise Exception(
808
+ f"No setup.py or setup.cfg found in pypi sdist {sdist_location}")
798
809
 
799
810
  # Some commonon packages like flask may have some dependencies in setup.cfg
800
811
  # and some dependencies in setup.py. We are going to check both.
@@ -5,7 +5,7 @@
5
5
  # ScanCode is a trademark of nexB Inc.
6
6
  # SPDX-License-Identifier: Apache-2.0
7
7
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8
- # See https://github.com/nexB/python-inspector for support or download.
8
+ # See https://github.com/aboutcode-org/python-inspector for support or download.
9
9
  # See https://aboutcode.org for more information about nexB OSS projects.
10
10
  #
11
11
 
@@ -19,7 +19,7 @@ from python_inspector.utils import write_output_in_file
19
19
 
20
20
  TRACE = False
21
21
 
22
- __version__ = "0.11.0"
22
+ __version__ = "0.12.0"
23
23
 
24
24
  DEFAULT_PYTHON_VERSION = "38"
25
25
  PYPI_SIMPLE_URL = "https://pypi.org/simple"
@@ -84,7 +84,8 @@ def print_version(ctx, param, value):
84
84
  metavar="OS",
85
85
  show_default=True,
86
86
  required=True,
87
- help="OS to use for dependency resolution. One of " + ", ".join(utils_pypi.PLATFORMS_BY_OS),
87
+ help="OS to use for dependency resolution. One of " +
88
+ ", ".join(utils_pypi.PLATFORMS_BY_OS),
88
89
  )
89
90
  @click.option(
90
91
  "--index-url",
@@ -228,7 +229,8 @@ def resolve_dependencies(
228
229
  from python_inspector.api import resolve_dependencies as resolver_api
229
230
 
230
231
  if not (json_output or pdt_output):
231
- click.secho("No output file specified. Use --json or --json-pdt.", err=True)
232
+ click.secho(
233
+ "No output file specified. Use --json or --json-pdt.", err=True)
232
234
  ctx.exit(1)
233
235
 
234
236
  if json_output and pdt_output:
@@ -240,12 +242,12 @@ def resolve_dependencies(
240
242
  notice = (
241
243
  "Dependency tree generated with python-inspector.\n"
242
244
  "python-inspector is a free software tool from nexB Inc. and others.\n"
243
- "Visit https://github.com/nexB/python-inspector/ for support and download."
245
+ "Visit https://github.com/aboutcode-org/python-inspector/ for support and download."
244
246
  )
245
247
 
246
248
  headers = dict(
247
249
  tool_name="python-inspector",
248
- tool_homepageurl="https://github.com/nexB/python-inspector",
250
+ tool_homepageurl="https://github.com/aboutcode-org/python-inspector",
249
251
  tool_version=__version__,
250
252
  options=options,
251
253
  notice=notice,
@@ -337,7 +339,8 @@ def get_pretty_options(ctx, generic_paths=False):
337
339
  value = [value]
338
340
 
339
341
  for val in value:
340
- val = get_pretty_value(param_type=param.type, value=val, generic_paths=generic_paths)
342
+ val = get_pretty_value(param_type=param.type,
343
+ value=val, generic_paths=generic_paths)
341
344
 
342
345
  if isinstance(param, click.Argument):
343
346
  args.append(val)
python_inspector/utils.py CHANGED
@@ -5,7 +5,7 @@
5
5
  # ScanCode is a trademark of nexB Inc.
6
6
  # SPDX-License-Identifier: Apache-2.0
7
7
  # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8
- # See https://github.com/nexB/python-inspector for support or download.
8
+ # See https://github.com/aboutcode-org/python-inspector for support or download.
9
9
  # See https://aboutcode.org for more information about nexB OSS projects.
10
10
  #
11
11
 
@@ -102,16 +102,17 @@ TRACE_DEEP = False
102
102
  TRACE_ULTRA_DEEP = False
103
103
 
104
104
  # Supported environments
105
- PYTHON_VERSIONS = "36", "37", "38", "39", "310", "311", "27"
105
+ PYTHON_VERSIONS = "27", "36", "37", "38", "39", "310", "311", "312"
106
106
 
107
107
  PYTHON_DOT_VERSIONS_BY_VER = {
108
+ "27": "2.7",
108
109
  "36": "3.6",
109
110
  "37": "3.7",
110
111
  "38": "3.8",
111
112
  "39": "3.9",
112
113
  "310": "3.10",
113
- "27": "2.7",
114
114
  "311": "3.11",
115
+ "312": "3.12",
115
116
  }
116
117
 
117
118
  valid_python_versions = list(PYTHON_DOT_VERSIONS_BY_VER.keys())
@@ -126,13 +127,14 @@ def get_python_dot_version(version):
126
127
 
127
128
 
128
129
  ABIS_BY_PYTHON_VERSION = {
130
+ "27": ["cp27", "cp27m"],
129
131
  "36": ["cp36", "cp36m", "abi3"],
130
132
  "37": ["cp37", "cp37m", "abi3"],
131
133
  "38": ["cp38", "cp38m", "abi3"],
132
134
  "39": ["cp39", "cp39m", "abi3"],
133
135
  "310": ["cp310", "cp310m", "abi3"],
134
136
  "311": ["cp311", "cp311m", "abi3"],
135
- "27": ["cp27", "cp27m"],
137
+ "312": ["cp312", "cp312m", "abi3"],
136
138
  }
137
139
 
138
140
  PLATFORMS_BY_OS = {
@@ -1,6 +1,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ v0.12.1
5
+ -----------
6
+
7
+ - Update link references of ownership from nexB to aboutcode-org
8
+
9
+
10
+ v0.12.0
11
+ -----------
12
+
13
+ - Add support for Python3.12
14
+
15
+
4
16
  v0.11.0
5
17
  -----------
6
18
 
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-inspector
3
- Version: 0.11.0
3
+ Version: 0.12.1
4
4
  Summary: python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies.
5
- Home-page: https://github.com/nexB/python-inspector
5
+ Home-page: https://github.com/aboutcode-org/python-inspector
6
6
  Author: nexB. Inc. and others
7
7
  Author-email: info@aboutcode.org
8
8
  License: Apache-2.0
@@ -20,35 +20,35 @@ License-File: NOTICE
20
20
  License-File: AUTHORS.rst
21
21
  License-File: CHANGELOG.rst
22
22
  License-File: CODE_OF_CONDUCT.rst
23
- Requires-Dist: attrs !=20.1.0,>=18.1
24
- Requires-Dist: click >7.0
25
- Requires-Dist: colorama >=0.3.9
26
- Requires-Dist: commoncode >=30.0.0
27
- Requires-Dist: dparse2 >=0.7.0
28
- Requires-Dist: importlib-metadata >=4.12.0
29
- Requires-Dist: packageurl-python >=0.9.0
30
- Requires-Dist: pkginfo2 >=30.0.0
31
- Requires-Dist: pip-requirements-parser >=32.0.1
32
- Requires-Dist: requests >=2.18.0
33
- Requires-Dist: resolvelib >=1.0.0
34
- Requires-Dist: saneyaml >=0.5.2
35
- Requires-Dist: toml >=0.10.0
36
- Requires-Dist: mock >=3.0.5
37
- Requires-Dist: packvers >=21.5
23
+ Requires-Dist: attrs!=20.1.0,>=18.1
24
+ Requires-Dist: click>7.0
25
+ Requires-Dist: colorama>=0.3.9
26
+ Requires-Dist: commoncode>=30.0.0
27
+ Requires-Dist: dparse2>=0.7.0
28
+ Requires-Dist: importlib-metadata>=4.12.0
29
+ Requires-Dist: packageurl-python>=0.9.0
30
+ Requires-Dist: pkginfo2>=30.0.0
31
+ Requires-Dist: pip-requirements-parser>=32.0.1
32
+ Requires-Dist: requests>=2.18.0
33
+ Requires-Dist: resolvelib>=1.0.0
34
+ Requires-Dist: saneyaml>=0.5.2
35
+ Requires-Dist: toml>=0.10.0
36
+ Requires-Dist: mock>=3.0.5
37
+ Requires-Dist: packvers>=21.5
38
38
  Provides-Extra: docs
39
- Requires-Dist: Sphinx >=5.0.2 ; extra == 'docs'
40
- Requires-Dist: sphinx-rtd-theme >=1.0.0 ; extra == 'docs'
41
- Requires-Dist: sphinx-reredirects >=0.1.2 ; extra == 'docs'
42
- Requires-Dist: doc8 >=0.11.2 ; extra == 'docs'
39
+ Requires-Dist: Sphinx>=5.0.2; extra == "docs"
40
+ Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
41
+ Requires-Dist: sphinx-reredirects>=0.1.2; extra == "docs"
42
+ Requires-Dist: doc8>=0.11.2; extra == "docs"
43
43
  Provides-Extra: testing
44
- Requires-Dist: pytest !=7.0.0,>=6 ; extra == 'testing'
45
- Requires-Dist: pytest-xdist >=2 ; extra == 'testing'
46
- Requires-Dist: aboutcode-toolkit >=7.0.2 ; extra == 'testing'
47
- Requires-Dist: pycodestyle >=2.8.0 ; extra == 'testing'
48
- Requires-Dist: twine ; extra == 'testing'
49
- Requires-Dist: black ; extra == 'testing'
50
- Requires-Dist: isort ; extra == 'testing'
51
- Requires-Dist: pytest-rerunfailures ; extra == 'testing'
44
+ Requires-Dist: pytest!=7.0.0,>=6; extra == "testing"
45
+ Requires-Dist: pytest-xdist>=2; extra == "testing"
46
+ Requires-Dist: aboutcode-toolkit>=7.0.2; extra == "testing"
47
+ Requires-Dist: pycodestyle>=2.8.0; extra == "testing"
48
+ Requires-Dist: twine; extra == "testing"
49
+ Requires-Dist: black; extra == "testing"
50
+ Requires-Dist: isort; extra == "testing"
51
+ Requires-Dist: pytest-rerunfailures; extra == "testing"
52
52
 
53
53
  python-inspector - inspect Python packages dependencies and metadata
54
54
  =====================================================================
@@ -56,7 +56,7 @@ python-inspector - inspect Python packages dependencies and metadata
56
56
 
57
57
  Copyright (c) nexB Inc. and others.
58
58
  SPDX-License-Identifier: Apache-2.0
59
- Homepage: https://github.com/nexB/python-inspector and https://www.aboutcode.org/
59
+ Homepage: https://github.com/aboutcode-org/python-inspector and https://www.aboutcode.org/
60
60
 
61
61
 
62
62
  ``python-inspector`` is a collection of utilities to:
@@ -88,7 +88,7 @@ Testing
88
88
  pytest -vvs
89
89
 
90
90
  - These are live tests to regenrate the tests with updated data run::
91
-
91
+
92
92
  PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs
93
93
 
94
94
  Usage
@@ -96,7 +96,7 @@ Usage
96
96
 
97
97
  - Install with pip::
98
98
 
99
- pip install git+https://github.com/nexB/python-inspector
99
+ pip install git+https://github.com/aboutcode-org/python-inspector
100
100
 
101
101
  - Run the command line utility with::
102
102
 
@@ -123,5 +123,5 @@ Its companion libraries are:
123
123
  installed site-packages and their metadata formats.
124
124
 
125
125
  - ``packageurl-python`` to use Package URL to reference Python packages
126
-
127
-
126
+
127
+
@@ -1,20 +1,39 @@
1
1
  #
2
+
2
3
  # Copyright (c) nexB Inc. and others.
4
+
3
5
  # SPDX-License-Identifier: Apache-2.0
6
+
4
7
  #
5
- # Visit https://aboutcode.org and https://github.com/nexB/python-inspector
8
+
9
+ # Visit https://aboutcode.org and https://github.com/aboutcode-org/python-inspector
10
+
6
11
  # for support and download.
12
+
7
13
  # ScanCode is a trademark of nexB Inc.
14
+
8
15
  #
16
+
9
17
  # Licensed under the Apache License, Version 2.0 (the "License");
18
+
10
19
  # you may not use this file except in compliance with the License.
20
+
11
21
  # You may obtain a copy of the License at
22
+
12
23
  #
13
- # http://www.apache.org/licenses/LICENSE-2.0
24
+
25
+ # http://www.apache.org/licenses/LICENSE-2.0
26
+
14
27
  #
28
+
15
29
  # Unless required by applicable law or agreed to in writing, software
30
+
16
31
  # distributed under the License is distributed on an "AS IS" BASIS,
32
+
17
33
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34
+
18
35
  # See the License for the specific language governing permissions and
36
+
19
37
  # limitations under the License.
38
+
20
39
  #
@@ -0,0 +1,39 @@
1
+ _packagedcode/__init__.py,sha256=cLQgRA2EjQgdVdz1i_o_pTsQakHBykIv4sMzFXV2Ntg,366
2
+ _packagedcode/models.py,sha256=n2xL9HSLfC0QQwQlH1yzOPZjjHOcfTCJ36E8t45Qxis,48917
3
+ _packagedcode/pypi.py,sha256=jcN4FFTAwpHEvrYXj8KUHSMb1KMiLcxdUlLsg7b4wrs,69526
4
+ _packagedcode/pypi.py.ABOUT,sha256=rqbtXJyYak0Sg-NCM3qDF7-JxCKXN5HEoU-qse_IqKA,551
5
+ _packagedcode/pypi.py.NOTICE,sha256=QtJl8lok4abmslH7UT1UaOPFsuZPwM7hjd58UASQJ7o,1884
6
+ _packagedcode/pypi_setup_py.py,sha256=8uXo28HFZeIQL9cbZZxkk98jrYzgvWKASRgjRi8D3Vo,5785
7
+ _packagedcode/pypi_setup_py.py.ABOUT,sha256=7FLC7R73YDfzEu47fij39PxteCqmojKSexChYZYpQlQ,300
8
+ _packagedcode/pypi_setup_py.py.LICENSE,sha256=EsVAqcPMzlhNkyJ3j6EW_yF02WLs94p0w2igJYrUcxs,1077
9
+ _packagedcode/utils.py,sha256=uxkWaSeZRY69LinSFdVFHirpuyLI4YcvYb2wLztU6T4,6970
10
+ python_inspector/__init__.py,sha256=pGKExHJptu-HGhCyTD2APi6cMBqYYcmib7yRHo1f4lc,398
11
+ python_inspector/api.py,sha256=2e5qKMHUYqW18i_kC7CyzSbKKw0T8oUnBRoN3JyN79o,14688
12
+ python_inspector/cli_utils.py,sha256=LGhxyNtRVds60C5wfCa7all7Ptw5fv6DHhPuNO49mzI,1156
13
+ python_inspector/dependencies.py,sha256=2MYJZSUGokE3zSrOxUUyMfItyDSZ7YgMHgtVC-bglOU,2817
14
+ python_inspector/error.py,sha256=K3kRjIr8AXgSFMyhLa9MerhMfq8MhPKxLvDT6RiWD4M,457
15
+ python_inspector/package_data.py,sha256=r_cbPBb_UQcDmConatkkWVd8XK02WCsrBpsfdOwp3EU,5867
16
+ python_inspector/resolution.py,sha256=8kEPE03KNXfL02RAKCi5h-Jec7xdESDt5sqbFe-mdwA,29609
17
+ python_inspector/resolution.py.ABOUT,sha256=tYLeHLgyo4zZrPlMXlVF59EjC-GGDaQeFKogf7M7rXg,705
18
+ python_inspector/resolution.py.LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
19
+ python_inspector/resolve_cli.py,sha256=_5Dqd8bgrHquOr7tk31hud5vEbHBN4_34CxFdbTq7g0,12118
20
+ python_inspector/setup_py_live_eval.py,sha256=6iFI1u1fusqa_zF2w1V8buZgmLl2dUSZASclwuI551E,7607
21
+ python_inspector/setup_py_live_eval.py.ABOUT,sha256=ecRsdi0Z--mX8gnSwQzE2OqucpmD0AsmPlojp70uPxI,396
22
+ python_inspector/setup_py_live_eval.py.LICENSE,sha256=5wfEqJLf5ANizw20WUURuTgoZOzMRK_4iGA39BApyRk,1643
23
+ python_inspector/utils.py,sha256=kJYyKpyTkNjY-6Kh618ZAvvfCB1--W4XiuwToO0dWWA,2431
24
+ python_inspector/utils_pip_compatibility_tags.py,sha256=oD6elof52LxPF9HOtPXPAi2mZkbqAXjDd1dCeRHI3Q4,6825
25
+ python_inspector/utils_pip_compatibility_tags.py.ABOUT,sha256=v9PEBLLQGH1cJuJU7SeHd7q4b2li3_HOTlvgsQoMuRw,494
26
+ python_inspector/utils_pypi.py,sha256=9PDpKtJygBwI7n7_oLfHUF9weoogN9y2kMoX56kJMoI,57462
27
+ python_inspector/utils_pypi.py.ABOUT,sha256=7s9WCNmS-qJJgHC979fI4whrM5Y41-Ar-LZoIfZXPVU,635
28
+ python_inspector/utils_pypi_supported_tags.py,sha256=SdbIlKoCgyqBZIesEdrFhVMnYikBirvSDvPUPIomTSo,2850
29
+ python_inspector/utils_pypi_supported_tags.py.ABOUT,sha256=ndJ1kQS6u7caYmLc6XVnNIdKfpnvGjKepxpmhQJWJyA,741
30
+ python_inspector-0.12.1.dist-info/AUTHORS.rst,sha256=rRa-_IwbfBl84NqT5QZWFTXHsJnvRz8SP9dymwrEDAE,87
31
+ python_inspector-0.12.1.dist-info/CHANGELOG.rst,sha256=96kjskoJ6vO1svYpZmfMZjIQO6SWcDYq4UN5CcJsUyk,3717
32
+ python_inspector-0.12.1.dist-info/CODE_OF_CONDUCT.rst,sha256=xXDTFpYY3Y7JoxrWADihieUvhGlwJc_oxsbmLJaBvE4,3422
33
+ python_inspector-0.12.1.dist-info/METADATA,sha256=Q4xoVtrDqk1LrTGtBNo-AW83VYIKVygmj-U3i-A2nLs,4252
34
+ python_inspector-0.12.1.dist-info/NOTICE,sha256=yOCrvf_do6vlpp9TAQ57LZn5bp9eB2uQCQ9FnKm8QUM,794
35
+ python_inspector-0.12.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
36
+ python_inspector-0.12.1.dist-info/apache-2.0.LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
37
+ python_inspector-0.12.1.dist-info/entry_points.txt,sha256=2s9F95rPWbgz3cOnKN3Z7PwzglPt2EsX2qf7W0Xubpk,87
38
+ python_inspector-0.12.1.dist-info/top_level.txt,sha256=C-KAHTL8C6jd7QULvFk83YjOBVxDrnyefG3RikRHRlw,31
39
+ python_inspector-0.12.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (72.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,39 +0,0 @@
1
- _packagedcode/__init__.py,sha256=c7O1kuxsgVV7MgK0EvVffZtquexe78dQRTPcMP2UiDs,357
2
- _packagedcode/models.py,sha256=mp7x92CG6_tet7URuNvdXzmEZeOi8FXVbPBYGKhFqgg,48912
3
- _packagedcode/pypi.py,sha256=hK89jjlowXs2xtJzGcujqd7xCkyVhEC4uMwbzzF5icA,69518
4
- _packagedcode/pypi.py.ABOUT,sha256=rqbtXJyYak0Sg-NCM3qDF7-JxCKXN5HEoU-qse_IqKA,551
5
- _packagedcode/pypi.py.NOTICE,sha256=QtJl8lok4abmslH7UT1UaOPFsuZPwM7hjd58UASQJ7o,1884
6
- _packagedcode/pypi_setup_py.py,sha256=IeFskjV4z4SOk4-GmHXoktMqOSXMdECpsflocacPgjw,5742
7
- _packagedcode/pypi_setup_py.py.ABOUT,sha256=7FLC7R73YDfzEu47fij39PxteCqmojKSexChYZYpQlQ,300
8
- _packagedcode/pypi_setup_py.py.LICENSE,sha256=EsVAqcPMzlhNkyJ3j6EW_yF02WLs94p0w2igJYrUcxs,1077
9
- _packagedcode/utils.py,sha256=ibgl7lQLUFuC09Go9mSY4D455W4AvagaJ_kg1EO9eXo,6949
10
- python_inspector/__init__.py,sha256=-WeiNn9hvD3sGqwxrZQr0by1J7oo5QDPDAMe_cT5okQ,389
11
- python_inspector/api.py,sha256=u95X6NvnhcsqWpDkTXY01S38Nh50bQWRL0flyZrqZic,14491
12
- python_inspector/cli_utils.py,sha256=SDc-L5P_QWcEyRPYe_VMTU_9biirGbvHBX45tj2t5WI,1131
13
- python_inspector/dependencies.py,sha256=2MYJZSUGokE3zSrOxUUyMfItyDSZ7YgMHgtVC-bglOU,2817
14
- python_inspector/error.py,sha256=WvTR5JTjziD42hxKftedb-pe2LUWWTsagW66gT3rtBo,448
15
- python_inspector/package_data.py,sha256=kCKHlc8yX25jdNBMvtn4fiw99YTs57DMQow8uwFW3jU,5849
16
- python_inspector/resolution.py,sha256=Q-UoLg7gDT-YJw2zvVWOas5iS5kuNXyhH-I71jhiCss,29356
17
- python_inspector/resolution.py.ABOUT,sha256=tYLeHLgyo4zZrPlMXlVF59EjC-GGDaQeFKogf7M7rXg,705
18
- python_inspector/resolution.py.LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
19
- python_inspector/resolve_cli.py,sha256=BIQWIh9Rw8C238Zst5PRqRXVtmMp6g_MYfnpSywx18E,12039
20
- python_inspector/setup_py_live_eval.py,sha256=6iFI1u1fusqa_zF2w1V8buZgmLl2dUSZASclwuI551E,7607
21
- python_inspector/setup_py_live_eval.py.ABOUT,sha256=ecRsdi0Z--mX8gnSwQzE2OqucpmD0AsmPlojp70uPxI,396
22
- python_inspector/setup_py_live_eval.py.LICENSE,sha256=5wfEqJLf5ANizw20WUURuTgoZOzMRK_4iGA39BApyRk,1643
23
- python_inspector/utils.py,sha256=czDA_6lmXrX3PzY222xUTrUDYmfN_uWmNPMjTRc8OuE,2422
24
- python_inspector/utils_pip_compatibility_tags.py,sha256=oD6elof52LxPF9HOtPXPAi2mZkbqAXjDd1dCeRHI3Q4,6825
25
- python_inspector/utils_pip_compatibility_tags.py.ABOUT,sha256=v9PEBLLQGH1cJuJU7SeHd7q4b2li3_HOTlvgsQoMuRw,494
26
- python_inspector/utils_pypi.py,sha256=PQc0iBANiH6ayVOjSt6CQ9w1K8hpCFhPb5TgYW5DBjQ,57396
27
- python_inspector/utils_pypi.py.ABOUT,sha256=7s9WCNmS-qJJgHC979fI4whrM5Y41-Ar-LZoIfZXPVU,635
28
- python_inspector/utils_pypi_supported_tags.py,sha256=SdbIlKoCgyqBZIesEdrFhVMnYikBirvSDvPUPIomTSo,2850
29
- python_inspector/utils_pypi_supported_tags.py.ABOUT,sha256=ndJ1kQS6u7caYmLc6XVnNIdKfpnvGjKepxpmhQJWJyA,741
30
- python_inspector-0.11.0.dist-info/AUTHORS.rst,sha256=rRa-_IwbfBl84NqT5QZWFTXHsJnvRz8SP9dymwrEDAE,87
31
- python_inspector-0.11.0.dist-info/CHANGELOG.rst,sha256=Yu6byIbO5yqNmN_U8hVl6wwN6kSiEyJMfoaECX5w_ow,3577
32
- python_inspector-0.11.0.dist-info/CODE_OF_CONDUCT.rst,sha256=xXDTFpYY3Y7JoxrWADihieUvhGlwJc_oxsbmLJaBvE4,3422
33
- python_inspector-0.11.0.dist-info/METADATA,sha256=nAF_s-24NA-BpH8nxj-uczlC6VkClXET0Cv93REibnU,4264
34
- python_inspector-0.11.0.dist-info/NOTICE,sha256=uEf5AAY7zIAS_ILkcEjEJ0Wt6wYWyU9d6FGPiAlpig4,770
35
- python_inspector-0.11.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
36
- python_inspector-0.11.0.dist-info/apache-2.0.LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
37
- python_inspector-0.11.0.dist-info/entry_points.txt,sha256=2s9F95rPWbgz3cOnKN3Z7PwzglPt2EsX2qf7W0Xubpk,87
38
- python_inspector-0.11.0.dist-info/top_level.txt,sha256=C-KAHTL8C6jd7QULvFk83YjOBVxDrnyefG3RikRHRlw,31
39
- python_inspector-0.11.0.dist-info/RECORD,,