When I run my python script I get the following warning
DeprecationWarning: the sets module is deprecated
How do I fix this?
If you wish to squelch deprecation warnings, you can start Python with -Wi::Deprecation. This sets all deprecation warnings to ignored. There is also an Astropy-specific AstropyDeprecationWarning which can be used to disable deprecation warnings from Astropy only.
Deprecated Modules is a module that will warn game masters whenever they use a module that they shouldn't be using anymore. This includes modules that have been integrated into core Foundry, modules that have been entirely replaced by other modules, and modules that have broken and are no longer being maintained.
To warn about deprecation, you need to set Python's builtin DeprecationWarning as category. To let the warning refer to the caller, so you know exactly where you use deprecated code, you have to set stacklevel=2 .
Stop using the sets
module, or switch to an older version of python where it's not deprecated.
According to pep-004, sets
is deprecated as of v2.6, replaced by the built-in set
and frozenset
types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With