Missing IPv6 testcase for for IPv6 with part of IPv4 · Issue #130607 · python/cpython · GitHub
Skip to content

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

Description

@bazhil

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 -->

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions