Closed
Bug 1851580
Opened 9 months ago
Closed 9 months ago
ImportError: cannot import name 'SafeConfigParser' from 'configparser' with python 3.12
Categories
(Testing :: Mozbase, defect)
Tracking
(firefox-esr115 fixed, firefox119 fixed)
RESOLVED
FIXED
119 Branch
People
(Reporter: bbhtt.zn0i8, Assigned: jcristau)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0
Steps to reproduce:
Trying to run mozregression on Fedora 39 beta python 3.12 installed via pip shows the following error:
$ mozregression --good 2023-09-03 --bad 2023-09-04
Traceback (most recent call last):
File "/home/wirt/.local/bin/mozregression", line 5, in <module>
from mozregression.main import main
File "/home/wirt/.local/lib/python3.12/site-packages/mozregression/main.py", line 22, in <module>
from mozregression.cli import cli
File "/home/wirt/.local/lib/python3.12/site-packages/mozregression/cli.py", line 17, in <module>
import mozprofile
File "/home/wirt/.local/lib/python3.12/site-packages/mozprofile/__init__.py", line 15, in <module>
from mozprofile.cli import *
File "/home/wirt/.local/lib/python3.12/site-packages/mozprofile/cli.py", line 16, in <module>
from .prefs import Preferences
File "/home/wirt/.local/lib/python3.12/site-packages/mozprofile/prefs.py", line 15, in <module>
from six.moves.configparser import SafeConfigParser as ConfigParser
ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/usr/lib64/python3.12/configparser.py). Did you mean: 'RawConfigParser'?
mozregression --version
5.8.0
Actual results:
Error
Expected results:
No error
The fix is to import it directly SafeConfigParser -> configparser in prefs.py I think
Assignee | ||
Updated•9 months ago
|
Component: mozregression → Mozbase
Assignee | ||
Comment 3•9 months ago
|
||
Updated•9 months ago
|
Assignee: nobody → jcristau
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by jcristau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0315c2d875ca mozprofile: update for python 3.12 compatibility. r=gbrown
Comment 5•9 months ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
status-firefox119:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Comment 6•4 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D187541
Updated•4 months ago
|
Attachment #9377308 -
Flags: approval-mozilla-esr115?
Updated•4 months ago
|
Blocks: python3.12
Updated•4 months ago
|
Attachment #9377308 -
Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
Updated•4 months ago
|
status-firefox-esr115:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•