[PATCH] cat.py: fix Python deprecation warning

Scott Kostyshak skostysh at lyx.org
Fri Mar 20 14:24:59 UTC 2020


On Fri, Mar 20, 2020 at 12:29:34PM +0100, Kornel Benko wrote:
> Am Thu, 19 Mar 2020 18:53:46 -0400
> schrieb Scott Kostyshak <skostysh at lyx.org>:
> 
> > See attached patch regarding our development script cat.py. It fixes a
> > Python 3 deprecation warning. However, I believe it changes behavior
> > with Python 2. The script has a "python3" shebang line (see
> > 3f03f0a447e), however that does not mean that it is not currently
> > compatible with Python 2. Should I add a version check? i.e., use mode
> > "rU" if Python 2, and mode "r" if Python 3?
> > 
> > Scott
> 
> For me the version check feels the safest way.

Done in master at 9715d350.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200320/2d9ec46f/attachment.asc>


More information about the lyx-devel mailing list