Skip to content

Conversation

@deathaxe
Copy link
Contributor

Python 3.13 plugin_host of ST4201+ does no longer support ZipLoader in favor of PEP451 compliant approach.

This commit therefore refactors public package_control module to use only built-in import mechanisms, if possible and fallback to ZipLoader only, if a python 3.3 plugin needs to load events module from Package Control.sublime-package running on foreign python 3.8 or 3.13 host.

With this change behavior is equal on all plugin_hosts. Only events module is exported as this is the only module intended to be public.

Python 3.13 plugin_host of ST4201+ does no longer support `ZipLoader`.

This commit therefore refactors public `package_control` module to use only
built-in import mechanisms if possible and fallback to `ZipLoader` only,
if a python 3.3 plugin needs to load `events` module from
Package Control.sublime-package running on foreign python 3.8 or 3.13 host.

With this change behavior is equal on all plugin_hosts. Only `events` module
is exported as this is the only module intended to be public.
Remove manipulation of `__spec__.origin` as it is the counter part of `__file__`
but not `__package__`. `__spec__.parent` is derived from `__spec__.name` and
doesn't need to be set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant