numixproject / numix-core

Builder for App Icon Themes
GNU General Public License v3.0
766 stars 146 forks source link

gen.py: SVG to PNG conversion uses deprecated Rsvg.Handle.close #5728

Open BlueManCZ opened 3 years ago

BlueManCZ commented 3 years ago

Works fine, but I'm getting this warning.

Generating Linux theme...
./gen.py:102: DeprecationWarning: Rsvg.Handle.close is deprecated
  svg.close()
Done!

https://developer.gnome.org/rsvg/stable/RsvgHandle.html#rsvg-handle-close

Foggalong commented 3 years ago

Yeah noticed tat too the other day, had a half hearted look through the rsvg APIs to see what they'd replaced it with and couldn't see anything obvious :sweat_smile:

founderio commented 3 years ago

This section of the docs might be helpful here: https://lazka.github.io/pgi-docs/Rsvg-2.0/classes/Handle.html#Rsvg.Handle.new

Foggalong commented 2 years ago

I did some script work in #4780 and was thinking of tackling this then, but reading these docs it sounds like it's the whole method of reading SVGs that's changed rather than just .close. @bilelmoussaoui I don't suppose this is an issue you've ran into with hardcode-tray?

BlueManCZ commented 2 years ago

I also noticed this. It seemed like a simple fix, but then I started experimenting with a code and it looks like most of the function has to be rewritten to fully avoid deprecation.