Use a different warning class so users get warnings by alex · Pull Request #4014 · pyca/cryptography (original) (raw)

FutureWarning is kinda similar to DeprecationWarning but is shown by default – it might be more appropriate than the vague UserWarning.

It's probably a good idea to make empty warning subclasses so that people can easily filter on them if they want:

class CryptographyDeprecationWarning(FutureWarning): pass

A policy you might want to consider is using a DeprecationWarning in X.Y+1, and then switching to something visible in X.Y+2, so diligent projects can catch it early and fix it before you start yelling at people. Or you could go straight to yelling at people, that works too.