Can't run raptor with python 3.10+.
Categories
(Testing :: Raptor, defect, P3)
Tracking
(firefox110 fixed)
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: emilio, Assigned: kshampur)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxp])
Attachments
(2 files)
I hit various issues in dependencies for using collections.*
rather than collections.abc.*
, see example log below (but I had fixed another two before).
Comment 1•2 years ago
|
||
This is an expected failure, we only support Python 3.6-3.8 atm.
Reporter | ||
Comment 2•2 years ago
|
||
Ouch, that's unfortunate. Newer Fedora releases will ship with Python 3.10...
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
In mine and others' experience, browsertime tests work in python 3.9.
3.10 should hopefully be an incremental upgrade to investigate, and therefore could be a good first bug
Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Kash [:kshampur] ⌚EST from comment #3)
In mine and others' experience, browsertime tests work in python 3.9.
3.10 should hopefully be an incremental upgrade to investigate, and therefore could be a good first bug
Attempted to do some investigation (but on my Mac's not Fedora) and actually I can't even bootstrap/build with 3.10.
Mach is not recognized
kshampur@MacBook-Pro mozilla-unified % ./mach
created virtual environment CPython3.10.2.final.0-64 in 19ms
creator CPython3Posix(dest=/Users/kshampur/.mozbuild/srcdirs/mozilla-unified-b93fdedf95c0/_virtualenvs/mach, clear=False, no_vcs_ignore=False, global=False)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator
Traceback (most recent call last):
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/./mach", line 96, in <module>
main(sys.argv[1:])
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/./mach", line 88, in main
mach = check_and_get_mach(os.path.dirname(os.path.realpath(__file__)))
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/./mach", line 35, in check_and_get_mach
return load_mach(dir_path, mach_path)
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/./mach", line 21, in load_mach
return mach_initialize.initialize(dir_path)
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/build/mach_initialize.py", line 160, in initialize
_activate_python_environment(
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/build/mach_initialize.py", line 99, in _activate_python_environment
mach_environment.activate()
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/python/mach/mach/site.py", line 385, in activate
self.ensure()
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/python/mach/mach/site.py", line 371, in ensure
self._build()
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/python/mach/mach/site.py", line 428, in _build
_create_venv_with_pthfile(
File "/Users/kshampur/wrkspc/mozpy310/mozilla-unified/python/mach/mach/site.py", line 1186, in _create_venv_with_pthfile
with open(os.path.join(platlib_site_packages_dir, PTH_FILENAME), "w") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/kshampur/.mozbuild/srcdirs/mozilla-unified-b93fdedf95c0/_virtualenvs/mach/lib/python3.10/site-packages/mach.pth'
/Users/kshampur/.mozbuild/srcdirs/mozilla-unified-b93fdedf95c0/_virtualenvs/mach/lib/python3.10/
Folder exists, but not anything after (so a 3.10 venv is not properly created?)
It's possible this is just a OSX issue though. There is another similar issue with Fedora + 3.10 Bug 1738681
:emilio Were you able to clobber/bootstrap/build etc without issue?
Also I will bring this up again in Triage meeting and might remove the good-first-bug tag
Reporter | ||
Comment 5•2 years ago
|
||
Yes I'm able to clobber / bootstrap / build, etc.
Assignee | ||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
I did https://bugzilla.mozilla.org/show_bug.cgi?id=1738681#c8 to be able to run talos in Fedora 35.
Assignee | ||
Comment 8•2 years ago
|
||
Hi :emilio regarding prioritization, Bug 1770910,comment 2, I brought this up in our Triage.
We could spend time looking into resolving it just for these (local) tests with 3.10 but there is no guarantee fixing here for 3.10 won’t regress things in CI. Also looking at my previous comment above, looks like there is a different error altogether when trying 3.10 on the Mac, so it could be a good idea to resolve this for all platforms if/when this is tackled
One thing we wanted to ask of you is how big of a blocker/inconvenience is this for you, (and how much of a nuisance is it for you to have to use pyenv each time)
We will also look into having a discussion with the CI team to have python 3.9/3.10 running on CI which will be useful for looking into resolving this.
Reporter | ||
Comment 9•2 years ago
|
||
So it's not a total blocker, in the sense that I can use pyenv or something to install an older version of python, and then remember that I need to use that version of python whenever I want to do something related to raptor. But doing that usually requires a clobber build so that's also a bit annoying.
I think the biggest issue is that the errors are totally opaque if you're not in the know that raptor isn't supposed to work with newer python. As in, the AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
error is pretty hard to trace back to "ah, I need to downgrade python". At least a warning saying "this python version is not officially supported, consider using this or that" would go a long way.
The build system generally works with non-CI versions of python in a best-effort basis (as in, there's no guarantee things won't break, but they generally don't because people notice and stuff gets fixed pretty fast).
Assignee | ||
Comment 10•2 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #9)
So it's not a total blocker, in the sense that I can use pyenv or something to install an older version of python, and then remember that I need to use that version of python whenever I want to do something related to raptor. But doing that usually requires a clobber build so that's also a bit annoying.
I think the biggest issue is that the errors are totally opaque if you're not in the know that raptor isn't supposed to work with newer python. As in, the
AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
error is pretty hard to trace back to "ah, I need to downgrade python". At least a warning saying "this python version is not officially supported, consider using this or that" would go a long way.The build system generally works with non-CI versions of python in a best-effort basis (as in, there's no guarantee things won't break, but they generally don't because people notice and stuff gets fixed pretty fast).
Thanks for your input! I like the idea of a 3.10 warning message. I will look into adding this for the interim until 3.10 is better/fully supported
One good thing is i can finally reproduce this locally on my Mac now and can get the same as you AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
(Though I don't get the error you used to get in the attachment for this bug e.g. ImportError: cannot import name 'Mapping' from 'collections'
...)
ni? myself as a reminder
Assignee | ||
Comment 11•2 years ago
•
|
||
removing mentor/good first bug as this is a bit more involved than originally planned
from some quick investigation it seems wptserve(and hyperframe + h2) is being set up incorrectly during raptor-venv creation.
in addition needs_backport is evaluated as False but that prevents raptor-venv creation in 3.10
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 12•1 year ago
|
||
Presently we pull wptserve 3.0 from pypi, however it is incompatible with Python 3.10 that is shipping as default on more and more platforms (e.g. Linux).
This patch instead pulls the in-tree version of wptserve which is more up to date and compatible and should help future proof the Raptor and Talos tests.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Pushed by kshampur@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6b30e2e5c97c Use in-tree wptserve for Raptor and Talos. r=perftest-reviewers,sparky
Comment 14•1 year ago
|
||
bugherder |
Updated•10 months ago
|
Description
•