Author: danielsh
Date: Sat May 14 12:54:19 2022
New Revision: 1900882
URL: http://svn.apache.org/viewvc?rev=1900882&view=rev
Log:
Replace a call to a function deprecated upstream.
The behaviour of «ConfigParser.readfp(foo)» has changed across Python versions
as follows:
- Python 3.1: readfp(foo) would repeatedly call foo.readline().
- Python 3.2 through 3.11: readfp(foo) iterates foo.
- Python 3.12: readfp itself would be removed (according to a deprecation
warning that 3.10's readfp() emits).
Patch by: Hugo
Issue: SVN-4899 (in part)
* build/generator/gen_base.py
(GeneratorBase.__init__): As above.
Modified:
subversion/trunk/build/generator/gen_base.py
Modified: subversion/trunk/build/generator/gen_base.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_base.py?rev=1900882&r1=1900881&r2=1900882&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_base.py (original)
+++ subversion/trunk/build/generator/gen_base.py Sat May 14 12:54:19 2022
@@ -76,7 +76,7 @@ class GeneratorBase:
# Now read and parse build.conf
parser = configparser.ConfigParser()
- parser.readfp(open(fname))
+ parser.read_file(open(fname))
self.conf = build_path(os.path.abspath(fname))