Project

General

Profile

Bug #24816

test_ceph_argparse.py broken on py3-only system

Added by Nathan Cutler about 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
07/06/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

143/154 Test #146: test_ceph_argparse.py ...................***Failed    0.89 sec
E
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'StringIO')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3.6/site-packages/nose/loader.py", line 417, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/smithfarm/src/ceph/smithfarm/ceph/src/test/pybind/test_ceph_argparse.py", line 27, in <module>
    from StringIO import StringIO
ModuleNotFoundError: No module named 'StringIO'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

This issue could be fixed with:

try:
    from StringIO import StringIO
except ImportError:
    from io import StringIO

Related issues

Copied to Ceph - Backport #24824: luminous: test_ceph_argparse.py broken on py3-only system Resolved
Copied to Ceph - Backport #24825: mimic: test_ceph_argparse.py broken on py3-only system Resolved

History

#1 Updated by Nathan Cutler about 1 year ago

  • Subject changed from Unit tests requiring python2 to test_ceph_argparse.py broken on py3-only system
  • Description updated (diff)
  • Status changed from New to Need Review

#2 Updated by Nathan Cutler about 1 year ago

  • Backport set to mimic,luminous

#3 Updated by Nathan Cutler about 1 year ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #24824: luminous: test_ceph_argparse.py broken on py3-only system added

#5 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #24825: mimic: test_ceph_argparse.py broken on py3-only system added

#6 Updated by Nathan Cutler 11 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF