-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
I've found references to __file__ in your package:
Line 283 in edadce3
| package_path = os.path.dirname(os.path.abspath(__file__)) |
As modern python 3.1x releases move on towards __spec__ and drop support for __file__ and __package__ globals, it is recommended to replace relevant references to ensure compatibility with upcoming ST dev builds.
If this package targets ST4 and python 3.8+ it is an easy change by just replacing:
__file__=>__spec__.origin__package__=>__spec__.parent
Python 3.3 doesn't support __spec__ and would require a fallback.
A common pattern might be
try:
package_path = os.path.dirname(__spec__.origin)
except (AttributeError, NameError):
package_path = os.path.dirname(__file__)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels