Wendy Palin -- who's married to Todd Palin's brother James -- filed the papers in Alaska this summer, citing an "incompatibility of temperament" that makes it impossible to live together.
According to the docs, Wendy and James were married in 2000, separated in July 2012 ... and are currently living apart. They have one daughter who was born in 2002.
Wendy is seeking sole legal custody and primary physical custody of the child -- but James has already filed a response, demanding joint custody.
A hearing is set for January -- but until then Wendy has primary custody and James gets visitation ... as long as he lays off booze for 24 hours before seeing his daughter.