Skip to content

Conversation

@XChaitanyaX
Copy link
Contributor

@XChaitanyaX XChaitanyaX commented Nov 14, 2025

Copy link
Contributor

@dr-carlos dr-carlos left a comment

Choose a reason for hiding this comment

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

A short test should be added in the relevant part(s) of test_ipaddress.py to ensure that the hosts() method always returns an iterator.

Copy link
Contributor

@dr-carlos dr-carlos left a comment

Choose a reason for hiding this comment

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

The tests looks good, but this should still pass on main. Could you add similar tests for the specific cases affected by this PR?

# special case where the network is a /32
addrs = [ipaddress.IPv4Address('1.2.3.4')]
str_args = '1.2.3.4/32'
tpl_args = ('1.2.3.4', 32)

addrs = [ipaddress.IPv6Address('2001:658:22a:cafe::1'), ]
str_args = '2001:658:22a:cafe::1/128'
tpl_args = ('2001:658:22a:cafe::1', 128)

@XChaitanyaX
Copy link
Contributor Author

XChaitanyaX commented Nov 14, 2025

but this should still pass on main

the workflow shows an error in test import, I think it is a known issue I saw it somewhere....

Copy link
Contributor

@sharktide sharktide left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sharktide sharktide left a comment

Choose a reason for hiding this comment

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

Although we probably should re-run the failed test. It seems unrelated.

@XChaitanyaX
Copy link
Contributor Author

Is there a way to rerun the workflow?? I don't see any in checks

@sharktide
Copy link
Contributor

sharktide commented Nov 15, 2025

Is there a way to rerun the workflow?? I don't see any in checks

You can't, a core developer or official triager has to. I am not officially either. It is fine for now. They probably will when they see this PR of you haven't pushed any commits in the meantime because losing commits re-runs all tests.

Copy link
Contributor

@sharktide sharktide left a comment

Choose a reason for hiding this comment

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

Core review? @serhiy-storchaka

@picnixz picnixz changed the title gh-141497: make hosts an iterable gh-141497: make ipaddress.IPv4Network.hosts() an iterable Nov 15, 2025
@picnixz picnixz changed the title gh-141497: make ipaddress.IPv4Network.hosts() an iterable gh-141497: make ipaddress.IP{v4,v6}Network.hosts() an iterable Nov 15, 2025
@picnixz picnixz changed the title gh-141497: make ipaddress.IP{v4,v6}Network.hosts() an iterable gh-141497: make ipaddress.IP{v4,v6}Network.hosts() return an iterator Nov 15, 2025
@bedevere-app
Copy link

bedevere-app bot commented Nov 15, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@XChaitanyaX XChaitanyaX requested a review from picnixz November 15, 2025 14:03
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Sorry my previous was incomplete but I was on mobile.

@picnixz picnixz dismissed their stale review November 15, 2025 23:38

Changes were addressed.

@XChaitanyaX XChaitanyaX requested a review from picnixz November 16, 2025 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants