Title: validators.ip_address private kwarg does not work as intended · Issue #373 · python-validators/validators · GitHub
Open Graph Title: validators.ip_address private kwarg does not work as intended · Issue #373 · python-validators/validators
X Title: validators.ip_address private kwarg does not work as intended · Issue #373 · python-validators/validators
Description: Python: 3.12 Valdiators: 0.28.1 validators.ip_address does not properly handle the scenario when private=False Result: ❯ python3.11 iPython 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin Type "help", "c...
Open Graph Description: Python: 3.12 Valdiators: 0.28.1 validators.ip_address does not properly handle the scenario when private=False Result: ❯ python3.11 iPython 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-...
X Description: Python: 3.12 Valdiators: 0.28.1 validators.ip_address does not properly handle the scenario when private=False Result: ❯ python3.11 iPython 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-...
Opengraph URL: https://github.com/python-validators/validators/issues/373
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"validators.ip_address private kwarg does not work as intended","articleBody":"Python: `3.12` \r\nValdiators: `0.28.1`\r\n\r\n`validators.ip_address` does not properly handle the scenario when `private=False`\r\n\r\nResult: \r\n\r\n```\r\n❯ python3.11\r\niPython 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n\u003e\u003e\u003e import validators\r\n\u003e\u003e\u003e a = \"1.1.1.1\"\r\n\u003e\u003e\u003e validators.ipv4(a)\r\nTrue\r\n\u003e\u003e\u003e validators.ipv4(a, private=True)\r\nValidationError(func=ipv4, args={'value': '1.1.1.1', 'private': True})\r\n\u003e\u003e\u003e validators.ipv4(a, private=False)\r\nValidationError(func=ipv4, args={'value': '1.1.1.1', 'private': False})\r\n```\r\n\r\nExpected Result:\r\n```\r\n❯ python3.11\r\niPython 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n\u003e\u003e\u003e import validators\r\n\u003e\u003e\u003e a = \"1.1.1.1\"\r\n\u003e\u003e\u003e validators.ipv4(a)\r\nTrue\r\n\u003e\u003e\u003e validators.ipv4(a, private=True)\r\nValidationError(func=ipv4, args={'value': '1.1.1.1', 'private': True})\r\n\u003e\u003e\u003e validators.ipv4(a, private=False)\r\nTrue\r\n```\r\n\r\nI also noticed there are no unit tests that cover the above scenarios.\r\n\r\n","author":{"url":"https://github.com/grleblanc","@type":"Person","name":"grleblanc"},"datePublished":"2024-05-09T01:28:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/373/validators/issues/373"}
| 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:91b91372-97c3-a109-aaeb-6ae4de27f3e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E4FA:BCADC:90506F:C364E5:698E3C65 |
| html-safe-nonce | 686e9d13d58a156c97bf95683287d42972d79a36280beb8ac39a1c16dff89dff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEZBOkJDQURDOjkwNTA2RjpDMzY0RTU6Njk4RTNDNjUiLCJ2aXNpdG9yX2lkIjoiMjk0MzY5OTM0MTUzMTgyMzIwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2ade6586838348d4d2609388b19bf697e5b5c36e5c1525bfc0449beeecdc61cd |
| hovercard-subject-tag | issue:2286728509 |
| 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-validators/validators/373/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b154349cf8e823c76291da27c59d859d1002d3ac9cf7ba45bde5a65b56384f6d/python-validators/validators/issues/373 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b154349cf8e823c76291da27c59d859d1002d3ac9cf7ba45bde5a65b56384f6d/python-validators/validators/issues/373 |
| og:image:alt | Python: 3.12 Valdiators: 0.28.1 validators.ip_address does not properly handle the scenario when private=False Result: ❯ python3.11 iPython 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | grleblanc |
| hostname | github.com |
| expected-hostname | github.com |
| None | a5632af64f7fed7bff1d6a428d1aca1b94fa7a48f760de2d39d9b1effdbf0082 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-validators/validators git https://github.com/python-validators/validators.git |
| octolytics-dimension-user_id | 113113270 |
| octolytics-dimension-user_login | python-validators |
| octolytics-dimension-repository_id | 13642984 |
| octolytics-dimension-repository_nwo | python-validators/validators |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13642984 |
| octolytics-dimension-repository_network_root_nwo | python-validators/validators |
| 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 | aa1fa9100f85cd8b602c63c7e337f9151e70024f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width