[deprecation] simplify class_deprecated code

I don't know why it has been choosen to move to a metaclass but it actually
brings more problems and a more complex code that it brings benefits.
5 jobs for topic/default/fix-class-deprecated-metaclass-conflict in 5 minutes and 30 seconds (queued for 13 seconds)
Status Job ID Name Coverage
  Test
failed black #26635

00:00:27

passed check-manifest #26634

00:03:29

passed flake8 #26632

00:03:58

passed mypy #26636

00:05:28

passed py3 #26633

00:04:42

 
Name Stage Failure
failed
black Test
No job log