Sir Keir told the BBC’s Andrew Marr Show: “The legislation is intended to ensure we don’t leave without a deal, that will require an extension.

“The length of the extension is secondary, frankly. We have simply got to stop us leaving without a deal.”

Labour’s shadow chancellor John McDonnell told Sky’s Sophy Ridge on Sunday that plans to block a no-deal Brexit will be published on Tuesday.

He said the “ultimate goal this week” was to “ensure Parliament can have a final say”.

Media playback is unsupported on your device

Media captionMichael Gove: “We will see what the legislation says when it is put forward”

But when asked if the government would abide by legislation preventing a no-deal Brexit, Mr Gove, the Chancellor of the Duchy of Lancaster, told the BBC’s Andrew Marr Show: “Let’s see what the legislation says.

“You’re asking me about a pig in a poke.

“And I will wait to see what legislation the opposition may try to bring forward.”

What could happen next week in Parliament?

Any new law has to pass through all stages of both Houses of Parliament. This would usually take weeks, but it could be done in as little as three days this week.

However, the bill could be challenged by the government and fall at any stage. It could fail to achieve enough support from either MPs or peers in votes held in the Houses.

Tuesday: MPs return to the Commons after their summer recess. Opposition MPs are expected to put forward legislation to stop no deal under “SO24” or Standing Order 24 – the rule that allows MPs to ask for a debate on a “specific and important matter that should have urgent consideration”. This would be the bill’s first reading – its formal introduction to the House.

Wednesday: In theory, the bill would then be debated and could potentially pass through all further stages in the Commons. However, the bill must pass through a series of votes and receive backing from more than half of MPs in order to pass on to the next stage. Boris Johnson’s first PMQs as prime minister also takes place.

Thursday: If MPs passed the bill, it could then reach the House of Lords by Thursday, but consideration of the bill could spill into Monday. It will be debated and voted on. The House is not due to sit on Friday.

Monday, 9 September: If the bill passes these hurdles it could gain Royal Assent, which formally makes it law.

This could be a tight timetable as there are as few as four sitting days before Parliament is suspended. This is due to happen between Monday, 9 September, and Thursday, 12 September, under plans announced by the prime minister.

Boris Johnson says he asked for the suspension in order to hold a Queen’s Speech – which sets out a list of laws the government hopes to get approved by Parliament – on 14 October.

Another hurdle for any bill could come in the House of Lords. Although opponents to no deal have a large majority, peers wanting to block a piece of legislation could talk and talk until there is no time left.

However, opposition parties and those who are against a no-deal Brexit are split on their aims.

Liberal Democrat MP Layla Moran said her party’s aim this week was to achieve an extension to Article 50 – the process by which the UK leaves the EU – and then a further referendum.

“We stand by our Stop Brexit stance but we do that via a People’s Vote and that’s step one,” she told Sky’s Sophy Ridge on Sunday.

Although Sir Keir suggested an Article 50 extension will be needed under the legislation plan, Labour has been clear that it wants a general election.

And while former justice secretary David Gauke wants to avoid no deal, he has said he “doesn’t want to do anything to facilitate a Jeremy Corbyn government”.

“Indeed, one of my worries about a no-deal Brexit is it will create the chaos in which Jeremy Corbyn could win a general election,” the Conservative Party MP told Sky’s Sophy Ridge on Sunday.

However, Mr Gauke said he is minded to put the national interest first if he were forced to choose between disobeying the party whip in a vote to prevent a no-deal Brexit.

Referring to reports that Tories who oppose a no-deal option could lose the party whip – which means they would effectively be expelled from the party – he said: “Sometimes there is a point where you have to judge between your own personal interests and the national interest.

“And the national interest has to come first. But I hope it doesn’t come to that.”

Mr Gauke said he will meet the prime minister on Monday to hear what his plan is to deliver a Brexit deal.

‘No food shortage’

Pressed on whether there would be shortages of fresh food in a no-deal Brexit scenario, Mr Gove said: “Everyone will have the food they need.”

He added: “No, there will be no shortages of fresh food.”

When asked if food prices would increase, Mr Gove replied: “I think that there are a number of economic factors in play.

“Some prices may go up. Other prices will come down.”

He said that freedom of movement will end “as we understand it”, but added that the EU Settlement Scheme was “working well”.

“The retail industry has been crystal clear in its communications with government over the past 36 months that the availability of fresh foods will be impacted as a result of checks and delays at the border,” a statement said.

Meanwhile, the government’s “Get Ready for Brexit” campaign and portal has been launched on its website.

Individuals or businesses can answer questions on it on topics including whether they propose to travel to the EU or export to Europe, and it then returns results which suggest how to start preparing for Brexit.