[PATCH] cat.py: fix Python deprecation warning

Kornel Benko kornel at lyx.org
Fri Mar 20 11:29:34 UTC 2020


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.

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200320/4f03606a/attachment.asc>


More information about the lyx-devel mailing list