Skip to content

Modernize scripts to Python 3 and add recent distribution releases#2

Open
Vai-Man wants to merge 2 commits intoosrf:masterfrom
Vai-Man:master
Open

Modernize scripts to Python 3 and add recent distribution releases#2
Vai-Man wants to merge 2 commits intoosrf:masterfrom
Vai-Man:master

Conversation

@Vai-Man
Copy link

@Vai-Man Vai-Man commented Feb 19, 2026

This PR modernizes the codebase for Python 3 compatibility and updates distro lists with recent releases.

Updates

  • Python 3 Modernization:

    • Updated shebangs to #!/usr/bin/env python3 in analyze_awstats.py and analyze_edits.py
    • Fixed deprecated urllib.unquote() by importing from urllib.parse
    • All scripts now fully compatible with Python 3
  • Updated Distribution Lists:

    • Added Ubuntu releases: jammy, kinetic, lunar, mantic, noble
    • Added Debian releases: bookworm, trixie
    • Added ROS 2 releases: iron, jazzy

Copilot AI review requested due to automatic review settings February 19, 2026 15:22
Copy link

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 modernizes the Python scripts for Python 3 compatibility and updates distribution lists to include recent Ubuntu, Debian, and ROS 2 releases. The changes ensure the scripts can process download statistics for newer platform releases.

Changes:

  • Updated shebangs from python to python3 in analyze_awstats.py and analyze_edits.py
  • Migrated from deprecated urllib.unquote() to urllib.parse.unquote() for Python 3 compatibility
  • Added 9 new Ubuntu releases (groovy through noble), 2 Debian releases (bookworm, trixie), and 2 ROS 2 releases (iron, jazzy)

Reviewed changes

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

File Description
scripts/analyze_edits.py Updated shebang to python3
scripts/analyze_awstats.py Updated shebang to python3, migrated urllib import, and expanded distro lists with recent releases

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

Comment on lines 7 to 11
UBUNTU_DISTROS = ['precise', 'quantal', 'raring', 'saucy', 'trusty', 'utopic', 'vivid', 'wily', 'xenial', 'yakkety', 'zesty', 'artful', 'bionic', 'cosmic', 'disco', 'eoan', 'focal', 'groovy', 'hirsute', 'impish', 'jammy', 'kinetic', 'lunar', 'mantic', 'noble']
DEBIAN_DISTROS = ['jessie', 'stretch', 'buster', 'bullseye', 'bookworm', 'trixie']
OS_DISTROS = UBUNTU_DISTROS + DEBIAN_DISTROS
ARCHES = ['i386', 'amd64', 'armhf', 'arm64', 'source']
ROS1_DISTROS = ['boxturtle', 'cturtle', 'diamondback', 'electric', 'fuerte', 'groovy', 'hydro', 'indigo', 'jade', 'kinetic', 'lunar', 'melodic', 'noetic']
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The newly added Ubuntu releases 'groovy', 'kinetic', and 'lunar' create naming conflicts with existing ROS1 distros that have the same names (line 11). The get_distro_from_url function (line 60-65) uses a simple substring match (if distro in url) to identify OS distros, which could cause incorrect identification when these conflicting names appear in URLs. This could lead to misattribution of download statistics. Consider whether these Ubuntu releases should be excluded from the list, or if get_distro_from_url needs to be updated to use more precise matching logic to differentiate between OS and ROS distros.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

fixed!

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