Skip to content

Missing IPv6 testcase for for IPv6 with part of IPv4 #130607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bazhil opened this issue Feb 26, 2025 · 1 comment
Closed

Missing IPv6 testcase for for IPv6 with part of IPv4 #130607

bazhil opened this issue Feb 26, 2025 · 1 comment
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@bazhil
Copy link
Contributor

bazhil commented Feb 26, 2025

Feature or enhancement

Proposal:

The same IPv6 address can be writed different ways, one of which is extended IPv4 form, like '::1.2.3.4', which may be detect as IPv4 by mistake. Thats why we must be sure, that ipaddress correctly detect this IPv6 address as IPv6, and compare with another forms of this address.

Something like that is needed
@```python
assert ipaddress.IPv6Interface('::1.2.3.4') == ipaddress.IPv6Interface('0000:0000:0000:0000:0000:0000:0102:0304')

assert ipaddress.IPv6Interface('::1.2.3.4').version == 6


### Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

### Links to previous discussion of this feature:

https://github.com/python/cpython/pull/121518

<!-- gh-linked-prs -->
### Linked PRs
* gh-121518
* gh-130678
* gh-130679
<!-- /gh-linked-prs -->
@bazhil bazhil added the type-feature A feature request or enhancement label Feb 26, 2025
@encukou encukou added tests Tests in the Lib/test dir stdlib Python modules in the Lib dir labels Feb 27, 2025
encukou pushed a commit that referenced this issue Feb 28, 2025
Extend IPv6 tests and made little syntax refactoring
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 28, 2025
Extend IPv6 tests and made little syntax refactoring
(cherry picked from commit 9f0879b)

Co-authored-by: Ilya Bazhenov <31971067+bazhil@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 28, 2025
Extend IPv6 tests and made little syntax refactoring
(cherry picked from commit 9f0879b)

Co-authored-by: Ilya Bazhenov <31971067+bazhil@users.noreply.github.com>
encukou pushed a commit that referenced this issue Feb 28, 2025
Extend IPv6 tests and made little syntax refactoring
(cherry picked from commit 9f0879b)

Co-authored-by: Ilya Bazhenov <31971067+bazhil@users.noreply.github.com>
encukou pushed a commit that referenced this issue Feb 28, 2025
Extend IPv6 tests and made little syntax refactoring
(cherry picked from commit 9f0879b)

Co-authored-by: Ilya Bazhenov <31971067+bazhil@users.noreply.github.com>
@encukou encukou closed this as completed Feb 28, 2025
@encukou
Copy link
Member

encukou commented Feb 28, 2025

Thank you!

seehwan pushed a commit to seehwan/cpython that referenced this issue Apr 16, 2025
Extend IPv6 tests and made little syntax refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants