Skip to content

Declare packaging runtime dependency#43

Closed
glenn-jocher wants to merge 1 commit into
mainfrom
sync-upstream-packaging-dependency
Closed

Declare packaging runtime dependency#43
glenn-jocher wants to merge 1 commit into
mainfrom
sync-upstream-packaging-dependency

Conversation

@glenn-jocher
Copy link
Copy Markdown
Member

@glenn-jocher glenn-jocher commented Apr 23, 2026

Summary

Upstream scan

Compared ultralytics/CLIP against openai/CLIP on main:

  • dcba3cb replaces pkg_resources.packaging with packaging.version; the fork already has the code change, but was missing the declared runtime dependency. This PR adds it.
  • ded190a updates upstream setup.py; not applicable because the fork has moved packaging metadata to pyproject.toml and no longer has setup.py.
  • d05afc4 pins upstream .github/workflows/test.yml actions; not applicable directly because the fork replaced that workflow with its own ci.yml/Ultralytics Actions workflows.

Validation

  • Parsed pyproject.toml and asserted packaging is declared
  • python -m compileall -q clip tests
  • python - <<'PY' import smoke for clip.available_models()
  • git diff --check

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

➕ This PR adds the packaging dependency to ultralytics/CLIP so the project can reliably handle PyTorch version compatibility checks.

📊 Key Changes

  • Added packaging to pyproject.toml dependencies.
  • Documented its purpose inline as being used for version parsing in PyTorch compatibility checks.
  • No model, training, or inference logic was changed—this is a dependency and environment-management update only.

🎯 Purpose & Impact

  • Improves dependency reliability by ensuring version comparisons use a proper, standard library 🛠️
  • Helps prevent runtime issues related to PyTorch version detection or compatibility handling ✅
  • Makes installations more robust across different environments and setups 📦
  • Low-risk change for users, with the main effect being better stability behind the scenes rather than visible feature changes 🙂

@UltralyticsAssistant UltralyticsAssistant added dependencies Dependencies and packages fixed Bug has been resolved priority: low Low urgency; can wait behind higher-priority work. labels Apr 23, 2026
@UltralyticsAssistant
Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/CLIP 🚀 PR! This is an automated message to help streamline review, and an engineer will assist you shortly. Please review the checklist below for a smooth integration 😊

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/CLIP main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

Copy link
Copy Markdown
Member

@UltralyticsAssistant UltralyticsAssistant left a comment

Choose a reason for hiding this comment

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

🔍 PR Review

Made with ❤️ by Ultralytics Actions

The change looks clean and appropriately scoped. Adding packaging to runtime dependencies matches the stated purpose of preventing missing-import failures during version parsing, and I don't see any genuine issues in the provided diff.

@glenn-jocher
Copy link
Copy Markdown
Member Author

Closing per maintainer direction: keep the AGPL-3.0 license unchanged and do not reintroduce packaging as a declared dependency since it was omitted during the fork's pyproject migration.

@glenn-jocher glenn-jocher deleted the sync-upstream-packaging-dependency branch April 23, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependencies and packages fixed Bug has been resolved priority: low Low urgency; can wait behind higher-priority work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants