diff --git a/CHANGELOG.md b/CHANGELOG.md index 02171b2d..de173d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ +## [5.10.0] - 2024-04-09 + +### Added + +- `None` Nothing added + +### Changed + +- `None` Nothing changed + +### Fixed + +- `None` Nothing fixed + +### Removed + +- `Enhancement` Per user request, I've added the ability to request a keepalive thread in the IOM access method. +I added this in V5.9.0, but then found that this could deadlock the IOM access method if the keepalive thread executed while in the middle +of one of my SASPy methods; which I didn't think would be the case, but I didn't happen to have it happen. When it +does, it can deadlock everything. So, I'm removing this feature with this release. It just doesn't work as expected. + + + ## [5.9.0] - 2024-04-08 ### Added diff --git a/saspy/doc/source/configuration.rst b/saspy/doc/source/configuration.rst index 0e89b4a6..aa06557b 100644 --- a/saspy/doc/source/configuration.rst +++ b/saspy/doc/source/configuration.rst @@ -702,11 +702,6 @@ encoding - windows-1252, respectively. timeout - Timeout value for establishing connection to workspace server -keepalive - - Specifies to create a thread that makes a call to the Workspace server every X number of minutes to keep the - server from timing out. The Workspace servers timeout value is defined in Metadata and if this is set to be less - minutes than the timeout, it will keep the server from timing out and terminating. The default timeout for Workspace - servers is usually 60 minutes, but it can be set to whatever by an admin who defines these in metadata. appserver - If you have more than one AppServer defined on OMR, and one object spawner is configured to start workspace servers from multiple Appservers, then you may need to pass the name of the physical workspace server (as defined in metadata) diff --git a/saspy/sasioiom.py b/saspy/sasioiom.py index 4bb424f7..f4c91c46 100644 --- a/saspy/sasioiom.py +++ b/saspy/sasioiom.py @@ -23,7 +23,6 @@ import warnings import io import atexit -from threading import Thread import logging logger = logging.getLogger('saspy') @@ -72,10 +71,6 @@ def __init__(self, session, **kwargs): self.reconuri = cfg.get('reconuri', None) self.logbufsz = cfg.get('logbufsz', None) self.log4j = cfg.get('log4j', '2.12.4') - self.keep = cfg.get('keepalive', None) - - if self.keep: - self.keep = int(self.keep) try: self.outopts = getattr(SAScfg, "SAS_output_options") @@ -266,13 +261,6 @@ def __init__(self, session, **kwargs): else: self.logbufsz = inlogsz - inkeep = kwargs.get('keepalive', None) - if inkeep: - if lock and self.keep: - logger.warning("Parameter 'keepalive' passed to SAS_session was ignored due to configuration restriction.") - else: - self.keep = int(inkeep) - self._prompt = session._sb.sascfg._prompt return @@ -588,11 +576,6 @@ def _startsas(self): if self.sascfg.verbose: logger.info("SAS Connection established. Subprocess id is "+str(pid)+"\n") - if self.sascfg.keep: - self._keep = Thread(target=self._keepalive_thread, args=()) - self._keep.daemon = True - self._keep.start() - atexit.register(self._endsas) return self.pid @@ -653,9 +636,6 @@ def _endsas(self): except: pass - if self.sascfg.keep: - self._keep.join(1) - try: # Mac OS Python has bugs with this call self.stdin[0].shutdown(socks.SHUT_RDWR) except: @@ -683,13 +663,6 @@ def _endsas(self): self._sb.SASpid = None return - def _keepalive_thread(self): - while True: - sleep(self.sascfg.keep * 60) - if self.pid is None: - return - self.submit('', results='text') - """ def _getlog(self, wait=5, jobid=None): logf = b'' diff --git a/saspy/version.py b/saspy/version.py index 08bf262a..cb747e61 100644 --- a/saspy/version.py +++ b/saspy/version.py @@ -1 +1 @@ -__version__ = '5.9.0' +__version__ = '5.10.0'