CDR Tickets

Issue Number 4234
Summary Upgrade python to 2.7.13
Created 2017-02-17 15:45:58
Issue Type Improvement
Submitted By Kline, Bob (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2017-11-02 13:47:42
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.203299
Description

Back when we were upgrading python to 2.7.10 we ran into a bug which was fixed in 2.7.12, but which ActiveState had not yet packaged for release. JIRA was down at the time, so we had all of our discussions offline, and we never got around to entering the ticket when JIRA came back up. Here's that thread:

Here's some background information. I tracked down the problem of the CSS still not showing up to a bug in Python 2.7.10, which is fixed in 2.7.12 (which ActiveState has not yet released).

https://bugs.python.org/issue25939

The bug affects about a dozen of our scripts/modules (including our CGI proxy.py script). The workaround is to use the requests module instead of the urllib2 module. The bug was deep in the bowels of _ssl.c (used to build one of the DLLs loaded by Python). Was quite a debugging adventure. :-)

Can't record this knowledge in JIRA (yet), so I thought I'd mention the bug in this thread.

....

Just to be clear, this was a second bug, not the original bug which prodded us into upgrading Python in the first place. The newer Python solved the original bug, but it only worked if you had permission to open part of a Windows Registry hive in read/write mode. We have that permission, so my test scripts succeeded with Python 2.7.10 where they had failed under 2.7.2. But the web server (which by the way is running under the "IIS APPPOOL" account, not the account Seth though it was using) doesn't have that privilege. The bug fix in 2.7.12 is to open that registry hive in read-only mode (which IIS will be able to do). You gotta love Windows! :-)

I have applied the necessary workarounds (switching to the requests module) in my little branch for this adventure.

ActiveState now has 2.7.13 available, so when the dust settles from the other projects, we will get the ball rolling for upgrading to that version.

Comment entered 2017-09-28 14:38:02 by Kline, Bob (NIH/NCI) [C]

Scripted the upgrade, tested on my home workstation and my NCI developer VM. Applied the upgrade to DEV and did some spot-check testing. Have asked the users to report any suspicious activity, and Volker to run some test publishing jobs and QC reports.

https://github.com/NCIOCPL/cdr-tools/commit/b3f6814
https://github.com/NCIOCPL/cdr-tools/commit/8f5c2fd
https://github.com/NCIOCPL/cdr-tools/commit/fa49a46

Comment entered 2017-10-19 14:21:20 by Kline, Bob (NIH/NCI) [C]

Looks good on DEV, so I'll put this on QA today or tomorrow.

Elapsed: 0:00:00.001318