Open Bug 1925198 Opened 16 days ago Updated 2 days ago

Nightly fails to build with python-3.13: ModuleNotFoundError: No module named 'telnetlib'

Categories

(Testing :: Mozbase, defect, P2)

Firefox 133
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: metasieben, Unassigned)

References

(Blocks 1 open bug)

Details

Similarly to pipes, telnetlib has been removed in Python 3.13
https://docs.python.org/3.12/library/telnetlib.html

Building Nightly with PGO enabled and Python 3.13 is currently broken.

https://searchfox.org/mozilla-central/rev/aecbd5cdd28a09e11872bc829d9e6e4b943e6e49/testing/mozbase/mozrunner/mozrunner/devices/emulator.py#11

Blocks: python3.13
No longer blocks: python3.13
Component: General → Mozbase
Product: Firefox Build System → Testing
Version: Trunk → Firefox 133

I was going to open a bug about this as well. Python-3.13 seems to work otherwise, but not when pgo is enabled via MOZ_PGO=1.

I get this error:

21:02.91 gmake: Leaving directory '/var/tmp/portage/www-client/firefox-131.0.3/work/firefox_build/instrumented'
Traceback (most recent call last):
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/build/pgo/profileserver.py", line 19, in <module>
    from mozrunner import CLI, FirefoxRunner
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/testing/mozbase/mozrunner/mozrunner/__init__.py", line 6, in <module>
    import mozrunner.base
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/testing/mozbase/mozrunner/mozrunner/base/__init__.py", line 6, in <module>
    from .browser import BlinkRuntimeRunner, GeckoRuntimeRunner
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/testing/mozbase/mozrunner/mozrunner/base/browser.py", line 11, in <module>
    from ..application import DefaultContext, FirefoxContext
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/testing/mozbase/mozrunner/mozrunner/application.py", line 11, in <module>
    from mozdevice import ADBDeviceFactory
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/testing/mozbase/mozdevice/mozdevice/__init__.py", line 157, in <module>
    from .adb import (
    ...<8 lines>...
    )
  File "/var/tmp/portage/www-client/firefox-131.0.3/work/firefox-131.0.3/testing/mozbase/mozdevice/mozdevice/adb.py", line 7, in <module>
    import pipes
ModuleNotFoundError: No module named 'pipes'

And yeah, import pipes is still here:
https://hg.mozilla.org/mozilla-central/file/tip/testing/mozbase/mozdevice/mozdevice/adb.py

See Also: → 1926140

(In reply to Joonas Niilola from comment #1)

And yeah, import pipes is still here:
https://hg.mozilla.org/mozilla-central/file/tip/testing/mozbase/mozdevice/mozdevice/adb.py

In this script we only use quote method from pipes module so we may replace that usage with it's equivalent from mozbuild.shellutil (as it has been done in other places)

from mozbuild.shellutil import quote as shell_quote

class ADBProcess:
    @staticmethod
    def _quote(arg):
        """Utility function to return quoted version of command argument."""
        return shell_quote(arg)

The severity field is not set for this bug.
:jmaher, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmaher)

thanks, for all the info, this seems actionable!

Severity: -- → S2
Flags: needinfo?(jmaher)
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.