President Donald Trump and the Democrats who dominate California politics are locked into a rather bizarre, symbiotic relationship.

Almost daily, they fire political and legal bullets at each other across 2,728 miles – by highway – of American soil, each knowing that no matter how strange the missives may appear to ordinary folks, there’s no penalty to be paid.

Trump shores up his standing among his core supporters by jibing at California. And the state’s politicos, including Gov. Gavin Newsom, play to the anti-Trump sentiments of their voters.

The latest incarnation of this syndrome is legislation, now awaiting Newsom’s signature, that would require any candidate for president in 2020 to release five years of income tax returns as a precondition to appearing on California’s presidential primary ballot.

It’s a reaction to Trump’s refusal to reveal his income tax returns, thus defying what has become a presidential custom, albeit one not required by law.

Newsom will almost certainly sign the legislation, Senate Bill 27, which cleared both legislative houses on party-line votes, even though his predecessor, Jerry Brown, vetoed a similar measure two years ago.

Brown had refused to reveal his own income tax returns and warned the bill “may not be constitutional” and could create “a slippery slope” precedent.

“Today we require tax returns, but what would be next?” Brown wrote in his veto message. “Five years of health records? A certified birth certificate? High school report cards? And will these requirements vary depending on which political party is in power?”

Brown’s point was well-taken. Not only would such a law open the door to all sorts of political mischief, but it would not be confined to California. Red states – and there are more of them than blue ones – could retaliate by compelling Democratic candidates to go through other hoops.

That said, it’s not likely to happen because federal judges are not likely to allow states to impose their own qualifications on presidential candidates beyond those contained in the U.S. Constitution. To wit: “No person except a natural born citizen, or a citizen of the United States, at the time of adoption of this Constitution, shall be eligible to the office of president; neither shall any person be eligible to that office who shall not have attained to the age of thirty five years, and been fourteen years a resident within the United States.”

As a state Senate analysis of SB 27 pointed out, “While the courts have not ruled directly on this question, the U.S. Supreme Court has ruled on ballot access requirements for congressional candidates and has held that states and the federal government cannot add to the qualifications of senator or congressional representatives outlined in the federal Constitution.”

Sen. Mike McGuire, a Healdsburg Democrat, insists that his measure has nothing to do with personal or partisan politics and everything to do with good government.

“Transparency is a nonpartisan issue,” he says. “And it’s transparency that provides the basis for accountability in government. For the past 40 years, every U.S. president – Republicans and Democrats alike – have released their tax returns. That is, until President Trump took office.”

Even if upheld by the courts, as unlikely as that seems, the measure would not damage Trump. He has no chance of winning California’s electoral votes next year and would use it to bolster the state’s image as a kooky outlier in more conventional battleground states such as Pennsylvania, Florida, Michigan and Wisconsin.

In other words, it could backfire and help Trump win re-election.

Dan Walters is a CalMatters columnist.