Skip to content

Conversation

edgarrmondragon
Copy link
Contributor

@edgarrmondragon edgarrmondragon commented Sep 30, 2025

Python 3.14 is scheduled to be released next week.

@edgarrmondragon
Copy link
Contributor Author

The errors here are also occurring on master

@edgarrmondragon edgarrmondragon force-pushed the cp314-wheels branch 3 times, most recently from e8118d7 to c252f35 Compare October 1, 2025 21:10
@edgarrmondragon edgarrmondragon marked this pull request as ready for review October 1, 2025 21:14
Comment on lines 75 to 85
if (
sys.version_info >= (3, 13)
or (
sys.version_info < (3, 12)
and (
sys.version_info >= (3, 11, 13)
or sys.version_info >= (3, 10, 18)
or sys.version_info >= (3, 9, 23)
)
)
):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to consider alternatives, cause this is gross

Copy link
Member

Choose a reason for hiding this comment

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

Lol it is... Can you explain what it is for? 😄

Copy link
Contributor Author

@edgarrmondragon edgarrmondragon Oct 2, 2025

Choose a reason for hiding this comment

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

So I think this is the followup to

which was backported to 3.9 - 3.12 in June (python/cpython#29345 (comment)) and affected patch releases

  • 3.9.23
  • 3.10.18
  • 3.11.13
  • 3.12.11

For some reason, 3.12.11 retains the old textual representation, thus this ugly conditional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although I can't reproduce this locally:

for PYVER in 3.9.22 3.9.23 3.10.17 3.10.18 3.11.12 3.11.13 3.12.10 3.12.11 3.13.7
do
  uv run -p "${PYVER}" python -c 'import sys, ipaddress; print("%d.%d.%d" % sys.version_info[:3], str(ipaddress.ip_interface("::ffff:102:300/128")))'
done

gives me

3.9.22 ::ffff:102:300/128
3.9.23 ::ffff:1.2.3.0/128
3.10.17 ::ffff:102:300/128
3.10.18 ::ffff:1.2.3.0/128
3.11.12 ::ffff:102:300/128
3.11.13 ::ffff:1.2.3.0/128
3.12.10 ::ffff:102:300/128
3.12.11 ::ffff:1.2.3.0/128
3.13.7 ::ffff:1.2.3.0/128

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, so see 2748a84.

I think the workflow is using some Python 3.12 earlier than 3.12.11. actions/setup-python is correctly installing 3.12.11 so my suspicion is that Tox is resolving to the default Python in the Ubuntu 24.04 runner.

Copy link
Member

@dvarrazzo dvarrazzo Oct 2, 2025

Choose a reason for hiding this comment

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

Let's just make a condition based on what we can observe in Python behaviour:

if str(ipaddress.ip_interface("::ffff:102:300/128")) == "::ffff:1.2.3.0/128":
    ...  # new style
elif str(ipaddress.ip_interface("::ffff:102:300/128")) == "::ffff:102:300/128":
    ...  # old style
else:
    assert False, "unexpected"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

676b62c

Copy link
Member

Choose a reason for hiding this comment

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

I have cherry-picked this changeset already on master in order to clear the CI status, so it won't appear in this MR anymore, but it's already committed (236c52b) and the attribution retained, thank you!

CI on master is now fixed so this branch will be merged too soon.

@MatthijsKok
Copy link

Python 3.14 was released yesterday 🎉 Is this ready to merge?

@dvarrazzo
Copy link
Member

The build CI job is pretty broken. Trying to fix it.

@dvarrazzo dvarrazzo merged commit 1945788 into psycopg:master Oct 9, 2025
12 of 13 checks passed
@edgarrmondragon edgarrmondragon deleted the cp314-wheels branch October 9, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants