[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.5-1] Bug 1858056 - Favor RawConfigParser.read_file instead of deprecated readfp r=saschanaz



Title: GitLab

richard pushed to branch tor-browser-115.11.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 5826b22f
    by Henry Wilkes at 2024-05-21T10:10:27+01:00
    Bug 1858056 - Favor RawConfigParser.read_file instead of deprecated readfp r=saschanaz
    
    readfp is deprecated since Python 3.2
    
    Differential Revision: https://phabricator.services.mozilla.com/D190532
    

2 changed files:

Changes:

  • python/mach/mach/config.py
    ... ... @@ -309,7 +309,7 @@ class ConfigSettings(collections.abc.Mapping):
    309 309
             """Load config data by reading file objects."""
    
    310 310
     
    
    311 311
             for fp in fps:
    
    312
    -            self._config.readfp(fp)
    
    312
    +            self._config.read_file(fp)
    
    313 313
     
    
    314 314
         def write(self, fh):
    
    315 315
             """Write the config to a file object."""
    

  • testing/web-platform/unittestrunner.py
    ... ... @@ -49,7 +49,7 @@ class ReplaceRequirements(object):
    49 49
             parser = configparser.ConfigParser()
    
    50 50
             path = os.path.join(self.tox_path, "tox.ini")
    
    51 51
             with open(path) as f:
    
    52
    -            parser.readfp(f)
    
    52
    +            parser.read_file(f)
    
    53 53
             deps = parser.get("testenv", "deps")
    
    54 54
             dep_re = re.compile("(?:.*:\s*)?-r(.*)")
    
    55 55
     
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits