If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Restrict the python interpreter version to install mozregression

RESOLVED FIXED

Status

Testing
mozregression
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: parkouss, Assigned: parkouss)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Since patches for Bug 1095032 are merged in, we may had to require an optionnal dependency 'argparse' for python < 2.7 for mozregression.

I tested it with python 2.6, but it appears that it does not work even with argparse because of mozlog.structured (required at least by the direct dependency mozversion):

$ mozversion -h
Traceback (most recent call last):
  File "/home/jp/dev/mozregression/venv2.6/bin/mozversion", line 9, in <module>
    load_entry_point('mozversion==1.0', 'console_scripts', 'mozversion')()
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/pkg_resources.py", line 2431, in load_entry_point
    return ep.load()
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/pkg_resources.py", line 2147, in load
    ['__name__'])
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozversion/__init__.py", line 6, in <module>
    from .mozversion import cli, get_version
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozversion/mozversion.py", line 15, in <module>
    import mozdevice
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozdevice/__init__.py", line 7, in <module>
    from devicemanager import DeviceManager, DMError, ZeroconfListener
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozdevice/devicemanager.py", line 6, in <module>
    import mozlog
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozlog/__init__.py", line 19, in <module>
    import structured
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozlog/structured/__init__.py", line 5, in <module>
    import commandline
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozlog/structured/commandline.py", line 9, in <module>
    from structuredlog import StructuredLogger, set_default_logger
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozlog/structured/structuredlog.py", line 14, in <module>
    from logtypes import Unicode, TestId, Status, SubStatus, Dict, List, Int, Any
  File "/home/jp/dev/mozregression/venv2.6/lib/python2.6/site-packages/mozlog/structured/logtypes.py", line 97
    known_kwargs = {name: value for name, value in kwargs.iteritems()
                                  ^
SyntaxError: invalid syntax

But install is OK, it is only at runtime that it fails with this hudge stack.

Since we know that mozregression does not works currently with python 3, let's add a test to install it only for python >= 2.7 and < 3.

Also, maybe we can fill a bug to do the same kind of thing for mozlog ?
(Assignee)

Comment 1

3 years ago
Created attachment 8519381 [details] [review]
restrict the python interpreter version

I tested the patch against python 2.6, 2.7 and 3.4:

$ python3.4 setup.py develop
mozregression currently require python >=2.7 and <3.
Attachment #8519381 - Flags: review?(wlachance)
Comment on attachment 8519381 [details] [review]
restrict the python interpreter version

Makes sense, ty!
Attachment #8519381 - Flags: review?(wlachance) → review+
Merged https://github.com/mozilla/mozregression/pull/129#event-190873357
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.