Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51038

resmoke.py can't be run on python 3.8

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.8.0, 4.2.13, 4.4.5
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • v4.4, v4.2
    • STM 2020-10-05
    • 1

      When attempting to invoke ./buildscripts/resmoke.py run --suites=buildscripts_test in a macOS venv with python3.8, the following stack trace is returned:

      [resmoke] 2020-09-16T08:34:28.352-0400 verbatim resmoke.py invocation: ./buildscripts/resmoke.py run --suites=buildscripts_test
      [resmoke] 2020-09-16T08:34:28.364-0400 YAML configuration of suite buildscripts_test
      test_kind: py_test
      
      selector:
        exclude_files:
        - buildscripts/tests/resmokelib/test_selector.py
        - buildscripts/tests/resmokelib/utils/test_archival.py
        - buildscripts/tests/test_aws_ec2.py
        - buildscripts/tests/test_remote_operations.py
        - buildscripts/tests/resmoke_end2end/**/test_*.py
        roots:
        - buildscripts/tests/**/test_*.py
        - buildscripts/idl/tests/**/test_*.py
      
      executor: {}
      
      logging:
        executor:
          format: '[%(name)s] %(asctime)s %(message)s'
          handlers:
          - class: logging.StreamHandler
        fixture:
          format: '[%(name)s] %(message)s'
          handlers:
          - class: logging.StreamHandler
        tests:
          format: '[%(name)s] %(asctime)s %(message)s'
          handlers:
          - class: logging.StreamHandler
      Traceback (most recent call last):
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/run/__init__.py", line 234, in _execute_suite
          executor.run()
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/testing/executor.py", line 98, in run
          self.logger.info("Starting execution of %ss...", self._suite.test_kind)
        File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 1434, in info
          self._log(INFO, msg, args, **kwargs)
        File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 1565, in _log
          fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
      TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "./buildscripts/resmoke.py", line 14, in <module>
          cli.main(sys.argv)
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/cli.py", line 17, in main
          subcommand.execute()
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/run/__init__.py", line 120, in execute
          self.run_tests()
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/run/__init__.py", line 185, in run_tests
          self._interrupted = self._run_suite(suite)
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/run/__init__.py", line 206, in _run_suite
          interrupted = self._execute_suite(suite)
        File "/Users/rsamuels/mongodb/mongo/buildscripts/resmokelib/run/__init__.py", line 244, in _execute_suite
          self._exec_logger.exception("Encountered an error when running %ss of suite %s.",
        File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 1469, in exception
          self.error(msg, *args, exc_info=exc_info, **kwargs)
        File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 1463, in error
          self._log(ERROR, msg, args, **kwargs)
        File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 1565, in _log
          fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
      TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given
      

      This problem can be solved by using python3.7, but it prevent us from upgrading in the future.

            Assignee:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Reporter:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: