Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698910 - dev-lang/spidermonkey should support Python 3
Summary: dev-lang/spidermonkey should support Python 3
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: py3-tracker, python-3-incompatible
  Show dependency tree
 
Reported: 2019-10-30 10:24 UTC by Olof Kindgren
Modified: 2021-10-22 23:30 UTC (History)
22 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olof Kindgren 2019-10-30 10:24:01 UTC
I haven't been able to figure out if upstream supports Python 3 or if it's planned
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-30 10:41:45 UTC
(In reply to Olof Kindgren from comment #0)
> I haven't been able to figure out if upstream supports Python 3 or if it's
> planned

So you're merely expressing a desire that the build system would one day support python3, or do you want downstream Gentoo to actively support what upstream as of now apparently does not?
Comment 2 Olof Kindgren 2019-10-30 11:13:33 UTC
This is primarily for the python3 tracking bug. Spidermonkey itself is a hard dependency of polkit so I suspect this might hold off python 2 removal for many installations.

As for the action to take, it sounds like a lot of work to fix this downstream, so the first course of action would be to see if upstream already supports py3 or has plans to do that. I started looking, but unfortunately I couldn't find any info and ran out of time for now to look deeper
Comment 3 Arfrever Frehtes Taifersar Arahesis 2019-10-31 02:56:58 UTC
SpiderMonkey is extracted from source code of Firefox.
Firefox upstream is already working on porting Firefox to Python 3. See bug #698978.
Comment 4 Ulenrich 2019-12-10 03:33:58 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #3)
> SpiderMonkey is extracted from source code of Firefox.
> Firefox upstream is already working on porting Firefox to Python 3. See bug
> #698978.

In the tree of the upstream mirror at:
https://github.com/mozilla/gecko-dev/tree/master/js/src

there I cannot see that much of the python .py scripts.
If that tree is self contained we could extract 
from beneath the firefox source that Spidermonkey js/src

If we have difficulties to cut out the
SpiderMonkey correctly, we could lookup the needed
copy action on a new sub project at mozilla there:
https://github.com/mozilla/spidernode/blob/master/README.md
They want to create a full blown NodeJs on top of SpiderMonkey.
Comment 5 Holger Hoffstätte 2020-02-20 14:13:24 UTC
For those interested: after fixing libmypaint (just merged, a dependency of GIMP) the last outstanding python2 dependency on my system was mozjs via polkit.
Someone was brave enough to port polkit to an alternative JS engine called duktape-2.x (in tree!), and the patch applies and works just fine on top of our existing polkit-0.116 ebuild.

I removed spidermonkey, enabled duktape and voila: spidermonkey & python2 are depcleaned. \o/

And yes, so far everything still seems to work, desktop/auth-wise. Beware that this is of course not (yet) an official patch, but it's a start.

Find the updated ebuild here: https://github.com/hhoffstaette/portage/commit/d3d70def05f79c8b4dec8b3d40404e7dfca482c5

hth.
Comment 6 ff11 2020-02-21 23:03:22 UTC
Hi Holger Hoffstätte

I have used your idea and created the duktape flag to enable this feature:
https://github.com/ferion11/danrepo/tree/master/sys-auth/polkit
Comment 7 Dmitry Grigoriev 2020-04-03 20:59:45 UTC
dev-lang/spidermonkey-68.6.0 is python3-only and now is arch-masked (yesterday was hard-masked), but cannot upgrade to it because <=sys-auth/polkit-0.116-r1 depends on spidermonkey:60. Should I create separate ticket for upgrading polkit?
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2020-04-03 21:16:10 UTC
It's not python 3 only. Build system still requires Python2.7... only tests were ported to Python3.
Comment 9 tt_1 2020-04-09 19:59:14 UTC
you can track python3 porting here: 

https://bugzilla.mozilla.org/showdependencytree.cgi?id=1496527&hide_resolved=1

there's been a lot of activity recently with fixes landing in firefox-77 branch, so there's still hope ;-)
Comment 10 cazzantonio 2020-04-17 13:18:12 UTC
(In reply to Holger Hoffstätte from comment #5)
> For those interested: after fixing libmypaint (just merged, a dependency of
> GIMP) the last outstanding python2 dependency on my system was mozjs via
> polkit.
> Someone was brave enough to port polkit to an alternative JS engine called
> duktape-2.x (in tree!), and the patch applies and works just fine on top of
> our existing polkit-0.116 ebuild.
> 
> I removed spidermonkey, enabled duktape and voila: spidermonkey & python2
> are depcleaned. \o/
> 
> And yes, so far everything still seems to work, desktop/auth-wise. Beware
> that this is of course not (yet) an official patch, but it's a start.
> 
> Find the updated ebuild here:
> https://github.com/hhoffstaette/portage/commit/
> d3d70def05f79c8b4dec8b3d40404e7dfca482c5
> 
> hth.

I'm trying your patch and it works perfectly. I suggest you to file a new bug proposing this for polkit
Comment 11 MW 2020-05-09 12:25:57 UTC
(In reply to cazzantonio from comment #10)
> I'm trying your patch and it works perfectly. I suggest you to file a new
> bug proposing this for polkit

+1, this works and would be a great improvement!

The underlying problem, however, is that polkit requires javascript. But perhaps we should be thankful that the developer(s) decided on javascript rather than macromedia flash?
Comment 12 Ivan Bagaev 2020-06-08 07:26:00 UTC
по хорошему, надо отправить bug сюда https://gitlab.freedesktop.org/polkit/polkit/-/issues

ну или merge request
Comment 13 Boris Faure 2020-07-28 20:34:30 UTC
I've created bug #734326 to be able to use duktape instead of spidermonkey in polkit.
Comment 14 Pietro 2020-10-03 17:46:33 UTC
(In reply to Holger Hoffstätte from comment #5)
> For those interested: after fixing libmypaint (just merged, a dependency of
> GIMP) the last outstanding python2 dependency on my system was mozjs via
> polkit.
> Someone was brave enough to port polkit to an alternative JS engine called
> duktape-2.x (in tree!), and the patch applies and works just fine on top of
> our existing polkit-0.116 ebuild.
> 
> I removed spidermonkey, enabled duktape and voila: spidermonkey & python2
> are depcleaned. \o/
> 
> And yes, so far everything still seems to work, desktop/auth-wise. Beware
> that this is of course not (yet) an official patch, but it's a start.
> 
> Find the updated ebuild here:
> https://github.com/hhoffstaette/portage/commit/
> d3d70def05f79c8b4dec8b3d40404e7dfca482c5
> 
> hth.

It did it for me. Awesome work man :)
Comment 15 Anton Bolshakov 2020-10-10 02:39:13 UTC
(In reply to Holger Hoffstätte from comment #5)

> Find the updated ebuild here:
> https://github.com/hhoffstaette/portage/commit/
> d3d70def05f79c8b4dec8b3d40404e7dfca482c5
> 
> hth.

https://github.com/hhoffstaette/portage/tree/master/sys-auth/polkit/files

Thanks!
Comment 16 Ogelpre 2021-01-31 09:53:55 UTC
Latest stable version spidermonkey 78.6.0 has python3 support. Bug can be closed.