Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: bloom-release fails to run on humble because of mac_ver #722

Closed
Ryanf55 opened this issue Jan 17, 2024 · 2 comments
Closed

BUG: bloom-release fails to run on humble because of mac_ver #722

Ryanf55 opened this issue Jan 17, 2024 · 2 comments

Comments

@Ryanf55
Copy link

Ryanf55 commented Jan 17, 2024

Problem description

bloom-release is unable to run on ubuntu 22.04. I just did an apt update && apt upgrade today.

Demo

Trying to release a package on humble

$ bloom-release --rosdistro humble ament_lint
/usr/bin/bloom-release:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import load_entry_point
Traceback (most recent call last):
  File "/usr/bin/bloom-release", line 11, in <module>
    load_entry_point('bloom==0.11.2', 'console_scripts', 'bloom-release')()
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 536, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2928, in load_entry_point
    return ep.load()
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2516, in load
    return self.resolve()
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2522, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/bloom/commands/__init__.py", line 42, in <module>
    from bloom.commands.update import start_updater
  File "/usr/lib/python3/dist-packages/bloom/commands/update.py", line 49, in <module>
    from bloom.logging import warning
  File "/usr/lib/python3/dist-packages/bloom/logging.py", line 63, in <module>
    _is_mac_lion_or_greater = parse_version(mac_ver()[0]) >= parse_version('10.7.0')
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/version.py", line 198, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ''

Testing --help

$ bloom-release --help
/usr/bin/bloom-release:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import load_entry_point
Traceback (most recent call last):
  File "/usr/bin/bloom-release", line 11, in <module>
    load_entry_point('bloom==0.11.2', 'console_scripts', 'bloom-release')()
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 536, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2928, in load_entry_point
    return ep.load()
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2516, in load
    return self.resolve()
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2522, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/bloom/commands/__init__.py", line 42, in <module>
    from bloom.commands.update import start_updater
  File "/usr/lib/python3/dist-packages/bloom/commands/update.py", line 49, in <module>
    from bloom.logging import warning
  File "/usr/lib/python3/dist-packages/bloom/logging.py", line 63, in <module>
    _is_mac_lion_or_greater = parse_version(mac_ver()[0]) >= parse_version('10.7.0')
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/version.py", line 198, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ''

Testing the failed function

$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import mac_ver
>>> mac_ver()
('', ('', '', ''), '')
>>> from pkg_resources import parse_version
<stdin>:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
>>> parse_version(mac_ver()[0])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/friedman/.local/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/version.py", line 198, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: ''

python3-bloom version

$ sudo apt info python3-bloom
[sudo] password for friedman: 
Package: python3-bloom
Version: 0.11.2-100
Priority: optional
Section: python
Maintainer: William Woodall <william@openrobotics.org>
Installed-Size: 527 kB
Depends: python3:any (>= 3.4~), python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.8.0), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3)
Conflicts: python-bloom
Homepage: http://www.ros.org/wiki/bloom
Download-Size: 69.0 kB
APT-Manual-Installed: yes
APT-Sources: http://packages.ros.org/ros2/ubuntu jammy/main amd64 Packages
Description: Bloom is a release automation tool.
 Bloom provides tools for releasing software on top of a git repository and leverages tools and patterns from git-buildpackage. Additionally, bloom leverages meta and build information from catkin (https://github.com/ros/catkin) to automate release branching and the generation of platform specific source packages, like debian's src-debs.

N: There is 1 additional record. Please use the '-a' switch to see it
@tfoote
Copy link
Member

tfoote commented Jan 17, 2024

This looks like a duplicate of #693 Can you confirm? It should be fixed on master

@Ryanf55
Copy link
Author

Ryanf55 commented Jan 17, 2024

This looks like a duplicate of #693 Can you confirm? It should be fixed on master

Confirmed! Master does not have this issue. I'll run with a local version till that makes it into jammy binaries.

@Ryanf55 Ryanf55 closed this as completed Jan 17, 2024
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

No branches or pull requests

2 participants