Skip to content

Conversation

@Hzfengsy
Copy link
Member

  • Set Python minimal version to 3.9 as Python 3.8 has reached end of life
  • Update AST handling to match Python 3.9+ API changes
  • Fix deprecation warning: "Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15"
  • Update TVMScript parser components to use modern AST interfaces
  • Adjust linting and test infrastructure for Python 3.9+ compatibility

@Hzfengsy Hzfengsy requested a review from Copilot June 20, 2025 06:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR bumps the minimal Python version to 3.9 and updates the AST handling to align with changes in Python 3.9+ while removing legacy compatibility branches. Key changes include:

  • Updating conditionals and error messages in various scripts and test files for Python 3.9+.
  • Removing legacy AST helper functionality and adjusting context assignments in AST node processing.
  • Simplifying Windows DLL directory setup in light of updated version requirements.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/scripts/ci.py Removed legacy Python 3.8 branches in AST helper functions.
tests/python/relax/test_tvmscript_parser.py Removed outdated skipif decorators for Python versions below 3.8.
tests/lint/filter_untracked.py Removed Python 2 compatibility branch.
python/tvm/script/parser/tir/parser.py Updated AST node context creation to use parameterless doc.Load/Store.
python/tvm/script/parser/core/evaluator.py Adjusted type-checking to match new API naming conventions.
python/tvm/script/parser/core/doc.py Removed legacy registration functions now unnecessary for 3.9+.
python/tvm/base.py Updated Python version check and modified Windows DLL directory logic.
Comments suppressed due to low confidence (3)

python/tvm/script/parser/tir/parser.py:286

  • Review the removal of positional arguments in doc.Load() calls to ensure that no critical diagnostic context is lost for downstream AST processing.
    node.target.ctx = doc.Load()

python/tvm/base.py:42

  • Since the DLL search path logic is now applied unconditionally on Windows, please confirm that this change aligns with the intended behavior for Python 3.9+ environments.
    if sys.platform.startswith("win32"):

python/tvm/script/parser/core/doc.py:321

  • Legacy AST registration functions have been removed; verify that downstream modules no longer depend on any of these removed handlers.
_register_default()

- Set Python minimal version to 3.9 as Python 3.8 has reached end of life
- Update AST handling to match Python 3.9+ API changes
- Fix deprecation warning: "Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15"
- Update TVMScript parser components to use modern AST interfaces
- Adjust linting and test infrastructure for Python 3.9+ compatibility
@Hzfengsy
Copy link
Member Author

cc @tqchen

@tqchen tqchen merged commit 795fc32 into apache:main Jun 23, 2025
13 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
…ity (apache#18086)

- Set Python minimal version to 3.9 as Python 3.8 has reached end of life
- Update AST handling to match Python 3.9+ API changes
- Fix deprecation warning: "Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15"
- Update TVMScript parser components to use modern AST interfaces
- Adjust linting and test infrastructure for Python 3.9+ compatibility
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.

2 participants