The New York State Legislature concluded its session this week, accomplishing less than some wanted, but doing more than some would have preferred.

The headline, of course, is the failure to legalize the recreational use of marijuana — something that seemed like a foregone conclusion not so long ago.

We still think legalization is a good idea but, as we’ve said in this space before, we want to see the legislation done right, not rushed through with flaws because of an artificial timetable.

Sen. Liz Krueger, D-Manhattan, a prime supporter of legalization, got it right when she said, “I have no doubt that prohibition is an outdated and irrational policy, and its days are numbered.”

Like the prohibition of alcohol a century ago, prohibition of marijuana makes no sense. We’d also note that regulation of alcohol has long been in place and could easily be used as a blueprint for regulation of marijuana. We hope legislators take time to create a better bill next year and then pass it.

Of more consequence locally, the Legislature gave new rights to agricultural laborers. The legislation, endorsed by labor unions and opposed by farm advocacy groups, grants farm workers the right to join unions and requires that they be paid overtime if they work more than 60 hours in a week.

The divide over the measure was summed up in dueling media releases from Gov. Andrew Cuomo and Sen. James Seward, R- Milford.

Cuomo said, “With the passage of this legislation, we will help ensure every farmworker receives the overtime pay and fair working conditions they deserve. The constitutional principles of equality, fairness and due process should apply to all of us.”

Seward said, “The labor bill approved today will be another crushing blow for our already struggling family farms. ... Farming is a unique business and must be treated as such. Plain and simple — this bill will plow more family farms under.”

We understand the importance of small farms, but we also understand the importance of fair treatment for workers. We don’t believe people should have to work seven days per week to make a living and we think setting the overtime threshold at 60 hours — as opposed to the 40 hours everyone else gets — is a reasonable accommodation for the seasonal nature of farm work.

It’ll be interesting to see if farm workers attempt to organize labor unions. We’re not convinced unions would have much value for those workers, but it’s simple fairness that they should have the rights the rest of us have.

Other bills approved during the week are easy to applaud.

Legislators passed new protections from workplace sexual harassment. The Senate and Assembly also agreed to extend the statute of limitations for some sexual assault crimes.

We were very happy to see passage of legislation that would do away with the right of accused murderers to employ the “gay panic” defense. Defendants have been able to get their murder charges reduced to manslaughter by insisting that they were experiencing an emotional disturbance as a result of finding out that their victim was a homosexual or transgendered person. That needed to stop.

On the whole, the legislative session was not the runaway train of liberal revolution that upstate Republicans warned of when Democrats took over the state Senate. We believe the lawmakers have acted, for the most part, responsibly.