Message ID | 688de48c43e55a7c87417478254fd14e06a29895.1579180907.git.tredaelli@redhat.com |
---|---|
State | Accepted |
Commit | 197c21a63de06c0804801bb9ee674b88a7dfe08d |
Headers | show |
Series | [ovs-dev] Documentation: Fix building with Python 3.9 | expand |
On Thu, Jan 16, 2020 at 02:21:47PM +0100, Timothy Redaelli wrote: > open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' > ("universal newline") in the file mode. > This flag was deprecated since Python 3.3. > In Python 3, the "universal newline" is used by default when a file is open > in text mode. > > Reported-at: https://bugzilla.redhat.com/1791681 > Reported-by: Miro Hrončok <mhroncok@redhat.com> > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> > --- LGTM Acked-by: Flavio Leitner <fbl@sysclose.org>
On Thu, Jan 16, 2020 at 11:20:01AM -0300, Flavio Leitner wrote: > On Thu, Jan 16, 2020 at 02:21:47PM +0100, Timothy Redaelli wrote: > > open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' > > ("universal newline") in the file mode. > > This flag was deprecated since Python 3.3. > > In Python 3, the "universal newline" is used by default when a file is open > > in text mode. > > > > Reported-at: https://bugzilla.redhat.com/1791681 > > Reported-by: Miro Hrončok <mhroncok@redhat.com> > > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> > > --- > > LGTM > Acked-by: Flavio Leitner <fbl@sysclose.org> Thanks Timothy (and Flavio). Applied to master.
diff --git a/Documentation/conf.py b/Documentation/conf.py index 6bbfc02bd..37d92c36f 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -58,7 +58,7 @@ author = u'The Open vSwitch Development Community' # The full version, including alpha/beta/rc tags. release = None filename = "../configure.ac" -with open(filename, 'rU') as f: +with open(filename, 'r') as f: for line in f: if 'AC_INIT' in line: # Parse "AC_INIT(openvswitch, 2.7.90, bugs@openvswitch.org)":
open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' ("universal newline") in the file mode. This flag was deprecated since Python 3.3. In Python 3, the "universal newline" is used by default when a file is open in text mode. Reported-at: https://bugzilla.redhat.com/1791681 Reported-by: Miro Hrončok <mhroncok@redhat.com> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> --- Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)