Skip to content

Conversation

andyp1per
Copy link
Contributor

This is not allowed in newer versions of python

@andyp1per andyp1per added the bug label Oct 8, 2025
@andyp1per andyp1per requested a review from peterbarker October 8, 2025 19:24
@magicrub
Copy link
Contributor

Shouldn't you also remove importing Set?

@peterbarker
Copy link
Contributor

This is not allowed in newer versions of python

Which version of Python does it cause problems with? What happens when you try to cross this code?

Also, this is @amilcarlucas 's file :-)

@andyp1per
Copy link
Contributor Author

It fails on 3.12

@peterbarker
Copy link
Contributor

peterbarker commented Oct 13, 2025 via email

@tpwrules
Copy link
Contributor

I'm surprised this worked at all, a typing.Set should be very different to an actual set object... But it would be good to see an actual error, I think this is fine on my 3.12 on Linux.

@peterbarker
Copy link
Contributor

@amilcarlucas can you weigh in on this, please?

It's breaking things for Andy, so we're very inclined to merge this!

@andyp1per
Copy link
Contributor Author

Shouldn't you also remove importing Set?

Done, thanks

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to pass CI.

On the bright side, it has highlighted another code path which would have broken your setup when it was crossed :-)

@andyp1per
Copy link
Contributor Author

I think this just demonstrates how time-consuming invalid requests for changes can be. Turns out the import is required by the reference to ```Set[int]`` which is both valid (its using typing.Set in the correct way) on 3.12 and required by the code. On 3.9 or later the lower case form can be used but it is not required and of course this would break 3.8 compatibility. So I am back at my original change - which is the one I tested - and is correct.

@andyp1per andyp1per requested a review from peterbarker October 18, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants