inkscape: Port to Python 3

Bug #1735363 reported by Matthias Klose on 2017-11-30
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned
inkscape (Debian)
Confirmed
Unknown
inkscape (Ubuntu)
Wishlist
Unassigned

Bug Description

inkscape: Use/Port of Python3 needed, or considering demotion.

Currently seeded in usb (???), owned by desktop-packages.

Matthias Klose (doko) on 2017-11-30
tags: added: py2-demotion py2-removal
Changed in inkscape (Ubuntu):
assignee: nobody → Ubuntu Desktop (ubuntu-desktop)
Hachmann (marenhachmann) wrote :

For the person who wants to work on this:
Some (a lot of?) work on this has already been done by su_v:
https://gitlab.com/su-v/inx-fork

(not sure about current status)

Changed in inkscape (Debian):
status: Unknown → New
Jeremy Bicha (jbicha) wrote :

Matthias, I dropped the usb seed and I did a tasksel upload that I think dropped the usb task. I don't see any reverse-depends for the inkscape in main. Can you figure out why inkscape is still in main but is not showing up on the component mismatches report?

Matthias Klose (doko) wrote :

now demoted

tags: removed: py2-demotion
Jeremy Bicha (jbicha) on 2017-12-06
summary: - inkscape: Use/Port of Python3 needed, or considering demotion
+ inkscape: Port to Python 3
Changed in inkscape (Ubuntu):
assignee: Ubuntu Desktop (ubuntu-desktop) → nobody
Changed in inkscape (Ubuntu):
importance: Undecided → Wishlist
Ted Gould (ted) wrote :

While I think it is fine for Inkscape to not be in main, there is a snap for it, if there are those who want to still see it in main another possible solution is to split out the Python extensions. They're independent and could be a separate package with a recommends.

Changed in inkscape (Debian):
status: New → Confirmed
Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
Alex Valavanis (valavanisalex) wrote :

@Hachmann - Thanks for the gitlab link to su_v's work. Do you know what the status of the fork is? Is there a wiki page/bug report tracking the migration?

It would be good to get this merged as soon as possible, as the fork is 6 months behind master.

Hachmann (marenhachmann) wrote :

@valavanisalex Sorry, I don't know much about it. su_v is often around on IRC, please ask her there about the status or send her an email. As far as I know, there is no other place tracking this.

Do you think this might become one focus for the Hackfest? Being 'demoted' doesn't sound so good in my ears, tbh.

(Found this only by chance, I definitely need to remember to subscribe here when I comment...)

Bryce Harrington (bryce) wrote :

I'd second Ted's suggestion of splitting out python code to a separate package, that's something we've been pondering doing for other reasons already.

Do we have a listing of what exactly uses python?

I know the extension programs do, and those could be split out to an inkscape-extras package.

If there are any utilities or build helpers in python, those should be redoable in python3 without much fuss. Give me a list and I can make sure they all get done.

Is there anything else besides that? Does Inkscape have any python bindings internally that are version specific?

@moini, being demoted from main isn't that big of a deal, it's more a loss against Ubuntu than Inkscape itself. Most users will have universe enabled so it's not going to impact them. It just limits Canonical's ability to make good use of Inkscape in their own products. Like Ted points out, users have many ways to get Inkscape.

Mattia Rizzolo (mapreri) wrote :

The main → universe move as I see it has more of a logistic change: theoretically speaking, as long as it is in main Canonical could be called upon providing commercial support if any customer asked for it, as well as providing security patches if any security breach appeared, etc.
At any rate, yes, nothing to be concerned about: actually using a Ubuntu desktop without universe is just plain impossible anyway.

Hachmann (marenhachmann) wrote :

Thank you for the explanation, Bryce and Mattia! But until 2020, this should be solved, as far as I understand, regardless of this? We've only got 2 hackfests until then... time flies.

I found that these depend on python scripts, but there may be more, hope others will fill in the blanks (I've also got no clue of how easy or hard it's to port these):

- several python export and import routines (that use extensions, e.g. save as optimized SVG via scour (how's scour doing with Python3, @Eduard?), dxf. What about uniconvertor? Does it have a python3 version?... We don't include it, but it needs to work with the rest... :-/ Or I think there was talk about dropping it...?

- the customizable templates (those with dots in the 'New from Template' dialog).

- everything aside from Tutorials in the Help menu (probably very quick to port, if anything needs to be done at all)

- couldn't find what 'prepare_file_save_as.py' is currently used for, weirdly - but I think it was needed for export to dxf...

- there seem to be several i18n-generation scripts in various subdirectories of the /share/... directory tree - guess they are used to internationalize the svg files (filters, markers,...) there

- several packaging scripts, for win and some Cmake scripts

- (extension tests)

- dpi switcher extension (not needed when opening files, intended for switching manually later)

Patrick Storz (ede123) wrote :

One thing we'd need to consider is that some more or less basic Inkscape functionality currently relies on Python extensions, e.g.
- Several templates
- Help links
  although I already wondered if this was even really necessary -
  I assume there are better solutions available to open a link from GTK
- Export/Import extensions
  They are not strictly Inkscape core but a lot of users are not aware
  they might be running an extension to export to their favorite format.

Second important questions is if this would only affect packaging or if we really want to split out the extension code from the Inkscape source repository into a more or less self sufficient sub-project.
In the latter case I fear that the bundled extensions - which are in a pretty desolate state even now - might bit-rot even faster (less users, less developers having the repo on their radar, less obvious affiliation with the core program).
If we could achieve to make the extensions into a "community project" (that is a lot more user driven, allowing easy contributions and additions of new extensions with well-organized categorization and documentation) that could also improve upon the status-quo but as a start this would require a "core team" of people who would be willing to do the necessary maintenance (not sure we have that right now...).

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in inkscape (Ubuntu):
status: New → Confirmed
Hachmann (marenhachmann) wrote :

Some work has been done on this by doctormo during the Hackfest, as far as I understand.
However, the Python3 port has been combined with moving extensions out of the main repo for that branch, so not sure about compatibility and usefulness with/for current Inkscape versions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.