A man who treated his partner “appallingly” by squeezing her neck until she was almost breathless has narrowly avoided immediate prison.