diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-06-26 13:48:31 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@users.noreply.github.com> | 2018-06-26 13:48:31 -0700 |
commit | 13224c18fa95f060b6df9c6e6fd09081775568f5 (patch) | |
tree | c67562c5f6e9fb7881d9012f6c585a46258815fc /examples/func_calls.py | |
parent | 443474e4f33c20c87a5af87f83737302f1617b66 (diff) | |
download | pycparser-13224c18fa95f060b6df9c6e6fd09081775568f5.tar.gz |
Avoid opening files with deprecated 'U' mode (#269)
Opening files with 'U' mode is deprecated. When running tests with
Python warnings enabled, the warnings of the following form are emitted:
DeprecationWarning: 'U' mode is deprecated
return open(name, 'rU')
To open files with universal newlines on both Ptyhon 2 & 3, use the io
module. It defaults to opening with universal newlines and doesn't emit
a warning.
https://docs.python.org/3/library/io.html
> When reading input from the stream, if newline is None, universal
> newlines mode is enabled.
Diffstat (limited to 'examples/func_calls.py')
0 files changed, 0 insertions, 0 deletions