Massachusetts could finally have a transportation financing law by week's end, though it may not be the version Governor Deval Patrick wanted.

The House and Senate are expected to vote on Wednesday on Patrick’s veto of the bill.

Leaders of both branches say they’re confident they have the necessary votes for an override.

“As you know, which I’ve stated all along, I don’t count votes until I actually see them but based on the last vote that we took I feel optimistic,” House Speaker Robert DeLeo said.  

Patrick vetoed the bill Friday after lawmakers rejected his demand to add a provision that would allow for a gas tax increase if tolls on the western portion of the Massachusetts Turnpike come down as scheduled in 2017.

The governor said the bill does not account for the revenue that would be lost if the tolls come down.

Senate President Therese Murray said any revenue shortfalls could be dealt with in the future

“We gave the governor a good bill. It's going to take care of our transportation needs and problems well into the future. And if it has to be revisited again there’s a legislature and there will be a governor here to do that,” she said.  

The bill would raise $500 million in new taxes and would pump billions into the state’s transportation systems over the next decade.