Title: ipaddress.IPv6Address.is_loopback broken for IPv4-mapped addresses · Issue #117566 · python/cpython · GitHub
Open Graph Title: ipaddress.IPv6Address.is_loopback broken for IPv4-mapped addresses · Issue #117566 · python/cpython
X Title: ipaddress.IPv6Address.is_loopback broken for IPv4-mapped addresses · Issue #117566 · python/cpython
Description: Bug report Bug description: While properties like is_private account for IPv4-mapped IPv6 addresses, such as for example: >>> ipaddress.ip_address("192.168.0.1").is_private True >>> ipaddress.ip_address("::ffff:192.168.0.1").is_private T...
Open Graph Description: Bug report Bug description: While properties like is_private account for IPv4-mapped IPv6 addresses, such as for example: >>> ipaddress.ip_address("192.168.0.1").is_private True >>> ipaddress.ip_ad...
X Description: Bug report Bug description: While properties like is_private account for IPv4-mapped IPv6 addresses, such as for example: >>> ipaddress.ip_address("192.168.0.1").is_private True ...
Opengraph URL: https://github.com/python/cpython/issues/117566
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ipaddress.IPv6Address.is_loopback broken for IPv4-mapped addresses","articleBody":"# Bug report\n\n### Bug description:\n\nWhile properties like `is_private` account for IPv4-mapped IPv6 addresses, such as for example:\n\n```python\n\u003e\u003e\u003e ipaddress.ip_address(\"192.168.0.1\").is_private\nTrue\n\u003e\u003e\u003e ipaddress.ip_address(\"::ffff:192.168.0.1\").is_private\nTrue\n```\n\n...the same doesn't currently apply to the `is_loopback` property:\n```python\n\u003e\u003e\u003e ipaddress.ip_address(\"127.0.0.1\").is_loopback\nTrue\n\u003e\u003e\u003e ipaddress.ip_address(\"::ffff:127.0.0.1\").is_loopback\nFalse\n```\n\nAt minimum, this inconsistency between different properties is counter-intuitive. Moreover, `::ffff:127.0.0.0/104` is for all intents and purposes a loopback address, and should be treated as such.\n\nFor the record, this will now match the behavior of other languages such as Rust, Go and .NET, cf. rust-lang/rust#69772.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-117567\n* gh-118391\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/paravoid","@type":"Person","name":"paravoid"},"datePublished":"2024-04-05T12:38:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/117566/cpython/issues/117566"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c29ac494-f374-3a7c-fe65-78a28dc16b19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB86:245D90:6D1AAC:935639:6969E51C |
| html-safe-nonce | 17cb37591f9e91f2a9984216a915346163cf459b6a23c4a6adf93207d447a054 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjg2OjI0NUQ5MDo2RDFBQUM6OTM1NjM5OjY5NjlFNTFDIiwidmlzaXRvcl9pZCI6Ijg5MzU0MjUxMjkwNTAyMDcwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b084ecddb5fb985d44f776488079f9852050d995f464af3609ca356ef565233e |
| hovercard-subject-tag | issue:2227937400 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/117566/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7822101aef08729c328eae80c7b177fe7c16a6d7f1747083e1e970f975421d96/python/cpython/issues/117566 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7822101aef08729c328eae80c7b177fe7c16a6d7f1747083e1e970f975421d96/python/cpython/issues/117566 |
| og:image:alt | Bug report Bug description: While properties like is_private account for IPv4-mapped IPv6 addresses, such as for example: >>> ipaddress.ip_address("192.168.0.1").is_private True >>> ipaddress.ip_ad... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | paravoid |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width