From ee479ded3f13107deb1ea86f2090745f6ffbca51 Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Thu, 1 Feb 2024 15:38:32 +0100 Subject: wrap: default values for netrc are empty string from python 3.11 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] https://github.com/python/cpython/commit/15409c720be0503131713e3d3abc1acd0da07378 --- mesonbuild/wrap/wrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index a8efd16..a260e0c 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -654,7 +654,7 @@ class Resolver: return None login, account, password = self.netrc.authenticators(netloc) - if account is not None: + if account: login = account return login, password -- cgit v1.1