Skip to content

Allow python3.12#124

Draft
garyservin wants to merge 1 commit intomasterfrom
allow-python3.12
Draft

Allow python3.12#124
garyservin wants to merge 1 commit intomasterfrom
allow-python3.12

Conversation

@garyservin
Copy link
Copy Markdown
Contributor

Without these fixes, we get

Traceback (most recent call last):
  File "/usr/local/bin/catkin", line 5, in <module>
    from catkin_tools.commands.catkin import main
  File "/opt/locusrobotics/virtualenv/catkin-tools/lib/python3.12/site-packages/catkin_tools/commands/catkin.py", line 21, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

when trying to run on noble. These changes seem to work fine on jammy as well

Copy link
Copy Markdown

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 updates the virtualenv bootstrap and pinned Python dependencies to support Python 3.12 environments (e.g., Ubuntu Noble) where pkg_resources is no longer available by default.

Changes:

  • Update venv.py preinstall bootstrap packages (pip/pip-tools) and add setuptools so pkg_resources is present.
  • Refresh pinned transitive dependencies in requirements.txt to newer versions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
catkin_virtualenv/src/catkin_virtualenv/venv.py Updates bootstrap packages installed into newly created virtualenvs to work on Python 3.12.
catkin_virtualenv/requirements.txt Updates pinned dependency set intended to be installed/redistributed with the package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 67 to 71
preinstall = [
"pip==24.0",
"pip-tools==7.4.1",
"pip==26.0.1",
"pip-tools==7.5.3",
"setuptools==82.0.0",
]
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

preinstall now includes a strict setuptools==82.0.0 pin, but the non-builtin-venv path later appends setuptools>=44,<45 for Python 2 compatibility. If that branch is hit, pip will see conflicting setuptools requirements and fail the install. Consider only pinning setuptools==… for the builtin venv (Python 3) path, and leaving the <45 constraint for the legacy virtualenv/Python2 path (or gate the pin by Python major version).

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
catkin-pkg==1.1.0 # via -r requirements.in, rospkg
distro==1.9.0 # via rospkg
docutils==0.20.1 # via catkin-pkg
docutils==0.22.4 # via catkin-pkg
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

requirements.in still includes wheel==0.45.1 (catkin_virtualenv/requirements.in:5), but wheel is no longer present in the compiled requirements.txt. This makes the lock file inconsistent with its input and may drop an explicitly required dependency; please re-run the lock generation (pip-compile) so requirements.txt reflects requirements.in (or remove wheel from requirements.in if it’s no longer intended).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants