bpo-40025: Require _generate_next_value_ to be defined before members(GH-19763)

require `_generate_next_value_` to be defined before members
5 files changed