Skip to content

Fix Python ecosystem PyPI-to-import name mismatch and code review follow-ups#243

Open
tmihalac wants to merge 3 commits into
RHEcosystemAppEng:mainfrom
tmihalac:fix-python
Open

Fix Python ecosystem PyPI-to-import name mismatch and code review follow-ups#243
tmihalac wants to merge 3 commits into
RHEcosystemAppEng:mainfrom
tmihalac:fix-python

Conversation

@tmihalac
Copy link
Copy Markdown

Python name normalization:

  • Add _resolve_tree_key in CCA to fall back to is_same_package for tree lookups
  • Re-key dep tree from PyPI names to import names via _find_module_dirs/top_level.txt
  • Add PEP 503 is_same_package override in PythonLanguageFunctionsParser
  • Wire dependency builder into parser via lang_functions_parsers_factory
  • Use parser is_same_package in FL _is_package_available instead of inline lambda
  • Use PEP 503 re.sub(r'[-.]', '-') for root dep matching instead of replace('-', '')
  • Replace pip install with uv pip install for deptree setup

CCA query parsing:

  • Fix dotted function name splitting with rpartition instead of split
  • Fix __determine_doc_package_name to use _resolve_tree_key with fallback

JavaScript parser:

  • Guard is_function check before get_function_name in search_for_called_function

tmihalac added 2 commits May 31, 2026 22:01
…low-ups

  Python name normalization:
  - Add _resolve_tree_key in CCA to fall back to is_same_package for tree
  lookups
  - Re-key dep tree from PyPI names to import names via
  _find_module_dirs/top_level.txt
  - Add PEP 503 is_same_package override in PythonLanguageFunctionsParser
  - Wire dependency builder into parser via lang_functions_parsers_factory
  - Use parser is_same_package in FL _is_package_available instead of inline
  lambda
  - Use PEP 503 re.sub(r'[-_.]', '-') for root dep matching instead of
  replace('-', '_')
  - Replace pip install with uv pip install for deptree setup

  CCA query parsing:
  - Fix dotted function name splitting with rpartition instead of split
  - Fix __determine_doc_package_name to use _resolve_tree_key with fallback

  JavaScript parser:
  - Guard is_function check before get_function_name in
  search_for_called_function

Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
@tmihalac
Copy link
Copy Markdown
Author

/test vulnerability-analysis-on-pr

Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant