Retainers for shafts