diff --git a/README.md b/README.md index 2bd0153..f04e7c0 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,15 @@ rpnChilada supports arithmetic with arbitrary precision, powers and roots, logar ## Updates -### Update - November 19, 2021 +### Update - November 24, 2021 Python 3.10 really broke RPN, but the fixes were simple. -8.5.5 includes several small fixes to deal with incompatibilities introduced with Python 3.10, the most significant of which is that pyreadline, the moribund library that provides readline functionality for Python on Windows was replaced with pyreadline3, which is apparently still maintained. +8.5.6 includes several small fixes to deal with incompatibilities introduced with +Python 3.10, the most significant of which is that pyreadline, the moribund +library that provides readline functionality for Python on Windows was replaced +with the built-in readline. If I recall correctly, the readline library didn't +support Windows in the hazy past, which is why I started using pyreadline. ### Update - September 27, 2021 @@ -35,7 +39,7 @@ About 70 new operators have been added. --- -The current release is 8.5.5. +The current release is 8.5.6. See "rpn help settings" for more information. diff --git a/requirements.txt b/requirements.txt index 6c1ef35..c0378b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,6 @@ hyperop>=1.1 importlib_resources>=5.4.0 mpmath>=1.2.1 numpy>=1.19.5 -pyreadline3>=3.3 pytz>=2021.3 rpnChiladaData>=1.1.0 setuptools>=56.1.0 diff --git a/rpn/makeHelp.py b/rpn/makeHelp.py index db3fbaa..f1704a2 100644 --- a/rpn/makeHelp.py +++ b/rpn/makeHelp.py @@ -1381,6 +1381,12 @@ def makeCommandExample( command, indent=0, slow=False ): Python 3.10 broke some stuff, including the pyreadline modules. I replaced that with pyreadline3, which works fine and is actually being maintained. I also fixed a few other incompatibilities introduced by Python 3.10. + +8.5.6 + +pyreadline3 doesn't work on Linux. However, the built-in readline library +supports Windows just fine now. It didn't used to, which is why I started using +the pyreadline library. ''', 'license' : ''' diff --git a/rpn/rpn.py b/rpn/rpn.py index 5a0b62c..932a9db 100644 --- a/rpn/rpn.py +++ b/rpn/rpn.py @@ -27,7 +27,7 @@ import time from pathlib import Path -from pyreadline3.rlmain import Readline as readline +import readline from mpmath import fneg, im, mp, mpc, mpmathify, nan, nstr, re @@ -273,9 +273,8 @@ def enterInteractiveMode( ): mode, where it will continue to evaluate new expressions input until the 'exit' command. ''' - rl = readline( ) - rl.parse_and_bind( 'tab: complete' ) - rl.parse_and_bind( 'set editing-mode vi' ) + readline.parse_and_bind( 'tab: complete' ) + readline.parse_and_bind( 'set editing-mode vi' ) printTitleScreen( PROGRAM_NAME, PROGRAM_DESCRIPTION ) diff --git a/rpn/rpnVersion.py b/rpn/rpnVersion.py index 64485db..6536f89 100644 --- a/rpn/rpnVersion.py +++ b/rpn/rpnVersion.py @@ -19,8 +19,8 @@ #****************************************************************************** PROGRAM_NAME = 'rpnChilada' -PROGRAM_VERSION = '8.5.5' -PROGRAM_VERSION_NAME = '8.5.5' +PROGRAM_VERSION = '8.5.6' +PROGRAM_VERSION_NAME = '8.5.6' COPYRIGHT_MESSAGE = 'copyright (c) 2021 (1988), Rick Gutleber (rickg@his.com)' if PROGRAM_VERSION != PROGRAM_VERSION_NAME: