[3.7] bpo-33217: deprecate non-Enum lookups in Enums by ethanfurman · Pull Request #6392 · python/cpython

@ethanfurman To clarify, I wouldn't object to a purely documentation change for 3.6.x that says that doing those kinds of containment tests will raise a DeprecationWarning in 3.7 and an error in 3.8 but it's probably not necessary.

You might be able to use Git's cherry-pick command as a starting point, probably with the -n option. Our workflow with git is sort of the reverse of what we were doing with hg, e.g. we now commit first to master than backport as necessary to maintenance branches. The needs backport labels and the backporting bot are optimized for that.