Skip to content

Commit

Permalink
wrap: default values for netrc are empty string from python 3.11
Browse files Browse the repository at this point in the history
From python 3.11 [1]:

> The entry in the netrc file no longer needs to contain all tokens.  The missing
> tokens' value default to an empty string.  All the tokens and their values now
> can contain arbitrary characters, like whitespace and non-ASCII characters.
> If the login name is anonymous, it won't trigger the security check.

[1] python/cpython@15409c7
  • Loading branch information
rgonzalezfluendo committed Feb 5, 2024
1 parent 6fcf863 commit 2d9c4f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonbuild/wrap/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def get_netrc_credentials(self, netloc: str) -> T.Optional[T.Tuple[str, str]]:
return None

login, account, password = self.netrc.authenticators(netloc)
if account is not None:
if account:
login = account

return login, password
Expand Down

0 comments on commit 2d9c4f2

Please sign in to comment.