From 0b501808d4b753b957bfc795609b24e61027ef1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C4=8Cerm=C3=A1k?= Date: Fri, 24 Nov 2023 02:33:13 +0100 Subject: [PATCH] Fix deprecated function readfp Since Python 3.2 function readfp is replaced with read_file: https://docs.python.org/3.12/library/configparser.html#configparser.ConfigParser.read_file Readfp was fully removed in Python 3.12 so this fix is needed. --- GPy/util/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/util/config.py b/GPy/util/config.py index c6e09e1a..e7ee9219 100644 --- a/GPy/util/config.py +++ b/GPy/util/config.py @@ -25,7 +25,7 @@ home = os.getenv('HOME') or os.getenv('USERPROFILE') or '' user_file = os.path.join(home,'.config','GPy', 'user.cfg') # Read in the given files. -config.readfp(open(default_file)) +config.read_file(open(default_file)) config.read([local_file, user_file]) if not config: