8000 GH-123599: `url2pathname()`: don't call `gethostbyname()` by default by barneygale · Pull Request #132610 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-123599: url2pathname(): don't call gethostbyname() by default #132610

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

Merged
merged 10 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Faffing
  • Loading branch information
barneygale committed Apr 16, 2025
commit 8df17b414f1e49e1955714b5e8bc95b783c4c816
2 changes: 1 addition & 1 deletion Doc/library/urllib.request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ The :mod:`urllib.request` module defines the following functions:

The URL authority is discarded if it empty, ``localhost``, or the local
hostname. Otherwise, if *resolve_netloc* is set to true, the authority is
resolved using :func:`socket.gethostbyname`, and discarded if it matches a
resolved using :func:`socket.gethostbyname` and discarded if it matches a
local IP address. If the authority is still unhandled, then on Windows a
UNC path is returned, and on other platforms a
:exc:`~urllib.error.URLError` is raised.
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ urllib

- Accept a complete URL when the new *require_scheme* argument is set to
true.
- Discard URL authority if it matches the current hostname.
- Discard URL authority if it matches the local hostname.
- Discard URL authority if it resolves to a local IP address when the new
*resolve_netloc* argument is set to true.
- Raise :exc:`~urllib.error.URLError` if a URL authority isn't local,
Expand Down
Loading
0