Update Poetry to 1.7.1 version to align with that of Dependabot
Note that once merged this PR, all developers will have to update their local Poetry version.

Fix #2405.
Update Poetry to 1.7.1 version to align with that of Dependabot: Note that once merged this PR, all developers will have to update their local Poetry version.

Fix #2405.