Closed Bug 916124 Opened 11 years ago Closed 11 years ago

JSBridge incompatibility with Mac OS X 10.6: iterencode() takes exactly 2 arguments (3 given)

Categories

(Testing Graveyard :: Mozmill, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Keywords: regression, Whiteboard: [mozmill-2.0+])

Traceback (most recent call last):
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/mozmill_automation/testrun.py", line 303, in run
    self.run_tests()
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/mozmill_automation/testrun.py", line 585, in run_tests
    TestRun.run_tests(self)
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/mozmill_automation/testrun.py", line 255, in run_tests
    self._mozmill.run(tests, self.options.restart)
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/mozmill/__init__.py", line 407, in run
    frame = self.run_test_file(frame or self.start_runner(),
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/mozmill/__init__.py", line 328, in start_runner
    self.results.appinfo = self.get_appinfo()
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/mozmill/__init__.py", line 441, in get_appinfo
    app_info = json.loads(mozmill.getApplicationDetails())
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/jsbridge/jsobjects.py", line 138, in __call__
    response = self._bridge_.execFunction(self._name_, args)
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/jsbridge/network.py", line 162, in execFunction
    exec_args = [encoder.encode(_uuid), func_name, encoder.encode(args)]
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/jsbridge/network.py", line 76, in encode
    return simplejson.JSONEncoder.encode(self, o)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py", line 367, in encode
    chunks = list(self.iterencode(o))
  File "/Users/mozilla/mozmill-ci/jenkins-master/jobs/mozilla-aurora_remote/workspace/mozmill-env/python-lib/jsbridge/network.py", line 82, in _iterencode
    yield simplejson.JSONEncoder.iterencode(self, o, markers)
TypeError: iterencode() takes exactly 2 arguments (3 given)
This is actually a regression came in with the patch on bug 656632 about half a year ago. Jeff, do you have any advice what do to when checking this changeset?

https://github.com/mozilla/mozmill/commit/29c68aa5e36f6d2f14eda42a1a315c1f45564497

Shouldn't we make use of simplejson by default given that it is way faster than the json module? As of now simplejson is only used as a fallback:

https://github.com/mozilla/mozmill/blob/29c68aa5e36f6d2f14eda42a1a315c1f45564497/jsbridge/jsbridge/network.py#L13
Flags: needinfo?(jhammel)
At the time bug 656632 was written, we were supporting python 2.4 where `json` was not part of the stdlib.  Since then simplejson has independently developed.

I can't really advise which camp to follow;  personally, I am in the stdlib camp, but that's not a professional stance.  I would go with whatever works.
Flags: needinfo?(jhammel)
Given that this bug is a hard-blocker for us and we want to release Mozmill 2.0 soon, I will go ahead and reopen bug 656632. The change made there will be backed out and we have to find a better way to simplify that code.
Blocks: 656632
Keywords: regression
This has been fixed by the backout of bug 656632.
Assignee: nobody → hskupin
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.