Anti-police sentiment has moved from the streets to the state legislature, and while it hasn’t reached Massachusetts yet, it’s a bellwether worth noting.

California Gov. Gavin Newsom recently gave residents the right to refuse police officers who ask their help with an arrest.

Newsom did it by signing a bill revoking the state’s Posse Comitatus Act of 1872, which made it a misdemeanor for an able-bodied adult to refuse to help officials with tasks like apprehending an escaped prisoner or preventing “any breach of peace.”

It dates back to California’s Wild West days, when rustlers and outlaws and other varmints roamed them thar hills. Law enforcement at the time invoked the act to form posses.

Cory M. Salzillo, legislative director or the California State Sheriffs’ Association, told CNN that the bill essentially discourages people from cooperating or giving assistance to law enforcement, and advances the idea that you shouldn’t help the police.

“There are situations in which a peace officer might look to private persons for assistance in matters of emergency or risks to public safety and we are unconvinced that this statute should be repealed,” the CSSA said in a statement.

While this bit of legislation, like the Kardashians and poop maps, is a California thing, it reflects a disturbing mindset that stretches across the country.

Earlier this summer, New York police officers were soaked by buckets of water hurled by young men in Harlem and Brooklyn while onlookers filmed the mayhem, and in many cases, laughed.

Last summer, Boston cops were unable to come to the aid of a fellow officer who was being kicked in the face by a youth at a community center because the front desk worker denied them access. The Boston Herald reported that the Dewitt Community Center worker feared she would have been reprimanded by her boss.

“Responding officers, forced to watch the altercation through the community center’s glass doors, were unable to gain entry and provide support to the struggling officer because a front desk staffer refused to let them in,” according to the Boston Police Department.

As the Boston Herald’s Rick Sobey reported recently, police departments are noticing an all-around lack of respect for authority, said Marshfield Police Chief Phil Tavares.

“It’s unfortunate and disturbing, and police officers are getting killed far too often,” he said. “Locally, we have the support of our community and respectful citizens for the most part, but sometimes we have people resisting arrest or confronting officers.”

It would be nice if some of our elected leaders also had the backs of law enforcement, but in Suffolk County, officers trying to protect and serve have to toe the “no prosecute” line on certain crimes.

And when cops come out to handle the crowd and keep the peace at a parade, it would be great if protesters didn’t hurl bottles of urine and other liquids at officers. There’s protest, and then there’s violence — and the latter will land you before a judge.

Speaking of which, when police have made arrests and the defendants are being arraigned before a judge, and those charges stick, what kind of message does it send to the community when the district attorney tries to override that ruling?

The same sort of message California just sent its law enforcement officers: You’re on your own. Our men and women in blue who risk their lives for us deserve better.