[SRU] xx-svn-review crashed with ModuleNotFoundError

Bug #2061637 reported by Sudip Mukherjee
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xxdiff (Debian)
Fix Released
Unknown
xxdiff (Ubuntu)
Fix Released
Medium
Unassigned
Jammy
Confirmed
Undecided
Unassigned
Mantic
Confirmed
Undecided
Unassigned
Noble
Confirmed
Undecided
Unassigned

Bug Description

[ Impact ]

xx-svn-review will crash immediately on execution with the error:

$ xx-svn-review
Traceback (most recent call last):
  File "/usr/bin/xx-svn-review", line 7, in <module>
    from StringIO import StringIO
ModuleNotFoundError: No module named 'StringIO'

[ Test Plan ]

sudo apt install subversion xxdiff-scripts
mkdir -p $HOME/.svnrepos/
svnadmin create ~/.svnrepos/MyRepo
svn mkdir -m "Create directory structure." \
  file://$HOME/.svnrepos/MyRepo/trunk \
  file://$HOME/.svnrepos/MyRepo/branches \
  file://$HOME/.svnrepos/MyRepo/tags
mkdir $HOME/test
cd $HOME/test
echo "test 1" > testfile
svn checkout file://$HOME/.svnrepos/MyRepo/trunk ./
svn add --force ./
svn commit -m "Initial import."
svn update
echo "test 2" > testfile
xx-svn-diff

If the package is not fixed it will result in the above error.
With the fixed package the xx-svn-diff window will be displayed with the diff.

[ Where problems could occur ]

The only change in the code is in the module import and imports StringIO from io for Python3. And as such there is very small chance of regression due to this.

[ Other Info ]

It has been already fixed in Debian and Oracular will get the fixed package via sync.

[ Original Bug Description ]

xx-svn-review fails to run with the error:

$ xx-svn-review
Traceback (most recent call last):
  File "/usr/bin/xx-svn-review", line 7, in <module>
    from StringIO import StringIO
ModuleNotFoundError: No module named 'StringIO'

ProblemType: Crash
DistroRelease: Ubuntu 24.04
Package: xxdiff-scripts 1:5.1+git20220924+dfsg-1build3
ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1
Uname: Linux 6.8.0-22-generic x86_64
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 15 20:00:46 2024
ExecutablePath: /usr/bin/xx-svn-review
InstallationDate: Installed on 2024-04-10 (5 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240410)
InterpreterPath: /usr/bin/python3.12
JournalErrors: -- No entries --
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/xx-svn-review
Python3Details: /usr/bin/python3.12, Python 3.12.2, python3-minimal, 3.12.2-0ubuntu2
PythonArgs: ['/usr/bin/xx-svn-review']
PythonDetails: N/A
SourcePackage: xxdiff
Title: xx-svn-review crashed with ModuleNotFoundError in __main__: No module named 'StringIO'
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/xx-svn-review", line 7, in <module>
     from StringIO import StringIO
 ModuleNotFoundError: No module named 'StringIO'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sudo users

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :
information type: Private → Public
Changed in xxdiff (Debian):
status: Unknown → New
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Issue also seen on Jammy and Mantic apart from Noble.

tags: added: jammy mantic
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote (last edit ):

debdiff attached for Noble.
Will attach other after Noble is fixed.

Changed in xxdiff (Ubuntu):
status: New → Confirmed
Changed in xxdiff (Debian):
status: New → Fix Released
tags: removed: need-duplicate-check
Changed in xxdiff (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Paride Legovini (paride) wrote :

This is Fix Released in Debian, we need to sync the new package to Oracular once development opens, and then consider SRUing.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff attached for Noble.

summary: - xx-svn-review crashed with ModuleNotFoundError in Noble
+ [SRU] xx-svn-review crashed with ModuleNotFoundError
description: updated
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Mantic

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Jammy

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I have also pushed the changes to a ppa at https://launchpad.net/~sudipmuk/+archive/ubuntu/test-ppa

Revision history for this message
Dave Jones (waveform) wrote :

Sync to oracular is now done so I'll mark this Fix Released, and target to the affected series

Changed in xxdiff (Ubuntu):
status: Confirmed → Fix Released
Changed in xxdiff (Ubuntu Noble):
status: New → Confirmed
Changed in xxdiff (Ubuntu Mantic):
status: New → Confirmed
Changed in xxdiff (Ubuntu Jammy):
status: New → Confirmed
Revision history for this message
Dave Jones (waveform) wrote :

Reviewing the patches, they mostly look fine but I'm a bit confused as to why the version numbering goes from a ubuntu0.24.04.1 suffix in the noble patch, to a ubuntu0.1 suffix in the mantic patch (noting that both have the same base version, 1:5.1+git20220924+dfsg-1). Obviously that'll still work (0.1 < 0.24.04.1), it's just ... odd?

I've sponsored the noble upload now, but just wanted to check if the version numbers are as intended or if you wanted to revise the mantic/jammy ones first? (I'm happy to revise them on upload if you want -- it's a trivial change after all)

Revision history for this message
Thomas Ward (teward) wrote (last edit ):

waveform: In order to be valid each release needs to have a higher version. Especially if its the same version then it has to have 0.ubuntuXX.YY.Z if 0 is the base. Otherwise it affects upgrading if we have the same version in multiple releases.

Revision history for this message
Dave Jones (waveform) wrote :

@teward -- yes, I'm aware of the requirement that each release needs a higher version, and the versions proposed in the patches do conform to this requirement. It just seems a bit odd that the mantic patch proposes a 0.1 suffix while the noble patch proposes a 0.24.04.1 suffix. Could/should the mantic patch not propose a 0.23.10.1 suffix?

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Updated debdiff for Mantic.

I believe it was technically not incorrect, but I can think of a future problem in other packages if I follow 0.1. So, I will now follow the usual versioning.

Revision history for this message
Simon Chopin (schopin) wrote :

Hi Sudip,

I've uploaded the Mantic and Jammy packages to the SRU queue. Thanks for your work :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.