Closed typemytype closed 2 years ago
Are you saying the osVersionXXX
constants from vanillaBase.py
are used a lot outside of vanilla? You can't even import them via vanilla
.
fe: https://github.com/typedev/KernTool4/blob/86a0b7215e70c449ae66b40699e5910068092e5a/KernTool4.roboFontExt/lib/KernTool4.py#L176 https://github.com/RafalBuchner/masterTools/blob/00e4ea41c9ef6c9867a7fd7fa0cd1310f963b48d/master-tools.roboFontExt/lib/masterTools/UI/settings.py#L253
but they are not comparing with strings, which is good!
this means I can make a PR in vanilla with a plain Version
object, fixing the deprecated warning (without the subclass, oef)
DrawBot does not import from vanilla but is comparing it with a string... https://github.com/typemytype/drawbot/blob/abf00e47e0e812e878631bd61a98d0e48aa9d934/drawBot/context/baseContext.py#L1234
I will PR it in DrawBot to use the vanilla version constants.
I think DrawBot should just use packaging.version, not vanilla's stuff, and not compare to a string.
moving to
packaging.version
from the deprecateddistutils.version
. Lots of other tools are just checking string with a version number.. andpackaging.version
always expects aVersion
object and raises and type error.To keep support we maybe have to subclass Version, I dont really like that but if we change it will break lots of interfaces where macOS version are checked...