There used to be the phrase "opposites attract". I think there are value systems which underlie politics that need to match up, but those value systems don't necessarily translate into the exact same political beliefs. In fact, in the US historically, men tended to be more conservative and women more progressive, and I don't see that really changing in the current times. Most of my male friends are more conservative than their partners, even as most of us are left of center. This is true, anecdotally, among the people I know across educational attainment and income.
On the flip side, when I was still dating, I always brought up politics and religion on the first date because it helped me filter people out. I didn't filter people out because we disagreed politically, but because of /how/ we disagreed (or rather how /they/ disagreed) politically. It was surprising the number of people who were exceedingly disagreeable about politics, completely unable to have a polite conversation on the topic, where any hint of dissent from their view was met with vehemence, even in person in a face-to-face conversation. My experience up to that point was this was how things worked online, but you could have a conversation with someone very different from you over a beer and it'd be alright face-to-face. Dating changed my outlook on this.
I think this was a good filter, because while politics was the topic of discussion, the filter had nothing to do with beliefs and everything to do with agreeableness, reasonableness, and behavior. In effect, it became a very good way to filter out assholes, of which there are many, unfortunately the majority of eligible persons in my dating pool. But, no regrets on this filter, because my current partner is wonderful and was found after many years of searching using this filter.
My parents relationship, the relationships of my friends (most of whom are married), and my own relationship are all anecdotal, but strong evidence that supports you don't need to politically agree to date successfully and have a long-term relationship or marriage. But it does require the two people involved to not be vehement zealots who dehumanize anyone that disagrees with them, which unfortunately is becoming a rarer situation thanks to the extremist echo chambers we've created online.